[llvm-commits] [llvm] r133308 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jun 17 16:15:01 PDT 2011
Author: stoklund
Date: Fri Jun 17 18:15:00 2011
New Revision: 133308
URL: http://llvm.org/viewvc/llvm-project?rev=133308&view=rev
Log:
SI, DI, BP, and SP don't have 8-bit sub-registers in x86 mode.
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=133308&r1=133307&r2=133308&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Jun 17 18:15:00 2011
@@ -517,13 +517,20 @@
// Reserve the registers that only exist in 64-bit mode.
if (!Is64Bit) {
+ // These 8-bit registers are part of the x86-64 extension even though their
+ // super-registers are old 32-bits.
+ Reserved.set(X86::SIL);
+ Reserved.set(X86::DIL);
+ Reserved.set(X86::BPL);
+ Reserved.set(X86::SPL);
+
for (unsigned n = 0; n != 8; ++n) {
+ // R8, R9, ...
const unsigned GPR64[] = {
X86::R8, X86::R9, X86::R10, X86::R11,
X86::R12, X86::R13, X86::R14, X86::R15
};
- for (const unsigned *AI = getOverlaps(GPR64[n]); unsigned Reg = *AI;
- ++AI)
+ for (const unsigned *AI = getOverlaps(GPR64[n]); unsigned Reg = *AI; ++AI)
Reserved.set(Reg);
// XMM8, XMM9, ...
More information about the llvm-commits
mailing list