[x32] Mark RBX as reserved when EBX is the base pointer.
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 24 Feb 2015 16:13:16 +0000 (16:13 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 24 Feb 2015 16:13:16 +0000 (16:13 +0000)
This should have gone into r230334.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230339 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86RegisterInfo.cpp

index 7f00fd3e4c3cb14e4ca89809e1620e8318399069..cab7ce801db18cf298fa81e643442b85625ea11c 100644 (file)
@@ -355,7 +355,9 @@ BitVector X86RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
         "Stack realignment in presence of dynamic allocas is not supported with"
         "this calling convention.");
 
         "Stack realignment in presence of dynamic allocas is not supported with"
         "this calling convention.");
 
-    for (MCSubRegIterator I(getBaseRegister(), this, /*IncludeSelf=*/true);
+    unsigned BasePtr = getX86SubSuperRegister(getBaseRegister(), MVT::i64,
+                                              false);
+    for (MCSubRegIterator I(BasePtr, this, /*IncludeSelf=*/true);
          I.isValid(); ++I)
       Reserved.set(*I);
   }
          I.isValid(); ++I)
       Reserved.set(*I);
   }