Reserve D16-D13 on subtargets that don't support them.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 18 Jun 2011 00:53:27 +0000 (00:53 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 18 Jun 2011 00:53:27 +0000 (00:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133321 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMBaseRegisterInfo.cpp

index 2adcd2cdff3d9a8f5ba498f88a8127bfeca2c401..9dc51b810edc49e4dedba2947c6540bee2ad70c8 100644 (file)
@@ -100,6 +100,12 @@ getReservedRegs(const MachineFunction &MF) const {
   // Some targets reserve R9.
   if (STI.isR9Reserved())
     Reserved.set(ARM::R9);
+  // Reserve D16-D31 if the subtarget doesn't support them.
+  if (!STI.hasVFP3() || STI.hasD16()) {
+    assert(ARM::D31 == ARM::D16 + 15);
+    for (unsigned i = 0; i != 16; ++i)
+      Reserved.set(ARM::D16 + i);
+  }
   return Reserved;
 }