| ba96f377 | 02-Jun-2018 |
Mateusz Guzik <[email protected]> |
Use __builtin for various mem* and b* (e.g. bzero) routines.
Some of the routines were using artificially limited builtin already, drop the explicit limit.
The use of builtins allows quite often al
Use __builtin for various mem* and b* (e.g. bzero) routines.
Some of the routines were using artificially limited builtin already, drop the explicit limit.
The use of builtins allows quite often allows the compiler to elide the call or most zeroing to begin with. For instance, if the target object is 32 bytes in size and gets zeroed + has 16 bytes initialized, the compiler can just add code to zero out the rest.
Note not all the primites have asm variants and some of the existing ones are not optimized. Maintaines are strongly encourage to take a look (regardless of this change).
show more ...
|
| c6f7141f | 24-May-2018 |
Warner Losh <[email protected]> |
Protect bzero call against macro expansion
Shortly, we'll be moving to defining bzero and memset in terms of __builting_memset. To do that, we can't have macro calls to bzero in the fallback impelme
Protect bzero call against macro expansion
Shortly, we'll be moving to defining bzero and memset in terms of __builting_memset. To do that, we can't have macro calls to bzero in the fallback impelmentation of memset. Normal calls to bzero are fine. All 4 architectures that use this have their own copies of bzero, so there's no mutual recursion issue between memset and bcopy.
show more ...
|
| baaa3c4d | 10-May-2018 |
Warner Losh <[email protected]> |
Simplify things a little
Rather than include a copy for memmove to call bcopy to call memcpy (which handles overlapping copies), make memmove a strong reference to memcpy to save the two calls.
Dif
Simplify things a little
Rather than include a copy for memmove to call bcopy to call memcpy (which handles overlapping copies), make memmove a strong reference to memcpy to save the two calls.
Differential Revision: https://reviews.freebsd.org/D15374
show more ...
|