[llvm-commits] [llvm] r83307 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.td
Dan Gohman
gohman at apple.com
Mon Oct 5 08:42:09 PDT 2009
Author: djg
Date: Mon Oct 5 10:42:08 2009
New Revision: 83307
URL: http://llvm.org/viewvc/llvm-project?rev=83307&view=rev
Log:
Add RIP to GR64_NOREX. This fixed a MachineVerifier error when RIP
is used in an operand which requires GR64_NOREX.
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.td
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.td?rev=83307&r1=83306&r2=83307&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.td Mon Oct 5 10:42:08 2009
@@ -555,7 +555,7 @@
}
// GR64_NOREX - GR64 registers which do not require a REX prefix.
def GR64_NOREX : RegisterClass<"X86", [i64], 64,
- [RAX, RCX, RDX, RSI, RDI, RBX, RBP, RSP]> {
+ [RAX, RCX, RDX, RSI, RDI, RBX, RBP, RSP, RIP]> {
let SubRegClassList = [GR8_NOREX, GR8_NOREX, GR16_NOREX, GR32_NOREX];
let MethodProtos = [{
iterator allocation_order_end(const MachineFunction &MF) const;
@@ -567,11 +567,11 @@
const TargetRegisterInfo *RI = TM.getRegisterInfo();
// Does the function dedicate RBP to being a frame ptr?
if (RI->hasFP(MF))
- // If so, don't allocate RSP or RBP.
- return end() - 2;
+ // If so, don't allocate RIP, RSP or RBP.
+ return end() - 3;
else
- // If not, just don't allocate RSP.
- return end() - 1;
+ // If not, just don't allocate RIP or RSP.
+ return end() - 2;
}
}];
}
More information about the llvm-commits
mailing list