diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2018-06-02 18:03:35 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2018-06-02 18:03:35 +0000 |
commit | ba96f37758412151885d50838d2031623fc2b918 (patch) | |
tree | 131c4028850aaa89d0ce314de9dd9f9fb254e816 /sys/dev | |
parent | 97e8984893905ab824659c12dcc6b8ffb44ac0ed (diff) | |
download | src-ba96f37758412151885d50838d2031623fc2b918.tar.gz src-ba96f37758412151885d50838d2031623fc2b918.zip |
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).
Notes
Notes:
svn path=/head/; revision=334534
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cx/machdep.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/dev/cx/machdep.h b/sys/dev/cx/machdep.h index a425af5b717d..393377d0b406 100644 --- a/sys/dev/cx/machdep.h +++ b/sys/dev/cx/machdep.h @@ -73,7 +73,6 @@ # include <machine/cpufunc.h> # include <sys/libkern.h> # include <sys/systm.h> -# define memset(a,b,c) bzero (a,c) # define port_t int #ifndef _SYS_CDEFS_H_ |