revert r95689: getX86RegNum(BaseReg) != N86::ESP is

a confusing idiom to check for ESP or RSP.

llvm-svn: 95690
This commit is contained in:
Chris Lattner 2010-02-09 21:21:26 +00:00
parent e464a4d815
commit 45d89644ae
1 changed files with 2 additions and 2 deletions

View File

@ -389,8 +389,8 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
// 2-7) and absolute references.
if ((!Is64BitMode || DispForReloc || BaseReg != 0) &&
IndexReg.getReg() == 0 &&
((BaseReg == 0 && IsPCRel) || BaseReg == X86::RIP ||
(BaseReg != 0 && BaseReg != X86::ESP))) {
((BaseReg == 0 && MCE.earlyResolveAddresses()) || BaseReg == X86::RIP ||
(BaseReg != 0 && getX86RegNum(BaseReg) != N86::ESP))) {
if (BaseReg == 0 || BaseReg == X86::RIP) { // Just a displacement?
// Emit special case [disp32] encoding
MCE.emitByte(ModRMByte(0, RegOpcodeField, 5));