[llvm] [ARM] CMSE security mitigation on function arguments and returned values (PR #89944)

Rodolfo Wottrich via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 05:28:54 PDT 2024


================
@@ -156,6 +156,17 @@ static const MCPhysReg GPRArgRegs[] = {
   ARM::R0, ARM::R1, ARM::R2, ARM::R3
 };
 
+static SDValue handleCMSEValue(const SDValue &Value, const ISD::InputArg &Arg,
+                               SelectionDAG &DAG, const SDLoc &DL, EVT RegVT) {
+  assert(Arg.ArgVT.isScalarInteger() && RegVT.isScalarInteger());
+  assert(Arg.ArgVT.bitsLT(RegVT));
+  SDValue Trunc = DAG.getNode(ISD::TRUNCATE, DL, Arg.ArgVT, Value);
----------------
rgwott wrote:

Could you please enlighten me about the need for this truncate node?

https://github.com/llvm/llvm-project/pull/89944


More information about the llvm-commits mailing list