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/ppccpuid.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/ppccpuid.pl')
| -rwxr-xr-x | src/lib/libcrypto/ppccpuid.pl | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/lib/libcrypto/ppccpuid.pl b/src/lib/libcrypto/ppccpuid.pl index 4ba736a1d1..cf48714e33 100755 --- a/src/lib/libcrypto/ppccpuid.pl +++ b/src/lib/libcrypto/ppccpuid.pl | |||
| @@ -93,38 +93,6 @@ Ladd: lwarx r5,0,r3 | |||
| 93 | blr | 93 | blr |
| 94 | .long 0 | 94 | .long 0 |
| 95 | .byte 0,12,0x14,0,0,0,0,0 | 95 | .byte 0,12,0x14,0,0,0,0,0 |
| 96 | |||
| 97 | .globl .OPENSSL_cleanse | ||
| 98 | .align 4 | ||
| 99 | .OPENSSL_cleanse: | ||
| 100 | $CMPLI r4,7 | ||
| 101 | li r0,0 | ||
| 102 | bge Lot | ||
| 103 | $CMPLI r4,0 | ||
| 104 | beqlr- | ||
| 105 | Little: mtctr r4 | ||
| 106 | stb r0,0(r3) | ||
| 107 | addi r3,r3,1 | ||
| 108 | bdnz \$-8 | ||
| 109 | blr | ||
| 110 | Lot: andi. r5,r3,3 | ||
| 111 | beq Laligned | ||
| 112 | stb r0,0(r3) | ||
| 113 | subi r4,r4,1 | ||
| 114 | addi r3,r3,1 | ||
| 115 | b Lot | ||
| 116 | Laligned: | ||
| 117 | $SHRLI r5,r4,2 | ||
| 118 | mtctr r5 | ||
| 119 | stw r0,0(r3) | ||
| 120 | addi r3,r3,4 | ||
| 121 | bdnz \$-8 | ||
| 122 | andi. r4,r4,3 | ||
| 123 | bne Little | ||
| 124 | blr | ||
| 125 | .long 0 | ||
| 126 | .byte 0,12,0x14,0,0,0,2,0 | ||
| 127 | .long 0 | ||
| 128 | ___ | 96 | ___ |
| 129 | 97 | ||
| 130 | $code =~ s/\`([^\`]*)\`/eval $1/gem; | 98 | $code =~ s/\`([^\`]*)\`/eval $1/gem; |
