SPARC Solaris and Linux assemblers treat .align directive differently.
PR: 1547
This commit is contained in:
parent
206a975752
commit
2329694222
@ -260,24 +260,25 @@ $fname:
|
|||||||
|
|
||||||
srl $npj,30,%o0 ! boundary condition...
|
srl $npj,30,%o0 ! boundary condition...
|
||||||
brz,pn %o0,.Lcopy ! ... is met
|
brz,pn %o0,.Lcopy ! ... is met
|
||||||
subcc %g0,%g0,%g0 ! clear %icc.c
|
nop
|
||||||
|
|
||||||
.align 16,0x1000000
|
ba .Lsub
|
||||||
|
subcc %g0,%g0,%g0 ! clear %icc.c
|
||||||
|
.align 16
|
||||||
.Lsub:
|
.Lsub:
|
||||||
ld [$tp+%o7],%o0
|
ld [$tp+%o7],%o0
|
||||||
ld [$np+%o7],%o1
|
ld [$np+%o7],%o1
|
||||||
subccc %o0,%o1,%o1 ! tp[j]-np[j]
|
subccc %o0,%o1,%o1 ! tp[j]-np[j]
|
||||||
st %o1,[$rp+%o7]
|
add $rp,%o7,$i
|
||||||
add %o7,4,%o7
|
add %o7,4,%o7
|
||||||
brnz %o7,.Lsub
|
brnz %o7,.Lsub
|
||||||
nop
|
st %o1,[$i]
|
||||||
subc $car2,0,$car2 ! handle upmost overflow bit
|
subc $car2,0,$car2 ! handle upmost overflow bit
|
||||||
and $tp,$car2,$ap
|
and $tp,$car2,$ap
|
||||||
andn $rp,$car2,$np
|
andn $rp,$car2,$np
|
||||||
or $ap,$np,$ap
|
or $ap,$np,$ap
|
||||||
sub %g0,$num,%o7
|
sub %g0,$num,%o7
|
||||||
|
|
||||||
.align 16,0x1000000
|
|
||||||
.Lcopy:
|
.Lcopy:
|
||||||
ld [$ap+%o7],%o0 ! copy or in-place refresh
|
ld [$ap+%o7],%o0 ! copy or in-place refresh
|
||||||
st %g0,[$tp+%o7] ! zap tp
|
st %g0,[$tp+%o7] ! zap tp
|
||||||
@ -603,6 +604,7 @@ $code.=<<___;
|
|||||||
.type $fname,#function
|
.type $fname,#function
|
||||||
.size $fname,(.-$fname)
|
.size $fname,(.-$fname)
|
||||||
.asciz "Montgomery Multipltication for SPARCv9, CRYPTOGAMS by <appro\@openssl.org>"
|
.asciz "Montgomery Multipltication for SPARCv9, CRYPTOGAMS by <appro\@openssl.org>"
|
||||||
|
.align 32
|
||||||
___
|
___
|
||||||
$code =~ s/\`([^\`]*)\`/eval($1)/gem;
|
$code =~ s/\`([^\`]*)\`/eval($1)/gem;
|
||||||
print $code;
|
print $code;
|
||||||
|
@ -353,7 +353,7 @@ $fname:
|
|||||||
bz,pn %icc,.L1stskip
|
bz,pn %icc,.L1stskip
|
||||||
std $nlod,[%sp+$bias+$frame+24]
|
std $nlod,[%sp+$bias+$frame+24]
|
||||||
|
|
||||||
.align 32,0x1000000
|
.align 32 ! incidentally already aligned !
|
||||||
.L1st:
|
.L1st:
|
||||||
add $ap,$j,%o4
|
add $ap,$j,%o4
|
||||||
add $np,$j,%o5
|
add $np,$j,%o5
|
||||||
@ -805,8 +805,10 @@ $fname:
|
|||||||
orn %g0,%g0,%g4
|
orn %g0,%g0,%g4
|
||||||
brz,pn %o1,.Lcopy ! ... is met
|
brz,pn %o1,.Lcopy ! ... is met
|
||||||
sub %g0,$num,%o7 ! n=-num
|
sub %g0,$num,%o7 ! n=-num
|
||||||
|
ba .Lsub
|
||||||
|
nop
|
||||||
|
|
||||||
.align 32,0x1000000
|
.align 32
|
||||||
.Lsub:
|
.Lsub:
|
||||||
ldx [$tp+%o7],%o0
|
ldx [$tp+%o7],%o0
|
||||||
add $np,%o7,%g1
|
add $np,%o7,%g1
|
||||||
@ -822,8 +824,10 @@ $fname:
|
|||||||
st %o3,[%g1+4]
|
st %o3,[%g1+4]
|
||||||
subc $carry,0,%g4
|
subc $carry,0,%g4
|
||||||
sub %g0,$num,%o7 ! n=-num
|
sub %g0,$num,%o7 ! n=-num
|
||||||
|
ba .Lcopy
|
||||||
|
nop
|
||||||
|
|
||||||
.align 32,0x1000000
|
.align 32
|
||||||
.Lcopy:
|
.Lcopy:
|
||||||
ldx [$tp+%o7],%o0
|
ldx [$tp+%o7],%o0
|
||||||
add $rp,%o7,%g1
|
add $rp,%o7,%g1
|
||||||
@ -842,7 +846,6 @@ $fname:
|
|||||||
st %o1,[%g1+4]
|
st %o1,[%g1+4]
|
||||||
sub %g0,$num,%o7 ! n=-num
|
sub %g0,$num,%o7 ! n=-num
|
||||||
|
|
||||||
.align 32,0x1000000
|
|
||||||
.Lzap:
|
.Lzap:
|
||||||
stx %g0,[$ap_l+%o7]
|
stx %g0,[$ap_l+%o7]
|
||||||
stx %g0,[$ap_h+%o7]
|
stx %g0,[$ap_h+%o7]
|
||||||
@ -862,6 +865,7 @@ $fname:
|
|||||||
.type $fname,#function
|
.type $fname,#function
|
||||||
.size $fname,(.-$fname)
|
.size $fname,(.-$fname)
|
||||||
.asciz "Montgomery Multipltication for UltraSPARC, CRYPTOGAMS by <appro\@openssl.org>"
|
.asciz "Montgomery Multipltication for UltraSPARC, CRYPTOGAMS by <appro\@openssl.org>"
|
||||||
|
.align 32
|
||||||
___
|
___
|
||||||
|
|
||||||
$code =~ s/\`([^\`]*)\`/eval($1)/gem;
|
$code =~ s/\`([^\`]*)\`/eval($1)/gem;
|
||||||
|
Loading…
Reference in New Issue
Block a user