diff options
| author | miod <> | 2014-04-17 18:16:45 +0000 |
|---|---|---|
| committer | miod <> | 2014-04-17 18:16:45 +0000 |
| commit | 777aa5b3f157309dd7bae673d3f2ae8f37e71457 (patch) | |
| tree | 90883ba640e038606eee09fb5c784c3df7903a8e /src/lib/libcrypto/alphacpuid.pl | |
| parent | 22bab90c92ee62bbe16d73084a853233fc368a8e (diff) | |
| download | openbsd-777aa5b3f157309dd7bae673d3f2ae8f37e71457.tar.gz openbsd-777aa5b3f157309dd7bae673d3f2ae8f37e71457.tar.bz2 openbsd-777aa5b3f157309dd7bae673d3f2ae8f37e71457.zip | |
Ok, there was a need for OPENSSL_cleanse() instead of bzero() to prevent
supposedly smart compilers from optimizing memory cleanups away. Understood.
Ok, in case of an hypothetically super smart compiler, OPENSSL_cleanse() had
to be convoluted enough for the compiler not to recognize that this was
actually bzero() in disguise. Understood.
But then why there had been optimized assembler versions of OPENSSL_cleanse()
is beyond me. Did someone not trust the C obfuscation?
Diffstat (limited to 'src/lib/libcrypto/alphacpuid.pl')
| -rw-r--r-- | src/lib/libcrypto/alphacpuid.pl | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/lib/libcrypto/alphacpuid.pl b/src/lib/libcrypto/alphacpuid.pl index 4b3cbb9827..f6aea6a766 100644 --- a/src/lib/libcrypto/alphacpuid.pl +++ b/src/lib/libcrypto/alphacpuid.pl | |||
| @@ -86,41 +86,4 @@ OPENSSL_rdtsc: | |||
| 86 | rpcc $0 | 86 | rpcc $0 |
| 87 | ret ($26) | 87 | ret ($26) |
| 88 | .end OPENSSL_rdtsc | 88 | .end OPENSSL_rdtsc |
| 89 | |||
| 90 | .globl OPENSSL_cleanse | ||
| 91 | .ent OPENSSL_cleanse | ||
| 92 | OPENSSL_cleanse: | ||
| 93 | .frame $30,0,$26 | ||
| 94 | .prologue 0 | ||
| 95 | beq $17,.Ldone | ||
| 96 | and $16,7,$0 | ||
| 97 | bic $17,7,$at | ||
| 98 | beq $at,.Little | ||
| 99 | beq $0,.Laligned | ||
| 100 | |||
| 101 | .Little: | ||
| 102 | subq $0,8,$0 | ||
| 103 | ldq_u $1,0($16) | ||
| 104 | mov $16,$2 | ||
| 105 | .Lalign: | ||
| 106 | mskbl $1,$16,$1 | ||
| 107 | lda $16,1($16) | ||
| 108 | subq $17,1,$17 | ||
| 109 | addq $0,1,$0 | ||
| 110 | beq $17,.Lout | ||
| 111 | bne $0,.Lalign | ||
| 112 | .Lout: stq_u $1,0($2) | ||
| 113 | beq $17,.Ldone | ||
| 114 | bic $17,7,$at | ||
| 115 | beq $at,.Little | ||
| 116 | |||
| 117 | .Laligned: | ||
| 118 | stq $31,0($16) | ||
| 119 | subq $17,8,$17 | ||
| 120 | lda $16,8($16) | ||
| 121 | bic $17,7,$at | ||
| 122 | bne $at,.Laligned | ||
| 123 | bne $17,.Little | ||
| 124 | .Ldone: ret ($26) | ||
| 125 | .end OPENSSL_cleanse | ||
| 126 | ___ | 89 | ___ |
