diff options
author | 2013-12-28 02:33:15 +0000 | |
---|---|---|
committer | 2013-12-28 02:33:15 +0000 | |
commit | b5fca263e57406f2b9d0d44818adefd80df98999 (patch) | |
tree | 25e4d83a93e857d051cf8fb04d871a474a4f105a | |
parent | Prevent GCC from inlining these unsafe builtins: sprintf, vsprintf, (diff) | |
download | wireguard-openbsd-b5fca263e57406f2b9d0d44818adefd80df98999.tar.xz wireguard-openbsd-b5fca263e57406f2b9d0d44818adefd80df98999.zip |
Use preprocessor symbols where possible.
-rw-r--r-- | sys/arch/amd64/stand/libsa/random_i386.S | 5 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/random_i386.S | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/amd64/stand/libsa/random_i386.S b/sys/arch/amd64/stand/libsa/random_i386.S index 2c7bbd04a2b..e53e548e729 100644 --- a/sys/arch/amd64/stand/libsa/random_i386.S +++ b/sys/arch/amd64/stand/libsa/random_i386.S @@ -17,8 +17,9 @@ #include <machine/param.h> #include <machine/asm.h> #include <machine/psl.h> +#include <machine/specialreg.h> -ENTRY(md_random) +ENTRY(mdrandom) // See if we have CPU identification. pushfl popl %eax @@ -55,7 +56,7 @@ ENTRY(md_random) shll $2, %edx xorl %edi, %edi - andl $0x40000000, %ecx // See if we have rdrand. + andl $CPUIDECX_RDRAND, %ecx // See if we have rdrand. jnz userand movl %edx, %ecx diff --git a/sys/arch/i386/stand/libsa/random_i386.S b/sys/arch/i386/stand/libsa/random_i386.S index 2c7bbd04a2b..e53e548e729 100644 --- a/sys/arch/i386/stand/libsa/random_i386.S +++ b/sys/arch/i386/stand/libsa/random_i386.S @@ -17,8 +17,9 @@ #include <machine/param.h> #include <machine/asm.h> #include <machine/psl.h> +#include <machine/specialreg.h> -ENTRY(md_random) +ENTRY(mdrandom) // See if we have CPU identification. pushfl popl %eax @@ -55,7 +56,7 @@ ENTRY(md_random) shll $2, %edx xorl %edi, %edi - andl $0x40000000, %ecx // See if we have rdrand. + andl $CPUIDECX_RDRAND, %ecx // See if we have rdrand. jnz userand movl %edx, %ecx |