[compiler-rt] [llvm] [AArch64] Implement INIT/ADJUST_TRAMPOLINE (PR #70267)
David Truby via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 08:03:52 PDT 2024
================
@@ -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.");
----------------
DavidTruby wrote:
I think it does yes. We should probably assert on this on Windows and macOS for now to prevent generating bad code there.
https://github.com/llvm/llvm-project/pull/70267
More information about the llvm-commits
mailing list