Add an ifcmp_sp instruction.
This will be used to implement the stack_check macro.
This commit is contained in:
@@ -947,6 +947,7 @@ The prologue and epilogue of a function needs to manipulate special registers li
|
|||||||
pointer and the frame pointer. These instructions should not be used in regular code.
|
pointer and the frame pointer. These instructions should not be used in regular code.
|
||||||
|
|
||||||
.. autoinst:: adjust_sp_imm
|
.. autoinst:: adjust_sp_imm
|
||||||
|
.. autoinst:: ifcmp_sp
|
||||||
.. autoinst:: copy_special
|
.. autoinst:: copy_special
|
||||||
|
|
||||||
.. _extload-truncstore:
|
.. _extload-truncstore:
|
||||||
|
|||||||
@@ -579,6 +579,17 @@ adjust_sp_imm = Instruction(
|
|||||||
ins=(StackOffset,),
|
ins=(StackOffset,),
|
||||||
other_side_effects=True)
|
other_side_effects=True)
|
||||||
|
|
||||||
|
f = Operand('f', iflags)
|
||||||
|
|
||||||
|
ifcmp_sp = Instruction(
|
||||||
|
'ifcmp_sp', r"""
|
||||||
|
Compare ``addr`` with the stack pointer and set the CPU flags.
|
||||||
|
|
||||||
|
This is like :inst:`ifcmp` where ``addr`` is the LHS operand and the stack
|
||||||
|
pointer is the RHS.
|
||||||
|
""",
|
||||||
|
ins=addr, outs=f)
|
||||||
|
|
||||||
regspill = Instruction(
|
regspill = Instruction(
|
||||||
'regspill', r"""
|
'regspill', r"""
|
||||||
Temporarily divert ``x`` from ``src`` to ``SS``.
|
Temporarily divert ``x`` from ``src`` to ``SS``.
|
||||||
|
|||||||
Reference in New Issue
Block a user