Fix up adjust_sp_imm instruction.
* Use imm64 rather than offset32 * Add predicate to enforce signed 32-bit limit to imm * Remove AdjustSpImm format * Add encoding tests for adjust_sp_imm * Adjust use of adjust_sp_imm in Intel prologue_epilogue to match
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
1a11c351b5
commit
ced39f5186
@@ -69,7 +69,6 @@ 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)
|
||||
|
||||
@@ -549,12 +549,16 @@ copy_special = Instruction(
|
||||
ins=(src, dst),
|
||||
other_side_effects=True)
|
||||
|
||||
Offset = Operand('Offset', offset32, 'Offset from current stack pointer')
|
||||
StackOffset = Operand('Offset', imm64, 'Offset from current stack pointer')
|
||||
adjust_sp_imm = Instruction(
|
||||
'adjust_sp_imm', r"""
|
||||
Adds an immediate offset value to the stack pointer register.
|
||||
Adds ``Offset`` immediate offset value to the stack pointer register.
|
||||
|
||||
This instruction is used to adjust the stack pointer, primarily in function
|
||||
prologues and epilogues. ``Offset`` is constrained to the size of a signed
|
||||
32-bit integer.
|
||||
""",
|
||||
ins=(Offset,),
|
||||
ins=(StackOffset,),
|
||||
other_side_effects=True)
|
||||
|
||||
regspill = Instruction(
|
||||
|
||||
Reference in New Issue
Block a user