Add copy_special instruction.

This commit is contained in:
Tyler McMullen
2017-11-22 19:18:11 -08:00
committed by Jakob Stoklund Olesen
parent 8ed37e352e
commit cdf70ccb77
6 changed files with 36 additions and 0 deletions

View File

@@ -236,6 +236,11 @@ pub enum InstructionData {
src: RegUnit,
dst: RegUnit,
},
CopySpecial {
opcode: Opcode,
src: RegUnit,
dst: RegUnit,
},
RegSpill {
opcode: Opcode,
arg: Value,

View File

@@ -358,6 +358,7 @@ impl<'a> Verifier<'a> {
Load { .. } |
Store { .. } |
RegMove { .. } |
CopySpecial { .. } |
Trap { .. } |
CondTrap { .. } |
NullAry { .. } => {}

View File

@@ -394,6 +394,19 @@ pub fn write_operands(
write!(w, " {}, %{} -> %{}", arg, src, dst)
}
}
CopySpecial { src, dst, .. } => {
if let Some(isa) = isa {
let regs = isa.register_info();
write!(
w,
" {} -> {}",
regs.display_regunit(src),
regs.display_regunit(dst)
)
} else {
write!(w, " %{} -> %{}", src, dst)
}
}
RegSpill { arg, src, dst, .. } => {
if let Some(isa) = isa {
let regs = isa.register_info();