[llvm] [compiler-rt] [AArch64] Implement INIT/ADJUST_TRAMPOLINE (PR #70267)
Carlos Eduardo Seo via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 31 11:33:54 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.");
----------------
ceseo wrote:
Also, something just came to my mind. This kind of trampoline for nested function calls requires executable stack. Doesn't DEP block that on Windows?
https://github.com/llvm/llvm-project/pull/70267
More information about the llvm-commits
mailing list