some mods from Charles Lindsey
This commit is contained in:
parent
e1b871a6ea
commit
a54c470fef
|
@ -1,18 +1,25 @@
|
||||||
# $Header$
|
# $Header$
|
||||||
|
# special version to work with A68S, by CHL
|
||||||
.globl .lpb
|
.globl .lpb
|
||||||
|
# compute AB, given LB
|
||||||
.lpb:
|
.lpb:
|
||||||
cmpl r0,fp
|
cmpl r0,fp
|
||||||
bneq L1
|
bneq L1
|
||||||
moval 4(ap),r0
|
moval 4(ap),r0
|
||||||
rsb
|
rsb
|
||||||
L1:
|
L1:
|
||||||
movl fp,r1
|
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
|
||||||
L2:
|
L2:
|
||||||
cmpl 12(r1),r0
|
subl3 r2,$28,r3 # remaining size of mask
|
||||||
beql L3
|
ffs r2,r3,r1,r2 # find first bit set in mask
|
||||||
movl 12(r1),r1
|
beql L3 # no more bits set
|
||||||
jbr L2
|
addl2 $4,r0 # for each saved register
|
||||||
|
incl r2
|
||||||
|
jbr L2
|
||||||
L3:
|
L3:
|
||||||
addl3 $4,8(r1),r0 # Argument Base = ap + 4
|
extzv $30,$2,r1,r2 # Now find out about the stack alignment
|
||||||
rsb
|
# between fp and ap
|
||||||
|
addl2 r2,r0 # add alignment
|
||||||
|
rsb
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# $Header$
|
# $Header$
|
||||||
|
# revised version by CHL
|
||||||
.globl .strlb
|
.globl .strlb
|
||||||
# Store the value that is on the stack in fp.
|
# Store the value that is on the stack in fp.
|
||||||
# Compute ap.
|
# Compute ap.
|
||||||
|
@ -9,16 +10,16 @@
|
||||||
movl $20,ap # Compute argumentbase from local base.
|
movl $20,ap # Compute argumentbase from local base.
|
||||||
# Distance is 5 longwords + the number of
|
# Distance is 5 longwords + the number of
|
||||||
# registers saved.
|
# registers saved.
|
||||||
movl $1,r3 # Now check register save mask
|
movl 4(fp),r3 # mask for saved registers
|
||||||
movl $12,r2
|
movl $16,r2 # position of first bit to test
|
||||||
L1:
|
L4:
|
||||||
bitl r3,6(fp)
|
subl3 r2,$28,r1 # remaining size of mask
|
||||||
beql L2
|
ffs r2,r1,r3,r2 # find first bit set in mask
|
||||||
addl2 $4,ap # Add 1 longword for each register saved
|
beql L5 # no more bits set
|
||||||
L2:
|
addl2 $4,ap # for each saved register
|
||||||
ashl $1,r3,r3
|
incl r2
|
||||||
sobgeq r2,L1
|
jbr L4
|
||||||
|
L5:
|
||||||
extzv $14,$2,6(fp),r3 # Now find out about the stack alignment
|
extzv $14,$2,6(fp),r3 # Now find out about the stack alignment
|
||||||
# between fp and ap
|
# between fp and ap
|
||||||
addl2 r3,ap # add alignment
|
addl2 r3,ap # add alignment
|
||||||
|
|
Loading…
Reference in a new issue