1985-01-18 14:30:03 +00:00
|
|
|
# $Header$
|
1988-10-04 13:59:51 +00:00
|
|
|
# special version to work with A68S, by CHL
|
1985-01-18 14:30:03 +00:00
|
|
|
.globl .lpb
|
1988-10-04 13:59:51 +00:00
|
|
|
# compute AB, given LB
|
1985-01-18 14:30:03 +00:00
|
|
|
.lpb:
|
|
|
|
cmpl r0,fp
|
|
|
|
bneq L1
|
|
|
|
moval 4(ap),r0
|
|
|
|
rsb
|
|
|
|
L1:
|
1988-10-04 13:59:51 +00:00
|
|
|
movl 4(r0),r1 # mask for saved registers
|
|
|
|
addl2 $24,r0 # position of AB if no registers saved
|
|
|
|
movl $16,r2 # position of first bit to test
|
1985-01-18 14:30:03 +00:00
|
|
|
L2:
|
1988-10-04 13:59:51 +00:00
|
|
|
subl3 r2,$28,r3 # remaining size of mask
|
|
|
|
ffs r2,r3,r1,r2 # find first bit set in mask
|
|
|
|
beql L3 # no more bits set
|
|
|
|
addl2 $4,r0 # for each saved register
|
|
|
|
incl r2
|
|
|
|
jbr L2
|
1985-01-18 14:30:03 +00:00
|
|
|
L3:
|
1988-10-04 13:59:51 +00:00
|
|
|
extzv $30,$2,r1,r2 # Now find out about the stack alignment
|
|
|
|
# between fp and ap
|
|
|
|
addl2 r2,r0 # add alignment
|
|
|
|
rsb
|