[PATCH] D73805: [AArch64] Provide Darwin variants of most calling conventions

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 10:12:02 PST 2020


paquette added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp:152
+  assert(!MF.getFunction().hasFnAttribute(Attribute::ShadowCallStack) &&
+         "ShadowCallStack attribute not supported on Darwin.");
+
----------------
I feel like it's weird that this is an assert. Feels more like a fatal_error, since I think it should be surfaced to the user, but I'm not sure if this is the best place to add it.


================
Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp:163-168
+  if (CC == CallingConv::AArch64_SVE_VectorCall)
+    report_fatal_error(
+        "Calling convention SVE_VectorCall is unsupported on Darwin.");
+  if (CC == CallingConv::CFGuard_Check)
+    report_fatal_error(
+        "Calling convention CFGuard_Check is unsupported on Darwin.");
----------------
Do we have a testcase that shows that these fail?


================
Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp:176
+    return CSR_Darwin_AArch64_RT_MostRegs_RegMask;
+  else
+    return CSR_Darwin_AArch64_AAPCS_RegMask;
----------------
Don't need the else here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73805/new/

https://reviews.llvm.org/D73805





More information about the llvm-commits mailing list