Add adjust_sp_imm instruction. Note: This enables using rsp and rbp as normal registers. Which is... wrong.
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
32509ebacd
commit
ffab87318e
@@ -241,6 +241,7 @@ pub enum InstructionData {
|
||||
src: RegUnit,
|
||||
dst: RegUnit,
|
||||
},
|
||||
AdjustSpImm { opcode: Opcode, offset: Offset32 },
|
||||
RegSpill {
|
||||
opcode: Opcode,
|
||||
arg: Value,
|
||||
|
||||
@@ -140,8 +140,8 @@ pub fn allocatable_registers(
|
||||
flags: &shared_settings::Flags,
|
||||
) -> AllocatableSet {
|
||||
let mut regs = AllocatableSet::new();
|
||||
regs.take(GPR, RU::rsp as RegUnit);
|
||||
regs.take(GPR, RU::rbp as RegUnit);
|
||||
//regs.take(GPR, RU::rsp as RegUnit);
|
||||
//regs.take(GPR, RU::rbp as RegUnit);
|
||||
|
||||
// 32-bit arch only has 8 registers.
|
||||
if !flags.is_64bit() {
|
||||
|
||||
@@ -359,6 +359,7 @@ impl<'a> Verifier<'a> {
|
||||
Store { .. } |
|
||||
RegMove { .. } |
|
||||
CopySpecial { .. } |
|
||||
AdjustSpImm { .. } |
|
||||
Trap { .. } |
|
||||
CondTrap { .. } |
|
||||
NullAry { .. } => {}
|
||||
|
||||
@@ -407,6 +407,7 @@ pub fn write_operands(
|
||||
write!(w, " %{} -> %{}", src, dst)
|
||||
}
|
||||
}
|
||||
AdjustSpImm { offset, .. } => write!(w, " {}", offset),
|
||||
RegSpill { arg, src, dst, .. } => {
|
||||
if let Some(isa) = isa {
|
||||
let regs = isa.register_info();
|
||||
|
||||
Reference in New Issue
Block a user