diff options
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/hash_md5_sha_x86-32_shaNI.S | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libbb/hash_md5_sha_x86-32_shaNI.S b/libbb/hash_md5_sha_x86-32_shaNI.S index 0f3fe57ca..ad814a21b 100644 --- a/libbb/hash_md5_sha_x86-32_shaNI.S +++ b/libbb/hash_md5_sha_x86-32_shaNI.S | |||
| @@ -35,11 +35,9 @@ | |||
| 35 | 35 | ||
| 36 | .balign 8 # allow decoders to fetch at least 2 first insns | 36 | .balign 8 # allow decoders to fetch at least 2 first insns |
| 37 | sha1_process_block64_shaNI: | 37 | sha1_process_block64_shaNI: |
| 38 | subl $16, %esp | ||
| 39 | |||
| 40 | /* load initial hash values */ | 38 | /* load initial hash values */ |
| 41 | xor128 E0, E0 | ||
| 42 | movu128 76(%eax), ABCD | 39 | movu128 76(%eax), ABCD |
| 40 | xor128 E0, E0 | ||
| 43 | pinsrd $3, 76+4*4(%eax), E0 # load to uppermost 32-bit word | 41 | pinsrd $3, 76+4*4(%eax), E0 # load to uppermost 32-bit word |
| 44 | shuf128_32 $0x1B, ABCD, ABCD # DCBA -> ABCD | 42 | shuf128_32 $0x1B, ABCD, ABCD # DCBA -> ABCD |
| 45 | 43 | ||
| @@ -56,7 +54,7 @@ sha1_process_block64_shaNI: | |||
| 56 | 54 | ||
| 57 | /* Save hash values for addition after rounds */ | 55 | /* Save hash values for addition after rounds */ |
| 58 | movu128 E0, %xmm7 | 56 | movu128 E0, %xmm7 |
| 59 | movu128 ABCD, (%esp) | 57 | /*movu128 ABCD, %xmm8 - NOPE, 32bit has no xmm8 */ |
| 60 | 58 | ||
| 61 | /* Rounds 0-3 */ | 59 | /* Rounds 0-3 */ |
| 62 | paddd MSG0, E0 | 60 | paddd MSG0, E0 |
| @@ -208,7 +206,9 @@ sha1_process_block64_shaNI: | |||
| 208 | 206 | ||
| 209 | /* Add current hash values with previously saved */ | 207 | /* Add current hash values with previously saved */ |
| 210 | sha1nexte %xmm7, E0 | 208 | sha1nexte %xmm7, E0 |
| 211 | movu128 (%esp), %xmm7 | 209 | /*paddd %xmm8, ABCD - 32-bit mode has no xmm8 */ |
| 210 | movu128 76(%eax), %xmm7 # recreate original ABCD | ||
| 211 | shuf128_32 $0x1B, %xmm7, %xmm7 # DCBA -> ABCD | ||
| 212 | paddd %xmm7, ABCD | 212 | paddd %xmm7, ABCD |
| 213 | 213 | ||
| 214 | /* Write hash values back in the correct order */ | 214 | /* Write hash values back in the correct order */ |
| @@ -216,7 +216,6 @@ sha1_process_block64_shaNI: | |||
| 216 | movu128 ABCD, 76(%eax) | 216 | movu128 ABCD, 76(%eax) |
| 217 | extr128_32 $3, E0, 76+4*4(%eax) | 217 | extr128_32 $3, E0, 76+4*4(%eax) |
| 218 | 218 | ||
| 219 | addl $16, %esp | ||
| 220 | ret | 219 | ret |
| 221 | .size sha1_process_block64_shaNI, .-sha1_process_block64_shaNI | 220 | .size sha1_process_block64_shaNI, .-sha1_process_block64_shaNI |
| 222 | 221 | ||
