1990-01-12 10:29:26 +00:00
|
|
|
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
|
|
|
|
.define .strlb
|
|
|
|
|
1994-06-24 14:02:31 +00:00
|
|
|
! $Id$
|
1990-01-12 10:29:26 +00:00
|
|
|
! revised version by CHL
|
|
|
|
! Store the value that is on the stack in fp.
|
|
|
|
! Compute ap.
|
1985-01-18 14:30:03 +00:00
|
|
|
.strlb:
|
|
|
|
movl (sp)+,r3
|
|
|
|
movl (sp)+,fp
|
|
|
|
pushl r3
|
1990-01-12 10:29:26 +00:00
|
|
|
movl $20,ap ! Compute argumentbase from local base.
|
|
|
|
! Distance is 5 longwords + the number of
|
|
|
|
! registers saved.
|
|
|
|
movl 4(fp),r3 ! mask for saved registers
|
|
|
|
movl $16,r2 ! position of first bit to test
|
|
|
|
I4:
|
|
|
|
subl3 r2,$28,r1 ! remaining size of mask
|
|
|
|
ffs r2,r1,r3,r2 ! find first bit set in mask
|
|
|
|
beql I5 ! no more bits set
|
|
|
|
addl2 $4,ap ! for each saved register
|
1988-10-04 13:59:51 +00:00
|
|
|
incl r2
|
1990-01-12 10:29:26 +00:00
|
|
|
jbr I4
|
|
|
|
I5:
|
|
|
|
extzv $14,$2,6(fp),r3 ! Now find out about the stack alignment
|
|
|
|
! between fp and ap
|
|
|
|
addl2 r3,ap ! add alignment
|
1985-01-18 14:30:03 +00:00
|
|
|
addl2 fp,ap
|
|
|
|
rsb
|