[compiler-rt] [AArch64] Implement INIT/ADJUST_TRAMPOLINE (PR #70267)
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 11:19:43 PDT 2023
================
@@ -5946,6 +5946,56 @@ static SDValue LowerFLDEXP(SDValue Op, SelectionDAG &DAG) {
return Final;
}
+SDValue AArch64TargetLowering::LowerADJUST_TRAMPOLINE(SDValue Op,
+ SelectionDAG &DAG) const {
+ // Note: x18 cannot be used for the Nest parameter on Windows and macOS.
+ if (Subtarget->isTargetDarwin() || Subtarget->isTargetWindows())
+ report_fatal_error(
+ "ADJUST_TRAMPOLINE operation is only supported on Linux.");
+
+ return Op.getOperand(0);
+}
+
+SDValue AArch64TargetLowering::LowerINIT_TRAMPOLINE(SDValue Op,
+ SelectionDAG &DAG) const {
+
+ // Note: x18 cannot be used for the Nest parameter on Windows and macOS.
+ if (Subtarget->isTargetDarwin() || Subtarget->isTargetWindows())
+ report_fatal_error("INIT_TRAMPOLINE operation is only supported on Linux.");
----------------
compnerd wrote:
Windows ARM64 supports x16, x17 as intra-procedural scratch. AIUI, GCC does not have `__trampoline_setup` for ARM64, and so, I would say that we should try to adjust the ABI here to make this possible to use on Windows as well. Is this currently defined in an accepted specification or is this an extension being added?
https://github.com/llvm/llvm-project/pull/70267
More information about the llvm-commits
mailing list