cranelift: Remove const_addr instruction (fixes #2398) (#4843)

This commit is contained in:
Jamey Sharp
2022-09-01 14:57:37 -07:00
committed by GitHub
parent ae5fe8a728
commit 84ac24c23d
5 changed files with 2 additions and 21 deletions

View File

@@ -1455,21 +1455,6 @@ pub(crate) fn define(
.operands_out(vec![a]), .operands_out(vec![a]),
); );
let constant =
&Operand::new("constant", &imm.pool_constant).with_doc("A constant in the constant pool");
let address = &Operand::new("address", iAddr);
ig.push(
Inst::new(
"const_addr",
r#"
Calculate the base address of a value in the constant pool.
"#,
&formats.unary_const,
)
.operands_in(vec![constant])
.operands_out(vec![address]),
);
let mask = &Operand::new("mask", &imm.uimm128) let mask = &Operand::new("mask", &imm.uimm128)
.with_doc("The 16 immediate bytes used for selecting the elements to shuffle"); .with_doc("The 16 immediate bytes used for selecting the elements to shuffle");
let Tx16 = &TypeVar::new( let Tx16 = &TypeVar::new(

View File

@@ -471,7 +471,7 @@ pub(crate) fn lower_insn_to_regs(
Opcode::ExtractVector => implemented_in_isle(ctx), Opcode::ExtractVector => implemented_in_isle(ctx),
Opcode::ConstAddr | Opcode::Vconcat | Opcode::Vsplit => { Opcode::Vconcat | Opcode::Vsplit => {
return Err(CodegenError::Unsupported(format!( return Err(CodegenError::Unsupported(format!(
"Unimplemented lowering: {}", "Unimplemented lowering: {}",
op op

View File

@@ -200,8 +200,7 @@ impl LowerBackend for S390xBackend {
) )
} }
Opcode::ConstAddr Opcode::GetPinnedReg
| Opcode::GetPinnedReg
| Opcode::SetPinnedReg | Opcode::SetPinnedReg
| Opcode::Vsplit | Opcode::Vsplit
| Opcode::Vconcat | Opcode::Vconcat

View File

@@ -503,8 +503,6 @@ fn lower_insn_to_regs(
Opcode::Trueif | Opcode::Trueff => unimplemented!("trueif / trueff not implemented"), Opcode::Trueif | Opcode::Trueff => unimplemented!("trueif / trueff not implemented"),
Opcode::ConstAddr => unimplemented!("ConstAddr not implemented"),
Opcode::Vsplit | Opcode::Vconcat => { Opcode::Vsplit | Opcode::Vconcat => {
unimplemented!("Vector split/concat ops not implemented."); unimplemented!("Vector split/concat ops not implemented.");
} }

View File

@@ -533,7 +533,6 @@ where
Opcode::F64const => assign(imm()), Opcode::F64const => assign(imm()),
Opcode::Bconst => assign(imm()), Opcode::Bconst => assign(imm()),
Opcode::Vconst => assign(imm()), Opcode::Vconst => assign(imm()),
Opcode::ConstAddr => unimplemented!("ConstAddr"),
Opcode::Null => unimplemented!("Null"), Opcode::Null => unimplemented!("Null"),
Opcode::Nop => ControlFlow::Continue, Opcode::Nop => ControlFlow::Continue,
Opcode::Select => choose(arg(0)?.into_bool()?, arg(1)?, arg(2)?), Opcode::Select => choose(arg(0)?.into_bool()?, arg(1)?, arg(2)?),