ack/mach/vax4/libem/lpb.s

28 lines
871 B
ArmAsm
Raw Permalink Normal View History

1990-01-12 10:29:26 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.define .lpb
1994-06-24 14:02:31 +00:00
! $Id$
1990-01-12 10:29:26 +00:00
! special version to work with A68S, by CHL
! compute AB, given LB
1985-01-18 14:30:03 +00:00
.lpb:
cmpl r0,fp
1990-01-12 10:29:26 +00:00
bneq I1
1985-01-18 14:30:03 +00:00
moval 4(ap),r0
rsb
1990-01-12 10:29:26 +00:00
I1:
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
I2:
subl3 r2,$28,r3 ! remaining size of mask
ffs r2,r3,r1,r2 ! find first bit set in mask
beql I3 ! no more bits set
addl2 $4,r0 ! for each saved register
1988-10-04 13:59:51 +00:00
incl r2
1990-01-12 10:29:26 +00:00
jbr I2
I3:
extzv $30,$2,r1,r2 ! Now find out about the stack alignment
! between fp and ap
addl2 r2,r0 ! add alignment
1988-10-04 13:59:51 +00:00
rsb