[pypy-commit] pypy arm64: remove small constant and use BL instead of B
fijal
pypy.commits at gmail.com
Sun Jul 14 03:40:26 EDT 2019
Author: fijal
Branch: arm64
Changeset: r96982:79faaac359a0
Date: 2019-07-14 09:39 +0200
http://bitbucket.org/pypy/pypy/changeset/79faaac359a0/
Log: remove small constant and use BL instead of B
diff --git a/rpython/jit/backend/aarch64/assembler.py b/rpython/jit/backend/aarch64/assembler.py
--- a/rpython/jit/backend/aarch64/assembler.py
+++ b/rpython/jit/backend/aarch64/assembler.py
@@ -1073,17 +1073,14 @@
self.mc.gen_load_int(r.ip1.value, lengthaddr) # load ip1, lengh
self.mc.LDR_ri(r.ip1.value, r.ip1.value, 0) # ldr ip1, *lengh
# calculate ofs
- # note that we use a small constant here, because in unlikely circumstances,
- # the LL_stack_too_big is called with some stack consumed so it goes *just*
- # past that and the check is below 0
- self.mc.SUB_ri(r.ip0.value, r.sp.value, 4095) # ip0 = sp - small_const,
+ self.mc.SUB_ri(r.ip0.value, r.sp.value, 0) # ip0 = sp
# otherwise we can't use sp
self.mc.SUB_rr(r.lr.value, r.lr.value, r.ip0.value) # lr = lr - ip0
# if ofs
self.mc.CMP_rr(r.lr.value, r.ip1.value) # CMP ip0, ip1
pos = self.mc.currpos()
self.mc.BRK()
- self.mc.B(self.stack_check_slowpath) # call if ip0 > ip1
+ self.mc.BL(self.stack_check_slowpath) # call if ip0 > ip1
pmc = OverwritingBuilder(self.mc, pos, WORD)
pmc.B_ofs_cond(self.mc.currpos() - pos, c.LS)
More information about the pypy-commit
mailing list