зеркало из https://github.com/github/ruby.git
Add Opnd::None error message to x86 backend as well
This commit is contained in:
Родитель
d131b41025
Коммит
e24037267f
|
@ -50,8 +50,11 @@ impl From<Opnd> for A64Opnd {
|
|||
panic!("attempted to lower an Opnd::Mem with a MemBase::InsnOut base")
|
||||
},
|
||||
Opnd::InsnOut { .. } => panic!("attempted to lower an Opnd::InsnOut"),
|
||||
Opnd::None => panic!("attempted to lower an Opnd::None"),
|
||||
Opnd::Value(_) => panic!("attempted to lower an Opnd::Value"),
|
||||
Opnd::None => panic!(
|
||||
"Attempted to lower an Opnd::None. This often happens when an out operand was not allocated for an instruction because the output of the instruction was not used. Please ensure you are using the output."
|
||||
),
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,8 +40,6 @@ impl From<Opnd> for X86Opnd {
|
|||
|
||||
Opnd::InsnOut{..} => panic!("InsnOut operand made it past register allocation"),
|
||||
|
||||
Opnd::None => X86Opnd::None,
|
||||
|
||||
Opnd::UImm(val) => uimm_opnd(val),
|
||||
Opnd::Imm(val) => imm_opnd(val),
|
||||
Opnd::Value(VALUE(uimm)) => uimm_opnd(uimm as u64),
|
||||
|
@ -60,6 +58,10 @@ impl From<Opnd> for X86Opnd {
|
|||
mem_opnd(num_bits, X86Opnd::Reg(reg), disp)
|
||||
}
|
||||
|
||||
Opnd::None => panic!(
|
||||
"Attempted to lower an Opnd::None. This often happens when an out operand was not allocated for an instruction because the output of the instruction was not used. Please ensure you are using the output."
|
||||
),
|
||||
|
||||
_ => panic!("unsupported x86 operand type")
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче