mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Work around code generation bug in Visual Studio 2010.
See http://llvm.org/pr9976 for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131954 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -351,13 +351,13 @@ public:
|
|||||||
/// The first virtual register in a function will get the index 0.
|
/// The first virtual register in a function will get the index 0.
|
||||||
static unsigned virtReg2Index(unsigned Reg) {
|
static unsigned virtReg2Index(unsigned Reg) {
|
||||||
assert(isVirtualRegister(Reg) && "Not a virtual register");
|
assert(isVirtualRegister(Reg) && "Not a virtual register");
|
||||||
return Reg - (1u << 31);
|
return Reg & ~(1u << 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// index2VirtReg - Convert a 0-based index to a virtual register number.
|
/// index2VirtReg - Convert a 0-based index to a virtual register number.
|
||||||
/// This is the inverse operation of VirtReg2IndexFunctor below.
|
/// This is the inverse operation of VirtReg2IndexFunctor below.
|
||||||
static unsigned index2VirtReg(unsigned Index) {
|
static unsigned index2VirtReg(unsigned Index) {
|
||||||
return Index + (1u << 31);
|
return Index | (1u << 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getMinimalPhysRegClass - Returns the Register Class of a physical
|
/// getMinimalPhysRegClass - Returns the Register Class of a physical
|
||||||
|
Reference in New Issue
Block a user