Make SPARC assembler Pirify-friendly (Purify can't cope with certain
PIC constructs).
This commit is contained in:
parent
ef8e772805
commit
4c78bc05c4
@ -522,10 +522,10 @@ AES_encrypt:
|
||||
ld [%i0+8],%o2
|
||||
ld [%i0+12],%o3
|
||||
|
||||
mov %i2,%o5
|
||||
nop
|
||||
1: call _sparcv9_AES_encrypt
|
||||
1: call .+8
|
||||
sub %o7,1b-AES_Te,%o4
|
||||
call _sparcv9_AES_encrypt
|
||||
mov %i2,%o5
|
||||
|
||||
st %o0,[%i1+0]
|
||||
st %o1,[%i1+4]
|
||||
@ -582,10 +582,10 @@ AES_encrypt:
|
||||
or %l7,%l6,%l6
|
||||
or %l4,%l6,%o3
|
||||
|
||||
mov %i2,%o5
|
||||
nop
|
||||
1: call _sparcv9_AES_encrypt
|
||||
1: call .+8
|
||||
sub %o7,1b-AES_Te,%o4
|
||||
call _sparcv9_AES_encrypt
|
||||
mov %i2,%o5
|
||||
|
||||
srl %o0,24,%l0
|
||||
srl %o0,16,%l1
|
||||
@ -1068,10 +1068,10 @@ AES_decrypt:
|
||||
ld [%i0+8],%o2
|
||||
ld [%i0+12],%o3
|
||||
|
||||
mov %i2,%o5
|
||||
nop
|
||||
1: call _sparcv9_AES_decrypt
|
||||
1: call .+8
|
||||
sub %o7,1b-AES_Td,%o4
|
||||
call _sparcv9_AES_decrypt
|
||||
mov %i2,%o5
|
||||
|
||||
st %o0,[%i1+0]
|
||||
st %o1,[%i1+4]
|
||||
@ -1128,10 +1128,10 @@ AES_decrypt:
|
||||
or %l7,%l6,%l6
|
||||
or %l4,%l6,%o3
|
||||
|
||||
mov %i2,%o5
|
||||
nop
|
||||
1: call _sparcv9_AES_decrypt
|
||||
1: call .+8
|
||||
sub %o7,1b-AES_Td,%o4
|
||||
call _sparcv9_AES_decrypt
|
||||
mov %i2,%o5
|
||||
|
||||
srl %o0,24,%l0
|
||||
srl %o0,16,%l1
|
||||
|
@ -1180,8 +1180,11 @@ DES_encrypt1:
|
||||
|
||||
save %sp, FRAME, %sp
|
||||
|
||||
call .PIC.me.up
|
||||
mov .PIC.me.up-(.-4),out0
|
||||
sethi %hi(.PIC.DES_SPtrans-1f),global1
|
||||
or global1,%lo(.PIC.DES_SPtrans-1f),global1
|
||||
1: call .+8
|
||||
add %o7,global1,global1
|
||||
sub global1,.PIC.DES_SPtrans-.des_and,out2
|
||||
|
||||
ld [in0], in5 ! left
|
||||
cmp in2, 0 ! enc
|
||||
@ -1238,8 +1241,11 @@ DES_encrypt2:
|
||||
|
||||
save %sp, FRAME, %sp
|
||||
|
||||
call .PIC.me.up
|
||||
mov .PIC.me.up-(.-4),out0
|
||||
sethi %hi(.PIC.DES_SPtrans-1f),global1
|
||||
or global1,%lo(.PIC.DES_SPtrans-1f),global1
|
||||
1: call .+8
|
||||
add %o7,global1,global1
|
||||
sub global1,.PIC.DES_SPtrans-.des_and,out2
|
||||
|
||||
! Set sbox address 1 to 6 and rotate halfs 3 left
|
||||
! Errors caught by destest? Yes. Still? *NO*
|
||||
@ -1353,8 +1359,11 @@ DES_encrypt3:
|
||||
|
||||
save %sp, FRAME, %sp
|
||||
|
||||
call .PIC.me.up
|
||||
mov .PIC.me.up-(.-4),out0
|
||||
sethi %hi(.PIC.DES_SPtrans-1f),global1
|
||||
or global1,%lo(.PIC.DES_SPtrans-1f),global1
|
||||
1: call .+8
|
||||
add %o7,global1,global1
|
||||
sub global1,.PIC.DES_SPtrans-.des_and,out2
|
||||
|
||||
ld [in0], in5 ! left
|
||||
add in2, 120, in4 ! ks2
|
||||
@ -1395,8 +1404,11 @@ DES_decrypt3:
|
||||
|
||||
save %sp, FRAME, %sp
|
||||
|
||||
call .PIC.me.up
|
||||
mov .PIC.me.up-(.-4),out0
|
||||
sethi %hi(.PIC.DES_SPtrans-1f),global1
|
||||
or global1,%lo(.PIC.DES_SPtrans-1f),global1
|
||||
1: call .+8
|
||||
add %o7,global1,global1
|
||||
sub global1,.PIC.DES_SPtrans-.des_and,out2
|
||||
|
||||
ld [in0], in5 ! left
|
||||
add in3, 120, in4 ! ks3
|
||||
@ -1425,19 +1437,6 @@ DES_decrypt3:
|
||||
.DES_decrypt3.end:
|
||||
.size DES_decrypt3,.DES_decrypt3.end-DES_decrypt3
|
||||
|
||||
! input: out0 offset between .PIC.me.up and caller
|
||||
! output: out0 pointer to .PIC.me.up
|
||||
! out2 pointer to .des_and
|
||||
! global1 pointer to DES_SPtrans
|
||||
.align 32
|
||||
.PIC.me.up:
|
||||
add out0,%o7,out0 ! pointer to .PIC.me.up
|
||||
sethi %hi(.des_and-.PIC.me.up),out2
|
||||
or out2,%lo(.des_and-.PIC.me.up),out2
|
||||
add out0,out2,out2
|
||||
retl
|
||||
add out2,.PIC.DES_SPtrans-.des_and,global1
|
||||
|
||||
! void DES_ncbc_encrypt(input, output, length, schedule, ivec, enc)
|
||||
! *****************************************************************
|
||||
|
||||
@ -1454,8 +1453,11 @@ DES_ncbc_encrypt:
|
||||
define({OUTPUT}, { [%sp+BIAS+ARG0+1*ARGSZ] })
|
||||
define({IVEC}, { [%sp+BIAS+ARG0+4*ARGSZ] })
|
||||
|
||||
call .PIC.me.up
|
||||
mov .PIC.me.up-(.-4),out0
|
||||
sethi %hi(.PIC.DES_SPtrans-1f),global1
|
||||
or global1,%lo(.PIC.DES_SPtrans-1f),global1
|
||||
1: call .+8
|
||||
add %o7,global1,global1
|
||||
sub global1,.PIC.DES_SPtrans-.des_and,out2
|
||||
|
||||
cmp in5, 0 ! enc
|
||||
|
||||
@ -1676,8 +1678,11 @@ DES_ede3_cbc_encrypt:
|
||||
define({KS2}, { [%sp+BIAS+ARG0+4*ARGSZ] })
|
||||
define({KS3}, { [%sp+BIAS+ARG0+5*ARGSZ] })
|
||||
|
||||
call .PIC.me.up
|
||||
mov .PIC.me.up-(.-4),out0
|
||||
sethi %hi(.PIC.DES_SPtrans-1f),global1
|
||||
or global1,%lo(.PIC.DES_SPtrans-1f),global1
|
||||
1: call .+8
|
||||
add %o7,global1,global1
|
||||
sub global1,.PIC.DES_SPtrans-.des_and,out2
|
||||
|
||||
LDPTR [%fp+BIAS+ARG0+7*ARGSZ], local3 ! enc
|
||||
LDPTR [%fp+BIAS+ARG0+6*ARGSZ], local4 ! ivec
|
||||
|
Loading…
Reference in New Issue
Block a user