Add adjust_sp_imm instruction. Note: This enables using rsp and rbp as normal registers. Which is... wrong.

This commit is contained in:
Tyler McMullen
2017-11-27 15:32:28 -08:00
committed by Jakob Stoklund Olesen
parent 32509ebacd
commit ffab87318e
9 changed files with 32 additions and 4 deletions

View File

@@ -69,6 +69,7 @@ RegSpill = InstructionFormat(
VALUE, ('src', regunit), ('dst', entities.stack_slot))
RegFill = InstructionFormat(
VALUE, ('src', entities.stack_slot), ('dst', regunit))
AdjustSpImm = InstructionFormat(offset32)
Trap = InstructionFormat(trapcode)
CondTrap = InstructionFormat(VALUE, trapcode)

View File

@@ -544,6 +544,14 @@ copy_special = Instruction(
ins=(src, dst),
other_side_effects=True)
Offset = Operand('Offset', offset32, 'Offset from current stack pointer')
adjust_sp_imm = Instruction(
'adjust_sp_imm', r"""
Adds an immediate offset value to the stack pointer register.
""",
ins=(Offset,),
other_side_effects=True)
regspill = Instruction(
'regspill', r"""
Temporarily divert ``x`` from ``src`` to ``SS``.