5 open STDOUT
,">$output";
7 if ($flavour =~ /64/) {
24 .SUBSPA \
$CODE\
$,QUAD
=0,ALIGN
=8,ACCESS
=0x2C,CODE_ONLY
26 .EXPORT OPENSSL_cpuid_setup
,ENTRY
37 .EXPORT OPENSSL_rdtsc
,ENTRY
49 .EXPORT OPENSSL_wipe_cpu
,ENTRY
94 .EXPORT OPENSSL_cleanse
,ENTRY
,ARGW0
=GR
,ARGW1
=GR
100 cmpib
,*= 0,$len,Ldone
102 cmpib
,*>>= 15,$len,Little
106 and,*<> $inp,%r1,%r28
117 addib
,*<> -$SIZE_T,%r28,Lot
118 ldo
$SIZE_T($inp),$inp
120 and,*<> $len,%r1,$len
124 addib
,*<> -1,$len,Little
134 my ($out,$cnt,$max)=("%r26","%r25","%r24");
135 my ($tick,$lasttick)=("%r23","%r22");
136 my ($diff,$lastdiff)=("%r21","%r20");
139 .EXPORT OPENSSL_instrument_bus
,ENTRY
,ARGW0
=GR
,ARGW1
=GR
141 OPENSSL_instrument_bus
152 add
$diff,$tick,$tick
156 sub $tick,$lasttick,$diff
161 add
$diff,$tick,$tick
164 addib
,<> -1,$cnt,Loop
172 .EXPORT OPENSSL_instrument_bus2
,ENTRY
,ARGW0
=GR
,ARGW1
=GR
174 OPENSSL_instrument_bus2
187 add
$diff,$tick,$tick
191 sub $tick,$lasttick,$diff
197 add
$diff,$tick,$tick
200 addib
,= -1,$max,Ldone2
204 sub $tick,$lasttick,$diff
206 cmpclr
,<> $lastdiff,$diff,$tick
211 addb
,<> $tick,$cnt,Loop2
212 shladd
,l
$tick,2,$out,$out
220 $code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4);
221 $code =~ s/,\*/,/gm if ($SIZE_T==4);