AArch64: Migrate calls and returns to ISLE. (#4788)
This commit is contained in:
@@ -2940,8 +2940,8 @@
|
||||
(rule (abi_ext_ty (ArgumentExtension.Sext) _) $I64)
|
||||
|
||||
;; Copy a return value to a set of registers.
|
||||
(decl copy_to_regs (WritableValueRegs Value) Unit)
|
||||
(rule (copy_to_regs (only_writable_reg reg) val @ (value_type ty))
|
||||
(decl s390x_copy_to_regs (WritableValueRegs Value) Unit)
|
||||
(rule (s390x_copy_to_regs (only_writable_reg reg) val @ (value_type ty))
|
||||
(emit_mov ty reg val))
|
||||
|
||||
|
||||
|
||||
@@ -4047,13 +4047,13 @@
|
||||
;;;; Rules for `return` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (return args))
|
||||
(lower_return (range 0 (value_slice_len args)) args))
|
||||
(s390x_lower_return (range 0 (value_slice_len args)) args))
|
||||
|
||||
(decl lower_return (Range ValueSlice) InstOutput)
|
||||
(rule (lower_return (range_empty) _) (output_none))
|
||||
(rule (lower_return (range_unwrap head tail) args)
|
||||
(let ((_ Unit (copy_to_regs (retval head) (value_slice_get args head))))
|
||||
(lower_return tail args)))
|
||||
(decl s390x_lower_return (Range ValueSlice) InstOutput)
|
||||
(rule (s390x_lower_return (range_empty) _) (output_none))
|
||||
(rule (s390x_lower_return (range_unwrap head tail) args)
|
||||
(let ((_ Unit (s390x_copy_to_regs (retval head) (value_slice_get args head))))
|
||||
(s390x_lower_return tail args)))
|
||||
|
||||
|
||||
;;;; Rules for `call` and `call_indirect` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{
|
||||
isa::unwind::UnwindInst,
|
||||
isa::CallConv,
|
||||
machinst::abi_impl::ABIMachineSpec,
|
||||
machinst::{InsnOutput, Lower, VCodeConstant, VCodeConstantData},
|
||||
machinst::{InsnOutput, Lower, MachInst, VCodeConstant, VCodeConstantData},
|
||||
};
|
||||
use regalloc2::PReg;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
Reference in New Issue
Block a user