LLVM-1163: AAPCS-VFP violation when CPRC allocated to stack
[oota-llvm.git] / include / llvm / CodeGen / CallingConvLower.h
index f824e73433a43b18967edd51354679087cc2f031..4bc8cecaff8214c463cbe45bef98c54fad8aa4e4 100644 (file)
@@ -348,6 +348,15 @@ public:
     return AllocateStack(Size, Align);
   }
 
+  /// Version of AllocateStack with list of extra registers to be shadowed.
+  /// Note that, unlike AllocateReg, this shadows ALL of the shadow registers.
+  unsigned AllocateStack(unsigned Size, unsigned Align,
+                         const uint16_t *ShadowRegs, unsigned NumShadowRegs) {
+    for (unsigned i = 0; i < NumShadowRegs; ++i)
+      MarkAllocated(ShadowRegs[i]);
+    return AllocateStack(Size, Align);
+  }
+
   // HandleByVal - Allocate a stack slot large enough to pass an argument by
   // value. The size and alignment information of the argument is encoded in its
   // parameter attribute.