x64: Migrate the return and fallthrough_return lowerings to ISLE (#4518)
https://github.com/bytecodealliance/wasmtime/pull/4518
This commit is contained in:
@@ -923,29 +923,12 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
|
||||
| Opcode::AtomicStore
|
||||
| Opcode::Fence
|
||||
| Opcode::FuncAddr
|
||||
| Opcode::SymbolValue => {
|
||||
| Opcode::SymbolValue
|
||||
| Opcode::FallthroughReturn
|
||||
| Opcode::Return => {
|
||||
implemented_in_isle(ctx);
|
||||
}
|
||||
|
||||
Opcode::FallthroughReturn | Opcode::Return => {
|
||||
for i in 0..ctx.num_inputs(insn) {
|
||||
let src_reg = put_input_in_regs(ctx, inputs[i]);
|
||||
let retval_reg = ctx.retval(i);
|
||||
let ty = ctx.input_ty(insn, i);
|
||||
assert!(src_reg.len() == retval_reg.len());
|
||||
let (_, tys) = Inst::rc_for_type(ty)?;
|
||||
for ((&src, &dst), &ty) in src_reg
|
||||
.regs()
|
||||
.iter()
|
||||
.zip(retval_reg.regs().iter())
|
||||
.zip(tys.iter())
|
||||
{
|
||||
ctx.emit(Inst::gen_move(dst, src, ty));
|
||||
}
|
||||
}
|
||||
// N.B.: the Ret itself is generated by the ABI.
|
||||
}
|
||||
|
||||
Opcode::Call | Opcode::CallIndirect => {
|
||||
let caller_conv = ctx.abi().call_conv();
|
||||
let (mut abi, inputs) = match op {
|
||||
|
||||
Reference in New Issue
Block a user