summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Put END() matching ENTRY().uebayasi2015-06-011-1/+2
|
* Put END() where appropriate.uebayasi2015-05-294-10/+12
| | | | While here, kill redundant use of _C_LABEL() in ENTRY().
* Put obvious END() macros that match ENTRY() entries.uebayasi2015-05-2912-12/+51
|
* Sprinkle END() in some straightforward *.S files that have ENTRY(). Theuebayasi2015-05-2910-5/+17
| | | | resulting *.o have "FUNC" symbols with size set.
* Bring back `1:' label removed by mistake in 1.7. Complained loudly about by gasmiod2015-05-261-2/+2
| | | | 2.17, while 2.15 didn't care, which just caused a cold shiver accross my spine.
* Make index/rindex weak aliases of strchr/strrchr since they are notmillert2015-05-1517-36/+38
| | | | | part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
* Use STRONG_ALIAS instead of ALTENTRY.kettenis2015-05-142-4/+6
| | | | ok millert@
* Put the right number of leading underscores in ___cerror and __cerror, formiod2015-05-121-2/+3
| | | | | the sake of libpthread. Probably missed during the a.out->ELF switch, I can't believe this went unnoticed for so long.
* Eliminate the last uses of *fork's second syscall return register; the pidguenther2015-04-212-6/+6
| | | | | | is zero in the child ok deraadt@ miod@
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-0726-55/+200
| | | | | | | | | | unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
* Stop encoding the syscall number in the swi instruction - this has beenjsing2015-03-311-4/+3
| | | | | | | unused for around 8 years, when the kernel ABI was changed to use the syscall number specified in r12. ok miod@ jsg@
* Simplify fork/vfork logic: the kernel has handled returning zero in the childguenther2015-03-3124-243/+43
| | | | | | | for a long time, so there's no need to test the second return register here in the asm stub. ok and testing of many archs by krw@ miod@
* remove code for ancient gcc.daniel2015-01-042-13/+2
| | | | ok millert@, kettenis@
* we do not need the complexity of an assembly swab function here.tedu2014-12-112-69/+2
| | | | ok deraadt
* Import new amd64 assembly versions of strchr/index, strrchr/rindex,reyk2014-12-095-95/+442
| | | | | | | | | and strlen that provide a significantly faster performance than our previous .c or .S implementations. Based on NetBSD's code. Tested with different amd64 CPUs. ok deraadt@ mikeb@
* memmove/bcopy from libkern, almost certainly the unrolling here isderaadt2014-12-052-2/+162
| | | | | | beneficial because the compiler tends to do small known-size blocks inline. Continue using the MI memcpy.c for now. ok miod
* asm version from libkern, but mempcy() remains tied to thederaadt2014-12-042-2/+170
| | | | | MI syslog_r/abort version for the time being. ok miod
* Noone cares what castle the princess is inderaadt2014-12-023-5/+3
|
* sync bcopy/memmove/memcpy implementation with the kernel. ok deraadttedu2014-12-023-161/+46
|
* restructure libc/string + libc/arch/*/string coperation regardingderaadt2014-11-3039-368/+1621
| | | | | | | | | | | | | | | | (potentially) MD versions (function dependent, not filename dependent) split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex Bring back amd64 .S versions And the final touch: switch all architectures temporarily to MI memcpy.c, which contains syslog + abort for overlapping copies. A nice harsh undefined behaviour. We will clean the entire userland of the remaining issues in this catagory, then switch to the optimised memcpy which skips the memmove check. I tried to cut this change into pieces, but testing each sub-step on every architecture is too time consuming and mindnumbing. ok miod
* mop up a barely started project... getting in the way of grepping the tree!deraadt2014-11-2229-545/+0
|
* One of these optimized stubs creates some incredibly subtle damage,deraadt2014-11-2012-391/+4
| | | | | causing as(1) to create a wrong nop-sled for text segment aligns. Revert, until it is found and fixed.
* Add amd64 assembler versions of some standard functions to libc. Thereyk2014-11-2012-4/+391
| | | | | | | | code is already used in the kernel and the files are unmodified copies from src/sys/lib/libkern/arch/amd64/. Depending on the function, this gives us some speedup in userland. ok deraadt@, no objections from miod@
* let this compile with clang; no binary change with gcc.daniel2014-11-141-2/+2
| | | | ok deraadt@
* Fix some bugs in the _Qp_sqrt implementation that would limit the accuracykettenis2014-09-121-4/+4
| | | | | | of the result in many cases. From FreeBSD allbeit with some changes to keep the coding style consistent. This fixes the asinhl(4) issue reported by dickman@ on tech@.
* XPG requires insque() and remque() to work with linear lists and not justguenther2014-08-152-80/+0
| | | | | | | | | circular lists. Amazingly, they managed to extend the requirements to no longer match the behavior of the VAX instructions they were modeled after, so the trivial VAX ASM versions have to go. Nice job breaking it, X/Open! Based on a diff from enh (at) google.com ok miod@
* Switch from <sys/endian.h> or <machine/endian.h> to the new,guenther2014-07-2110-24/+21
| | | | | | being-standardized <endian.h> ok deraadt@ millert@ beck@
* zap trailing newlines; "go for it" deraadtokan2014-07-163-4/+1
|
* Nuke the machinery to sync libkern with libc, it's not been used in themiod2014-06-0912-58/+12
| | | | | | last 15 years and there is no point to use it in the future. From Jean-Philippe Ouellet
* Fix modf() on sparctobiasu2014-06-071-3/+3
| | | | | | | For large integral values, modf returned uninitialized data in iptr since 1992. Found while debugging python segfaults. ok miod
* Apply "unifdef -D__STDC__" to libc/arch/*/SYS.hmatthew2014-06-0410-109/+10
| | | | | | | | A while back, pascal@ converted our system call stubs from using "cpp | as" to "cc -x assembler-with-cpp", so there's no need to stay compatible with ancient preprocessor semantics. ok miod
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-04-1824-57/+57
|
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-04-1714-42/+42
|
* Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingmiod2014-03-18100-4130/+0
| | | | | | | this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
* match what hppa is doing now (not tested, but should be right)deraadt2014-01-101-5/+1
| | | | ok miod jsing
* correct argument handling; this has been broken since to beginningderaadt2014-01-101-3/+2
| | | | | and was writing to wrong memory. ok jsing miod guenther
* Remove #ifdef _REENTRANT code that isn't used here. These days, the codekettenis2013-12-312-33/+2
| | | | | | handling per-thread errno lives in librthread. ok miod@, espie@
* yup, we do ELFderaadt2013-12-241-6/+1
|
* 1 << 31 cleanup. Eitan Adler pointed out that there has been aderaadt2013-11-262-8/+8
| | | | | resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
* bring in math.h to provide prototypesderaadt2013-11-133-3/+6
|
* add proto for amd64 case; unify otherwisederaadt2013-11-122-3/+5
|
* Remove the `let's zero %r2 if %r3 is nonzero' dance. It's been more than 10miod2013-09-081-10/+2
| | | | | years that fork() returns through child_return(), which takes care of zeroing %r2.
* VAX ELF userland bits. Consists mostly of register prefix additions.miod2013-07-0535-338/+354
|
* bcopy (and family) can check for 0 length, but negative lengths shouldderaadt2013-06-111-3/+3
| | | | | proceed through to crash and show the bug. ok miod
* On second thought, do not use a tcnd instruction to test for divide-by-zero,miod2013-06-054-9/+17
| | | | | as it forces a pipeline synchronization; replace it with a bcnd + unconditional trap, to only synchronize when the trap is needed.
* ...also add __modsi3 and __umodsi3, and make these symbols weak by default.miod2013-06-055-4/+112
|
* Add __divsi3 and __udivsi3 gcc-compatible routines. Not used by anything yetmiod2013-06-053-6/+93
| | | | | (as gcc does not emit code calling them), but will be shortly; belatedly riding the libc minor bump.
* Do a PC-relative relocation for _map rather than going throughmartynas2013-04-231-2/+2
| | | | | | | | | GOTPCREL. Uncovered after the binutils patch where it isn't optimized away at assembly and is forced to go through GOTPCREL. But _map is effectively a local variable. Found with cephes by guenther@. OK guenther@, kettenis@, deraadt@.
* Fix obviously stupid bug in the PIC_{LOAD,STORE} macros when compiling withmiod2013-04-111-3/+3
| | | | -fPIC. Harmless since we build libc -fpic so far.
* Switch libc and libm to use strong aliases rather than weak aliasesmartynas2013-03-2816-93/+38
| | | | | | | | | | | where appropriate. Among other things makes the symbols consistent across all architectures (notably where ldbl mantissa is 53 bits). While at it, kill unused LINTLIBRARY/PROTOLIB1 cruft which was there to trick lint into recording the right prototypes for aliased functions. Most of the work done at the awesome n2k13 hackathon. Agreed by kettenis@, guenther@, matthew@.