diff options
| author | miod <> | 2016-11-04 17:30:30 +0000 |
|---|---|---|
| committer | miod <> | 2016-11-04 17:30:30 +0000 |
| commit | 1a12fc8399638223feca8f853e2ac2cc22eeb471 (patch) | |
| tree | 77b413175d422148cfb0ef7b2062340230aa5413 /src/lib/libcrypto/perlasm/x86gas.pl | |
| parent | 78e68d71838891e44ddbb5238203ccfce3b62d80 (diff) | |
| download | openbsd-1a12fc8399638223feca8f853e2ac2cc22eeb471.tar.gz openbsd-1a12fc8399638223feca8f853e2ac2cc22eeb471.tar.bz2 openbsd-1a12fc8399638223feca8f853e2ac2cc22eeb471.zip | |
Replace all uses of magic numbers when operating on OPENSSL_ia32_P[] by
meaningful constants in a private header file, so that reviewers can actually
get a chance to figure out what the code is attempting to do without knowing
all cpuid bits.
While there, turn it from an array of two 32-bit ints into a properly aligned
64-bit int.
Use of OPENSSL_ia32_P is now restricted to the assembler parts. C code will
now always use OPENSSL_cpu_caps() and check for the proper bits in the
whole 64-bit word it returns.
i386 tests and ok jsing@
Diffstat (limited to 'src/lib/libcrypto/perlasm/x86gas.pl')
| -rw-r--r-- | src/lib/libcrypto/perlasm/x86gas.pl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/perlasm/x86gas.pl b/src/lib/libcrypto/perlasm/x86gas.pl index d4baea514b..84d24edbbd 100644 --- a/src/lib/libcrypto/perlasm/x86gas.pl +++ b/src/lib/libcrypto/perlasm/x86gas.pl | |||
| @@ -157,10 +157,8 @@ sub ::file_end | |||
| 157 | } | 157 | } |
| 158 | } | 158 | } |
| 159 | if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out) { | 159 | if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out) { |
| 160 | my $tmp=".comm\t${nmdecor}OPENSSL_ia32cap_P,8"; | 160 | push (@out, ".extern\t${nmdecor}OPENSSL_ia32cap_P\n"); |
| 161 | if ($::macosx) { push (@out,"$tmp,2\n"); } | 161 | push (@out, ".hidden\t${nmdecor}OPENSSL_ia32cap_P\n"); |
| 162 | elsif ($::elf) { push (@out,"$tmp,4\n"); } | ||
| 163 | else { push (@out,"$tmp\n"); } | ||
| 164 | } | 162 | } |
| 165 | push(@out,$initseg) if ($initseg); | 163 | push(@out,$initseg) if ($initseg); |
| 166 | } | 164 | } |
