diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/ia64cpuid.S | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/lib/libcrypto/ia64cpuid.S b/src/lib/libcrypto/ia64cpuid.S index 04fbb3439e..d705fff7ee 100644 --- a/src/lib/libcrypto/ia64cpuid.S +++ b/src/lib/libcrypto/ia64cpuid.S | |||
| @@ -1,6 +1,13 @@ | |||
| 1 | // Works on all IA-64 platforms: Linux, HP-UX, Win64i... | 1 | // Works on all IA-64 platforms: Linux, HP-UX, Win64i... |
| 2 | // On Win64i compile with ias.exe. | 2 | // On Win64i compile with ias.exe. |
| 3 | .text | 3 | .text |
| 4 | |||
| 5 | .global OPENSSL_cpuid_setup# | ||
| 6 | .proc OPENSSL_cpuid_setup# | ||
| 7 | OPENSSL_cpuid_setup: | ||
| 8 | { .mib; br.ret.sptk.many b0 };; | ||
| 9 | .endp OPENSSL_cpuid_setup# | ||
| 10 | |||
| 4 | .global OPENSSL_rdtsc# | 11 | .global OPENSSL_rdtsc# |
| 5 | .proc OPENSSL_rdtsc# | 12 | .proc OPENSSL_rdtsc# |
| 6 | OPENSSL_rdtsc: | 13 | OPENSSL_rdtsc: |
| @@ -119,3 +126,42 @@ OPENSSL_wipe_cpu: | |||
| 119 | mov ar.lc=r3 | 126 | mov ar.lc=r3 |
| 120 | br.ret.sptk b0 };; | 127 | br.ret.sptk b0 };; |
| 121 | .endp OPENSSL_wipe_cpu# | 128 | .endp OPENSSL_wipe_cpu# |
| 129 | |||
| 130 | .global OPENSSL_cleanse# | ||
| 131 | .proc OPENSSL_cleanse# | ||
| 132 | OPENSSL_cleanse: | ||
| 133 | { .mib; cmp.eq p6,p0=0,r33 // len==0 | ||
| 134 | #if defined(_HPUX_SOURCE) && !defined(_LP64) | ||
| 135 | addp4 r32=0,r32 | ||
| 136 | #endif | ||
| 137 | (p6) br.ret.spnt b0 };; | ||
| 138 | { .mib; and r2=7,r32 | ||
| 139 | cmp.leu p6,p0=15,r33 // len>=15 | ||
| 140 | (p6) br.cond.dptk .Lot };; | ||
| 141 | |||
| 142 | .Little: | ||
| 143 | { .mib; st1 [r32]=r0,1 | ||
| 144 | cmp.ltu p6,p7=1,r33 } // len>1 | ||
| 145 | { .mbb; add r33=-1,r33 // len-- | ||
| 146 | (p6) br.cond.dptk .Little | ||
| 147 | (p7) br.ret.sptk.many b0 };; | ||
| 148 | |||
| 149 | .Lot: | ||
| 150 | { .mib; cmp.eq p6,p0=0,r2 | ||
| 151 | (p6) br.cond.dptk .Laligned };; | ||
| 152 | { .mmi; st1 [r32]=r0,1;; | ||
| 153 | and r2=7,r32 } | ||
| 154 | { .mib; add r33=-1,r33 | ||
| 155 | br .Lot };; | ||
| 156 | |||
| 157 | .Laligned: | ||
| 158 | { .mmi; st8 [r32]=r0,8 | ||
| 159 | and r2=-8,r33 // len&~7 | ||
| 160 | add r33=-8,r33 };; // len-=8 | ||
| 161 | { .mib; cmp.ltu p6,p0=8,r2 // ((len+8)&~7)>8 | ||
| 162 | (p6) br.cond.dptk .Laligned };; | ||
| 163 | |||
| 164 | { .mbb; cmp.eq p6,p7=r0,r33 | ||
| 165 | (p7) br.cond.dpnt .Little | ||
| 166 | (p6) br.ret.sptk.many b0 };; | ||
| 167 | .endp OPENSSL_cleanse# | ||
