From 37522e768ad88ce796b6f7260d95006a6584a279 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 28 Mar 2009 18:55:31 +0000 Subject: [PATCH] Have only one definition of X86AddrNumOperands. llvm-svn: 67949 --- lib/Target/X86/X86CodeEmitter.cpp | 3 --- lib/Target/X86/X86FloatingPoint.cpp | 1 - lib/Target/X86/X86ISelLowering.cpp | 2 -- lib/Target/X86/X86InstrInfo.cpp | 3 --- lib/Target/X86/X86InstrInfo.h | 2 ++ 5 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index f7c8c8de451..7c998382fc7 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -32,9 +32,6 @@ #include "llvm/Target/TargetOptions.h" using namespace llvm; -// FIXME: This should be some header -static const int X86AddrNumOperands = 4; - STATISTIC(NumEmitted, "Number of machine instructions emitted"); namespace { diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index dee57176d9f..0f2fbcc9869 100644 --- a/lib/Target/X86/X86FloatingPoint.cpp +++ b/lib/Target/X86/X86FloatingPoint.cpp @@ -616,7 +616,6 @@ void FPS::handleZeroArgFP(MachineBasicBlock::iterator &I) { /// handleOneArgFP - fst , ST(0) /// void FPS::handleOneArgFP(MachineBasicBlock::iterator &I) { - const int X86AddrNumOperands = 4; MachineInstr *MI = I; unsigned NumOps = MI->getDesc().getNumOperands(); assert((NumOps == X86AddrNumOperands + 1 || NumOps == 1) && diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 29174b9a6a3..724899b00ee 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -41,8 +41,6 @@ #include "llvm/Support/CommandLine.h" using namespace llvm; -const int X86AddrNumOperands = 4; - static cl::opt DisableMMX("disable-mmx", cl::Hidden, cl::desc("Disable use of MMX")); diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index 86d64a6327e..dd7346a30fb 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -31,9 +31,6 @@ using namespace llvm; -// FIXME: This should be some header -static const int X86AddrNumOperands = 4; - namespace { cl::opt NoFusing("disable-spill-fusing", diff --git a/lib/Target/X86/X86InstrInfo.h b/lib/Target/X86/X86InstrInfo.h index f5b0cc91527..3bbb51e02f8 100644 --- a/lib/Target/X86/X86InstrInfo.h +++ b/lib/Target/X86/X86InstrInfo.h @@ -243,6 +243,8 @@ namespace X86II { }; } +const int X86AddrNumOperands = 4; + inline static bool isScale(const MachineOperand &MO) { return MO.isImm() && (MO.getImm() == 1 || MO.getImm() == 2 ||