summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/include/bits/string.h
Commit message (Collapse)AuthorAgeFilesLines
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | | | | These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Reduce size of memset()Michael Brown2015-02-171-1/+127
| | | | | | | | | As with memcpy(), we can reduce the code size (by an average of 0.2%) by giving the compiler more visibility into what memset() is doing, and by avoiding the "rep" prefix on short fixed-length sequences of string operations. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite string functionsMichael Brown2015-02-171-18/+0Star
| | | | | | | | | | | | Some of the C library string functions have an unknown provenance. Reimplement all such functions to avoid potential licensing uncertainty. Remove the inline-assembler versions of strlen(), memswap(), and strncmp(); these save a minimal amount of space (around 40 bytes in total) and are not performance-critical. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Relicense x86 string.hMichael Brown2012-11-121-19/+24
| | | | | | | No code from the original source remains within this file; relicense under GPL2+ with a new copyright notice. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Fix and externalise memswap()Michael Brown2012-11-121-15/+2Star
| | | | | | Make memswap() behave correctly if called with a length of zero. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Reduce overall code size by externalising strlen()Michael Brown2012-11-121-12/+2Star
| | | | | | Typical saving is 5-20 bytes in each file using strlen(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Reduce overall code size by externalising strncmp()Michael Brown2012-11-121-21/+2Star
| | | | | | Typical saving is 20-30 bytes in each file using strncmp(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Remove unnecessary "cld" instruction from memset()Michael Brown2012-11-121-11/+18
| | | | | | Saving is one byte per call to memset(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Convert memcpy() from a macro to an inline functionMichael Brown2012-11-121-4/+24
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Reduce overall code size by externalising memmove()Michael Brown2012-11-121-23/+25
| | | | | | Typical saving is 15-20 bytes in each file using memmove(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Remove obsolete implementation of memcpy()Michael Brown2012-11-121-12/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [string] Use 64-bit registers in assembly memswap() on x86_64Joshua Oreman2010-08-011-4/+4
| | | | | | | | | An assembly version of memswap() is in an x86 word-length-agnostic header file, but it used 32-bit registers to store pointers, leading to memory errors responding to ARP queries on 64-bit systems. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [x86_64] Add support for compilation as an x86_64 binaryMichael Brown2008-12-051-0/+250
Currently the only supported platform for x86_64 is EFI. Building an EFI64 gPXE requires a version of gcc that supports __attribute__((ms_abi)). This currently means a development build of gcc; the feature should be present when gcc 4.4 is released. In the meantime; you can grab a suitable gcc tree from git://git.etherboot.org/scm/people/mcb30/gcc/.git