summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ppccpuid.pl
diff options
context:
space:
mode:
authormiod <>2014-04-17 18:16:45 +0000
committermiod <>2014-04-17 18:16:45 +0000
commit6b39fdab5868da712ead9164b4680bd7a7d86773 (patch)
tree90883ba640e038606eee09fb5c784c3df7903a8e /src/lib/libcrypto/ppccpuid.pl
parentd2037bc80eb83a1694b3e3458e6df04d0b9b29f1 (diff)
downloadopenbsd-6b39fdab5868da712ead9164b4680bd7a7d86773.tar.gz
openbsd-6b39fdab5868da712ead9164b4680bd7a7d86773.tar.bz2
openbsd-6b39fdab5868da712ead9164b4680bd7a7d86773.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-xsrc/lib/libcrypto/ppccpuid.pl32
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-
105Little: mtctr r4
106 stb r0,0(r3)
107 addi r3,r3,1
108 bdnz \$-8
109 blr
110Lot: 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
116Laligned:
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;