diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2014-02-24 21:40:34 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-03-04 14:45:40 -0800 |
commit | 795666e61962e8d781390713cb9cd39043f5c334 (patch) | |
tree | 100ed42db38dbdb0515c2b29e1d83ff2c220e356 | |
parent | 94f03c9a2c479bd59913e6556620c2432e43b6ee (diff) | |
download | rng-tools-795666e61962e8d781390713cb9cd39043f5c334.tar.gz |
rdrand_asm.S: Use #ifdef instead of #if defined()
Use #ifdef rather than #if defined() when we are testing for only one
symbol.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | rdrand_asm.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/rdrand_asm.S b/rdrand_asm.S index 32e7328..0bd4b04 100644 --- a/rdrand_asm.S +++ b/rdrand_asm.S @@ -18,6 +18,8 @@ * */ +#if defined(__i386__) || defined(__x86_64__) + #define ENTRY(x) \ .balign 64 ; \ .globl x ; \ @@ -29,7 +31,7 @@ x: #define RDRAND_RETRY_LIMIT 10 -#if defined(__x86_64__) +#ifdef __x86_64__ ENTRY(x86_rdrand_nlong) 1: @@ -92,10 +94,8 @@ ENDPROC(x86_rdrand_nlong) #endif -#if defined(__i386__) || defined(__x86_64__) - ENTRY(x86_aes_mangle) -#if defined(__i386__) +#ifdef __i386__ push %ebp mov %esp, %ebp movl 8(%ebp), %eax @@ -161,7 +161,7 @@ ENTRY(x86_aes_mangle) movdqa %xmm6, (6*16)(PTR1) movdqa %xmm7, (7*16)(PTR1) -#if defined(__i386__) +#ifdef __i386__ pop %ebp #endif ret @@ -171,7 +171,7 @@ ENDPROC(x86_aes_mangle) #define AESKEYGENASSIST(imm) .byte 0x66,0x0f,0x3a,0xdf,0xc8,imm ENTRY(x86_aes_expand_key) -#if defined(__i386__) +#ifdef __i386__ push %ebp mov %esp, %ebp movl 8(%ebp), %eax @@ -203,7 +203,7 @@ ENTRY(x86_aes_expand_key) AESKEYGENASSIST(0x36) call 1f -#if defined(__i386__) +#ifdef __i386__ pop %ebp #endif ret @@ -229,6 +229,7 @@ ENDPROC(x86_aes_expand_key) aes_round_keys: .space 11*16 .size aes_round_keys, .-aes_round_keys + #endif /* i386 or x86_64 */ /* |