diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2022-08-05 11:05:20 -0400 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-08-29 08:47:07 -0700 |
commit | e24037267f5912814dff463bccc618deacefd529 (patch) | |
tree | 0b3812c1c3668b4b178436536103164cc4b88845 /yjit/src/backend/x86_64 | |
parent | d131b410259bef45757e4bec02c9c62c88033fc8 (diff) | |
download | ruby-e24037267f5912814dff463bccc618deacefd529.tar.gz |
Add Opnd::None error message to x86 backend as well
Diffstat (limited to 'yjit/src/backend/x86_64')
-rw-r--r-- | yjit/src/backend/x86_64/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yjit/src/backend/x86_64/mod.rs b/yjit/src/backend/x86_64/mod.rs index d1f1698b2f..696846d2a8 100644 --- a/yjit/src/backend/x86_64/mod.rs +++ b/yjit/src/backend/x86_64/mod.rs @@ -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") } } |