summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/amd64/string (follow)
Commit message (Collapse)AuthorAgeFilesLines
* In asm.h ensure NENTRY uses the old-school nop-sled align, but change standardderaadt2018-07-101-1/+1
| | | | | | | ENTRY is a trapsled. Fix a few functions which fall-through into an ENTRY macro. amd64 binaries now are free of double+-nop sequences (except for one assember nit in aes-586.pl). Previous changes by guenther got us here. ok mortimer kettenis
* Add retguard macros for libc.mortimer2018-07-0310-10/+33
| | | | ok deraadt
* Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasguenther2018-01-181-2/+3
| | | | | | | dance, mark it protected. This works better for both gcc and clang: gcc blocks overriding of internal calls, while clang permits inlining again. ok otto@
* clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"guenther2017-11-292-4/+8
| | | | | | | | | to builtins like mem{set,cpy,move} and __stack_smash_handler. So, when building with clang, instead mark those as protected visibility to get rid of the PLT relocations. We can't take the address of them then, but that's ok: it's a build-time error not a run-time error. ok kettenis@
* "the the" -> "the" in commentmmcc2015-12-111-2/+2
|
* Split the non-syscall ASM bits from SYS.h into DEFS.h and use that in theguenther2015-11-1410-15/+15
| | | | | | non-syscall .S source ok millert@ miod@
* Add framework for resolving (pun intended) libc namespace issues, usingguenther2015-08-3110-26/+26
| | | | | | | | | | | | wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here. tests clean on i386, amd64, sparc64, powerpc, and mips64 naming feedback from kettenis@ and millert@ ok kettenis@
* Sprinkle END() in some straightforward *.S files that have ENTRY(). Theuebayasi2015-05-2910-5/+17
| | | | resulting *.o have "FUNC" symbols with size set.
* Make index/rindex weak aliases of strchr/strrchr since they are notmillert2015-05-152-4/+4
| | | | | part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
* 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@
* restructure libc/string + libc/arch/*/string coperation regardingderaadt2014-11-309-5/+359
| | | | | | | | | | | | | | | | (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
* 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@
* remove lint leftovers; ok guenther@okan2012-09-041-3/+1
|
* Remove assembly version of strlen from i386 and amd64, where it'smikeb2012-01-171-18/+0
| | | | | | | up to 3 times slower than the C code most of the time. This was brought up by DragonflyBSD guys initially. ok deraadt, guenther. miod will not miss it.
* Reimplement mutexes, condvars, and rwlocks to eliminate bugs,guenther2012-01-171-3/+3
| | | | | | | | | | | | | particularly the "consume the signal you just sent" hang, and putting the wait queues in userspace. Do cancellation handling in pthread_cond_*wait(), pthread_join(), and sem_wait(). Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add 'abort" argument to thrsleep to close cancellation race; make thr{sleep,wakeup} return errno values via *retval to avoid touching userspace errno.
* fix some lint 'xxx used, but not defined' warnings by properly addingotto2007-05-151-1/+3
| | | | stuff to LSRCS
* things for amd64; from art@mickey2004-01-283-0/+42