summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorShengchen Kan <shengchen.kan@intel.com>2019-12-31 15:10:08 +0800
committerShengchen Kan <shengchen.kan@intel.com>2019-12-31 15:12:45 +0800
commit23a6ae2b0624278646929d5cbed360f79be505ac (patch)
treea6a00cb1fa41631a187f2a53fc3c484d9d6269b9 /llvm/lib/Target/X86
parentb350c666ab65b7585bc58301b03d2b46dc6b0504 (diff)
downloadbcm5719-llvm-23a6ae2b0624278646929d5cbed360f79be505ac.tar.gz
bcm5719-llvm-23a6ae2b0624278646929d5cbed360f79be505ac.zip
[NFC] Make X86MCCodeEmitter::isPCRel32Branch static
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
index 296ac7aae86..24f0f2b66ba 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
@@ -142,8 +142,6 @@ private:
uint8_t determineREXPrefix(const MCInst &MI, uint64_t TSFlags, int MemOperand,
const MCInstrDesc &Desc) const;
-
- bool isPCRel32Branch(const MCInst &MI) const;
};
} // end anonymous namespace
@@ -266,7 +264,7 @@ static bool hasSecRelSymbolRef(const MCExpr *Expr) {
return false;
}
-bool X86MCCodeEmitter::isPCRel32Branch(const MCInst &MI) const {
+static bool isPCRel32Branch(const MCInst &MI, const MCInstrInfo &MCII) {
unsigned Opcode = MI.getOpcode();
const MCInstrDesc &Desc = MCII.get(Opcode);
if ((Opcode != X86::CALL64pcrel32 && Opcode != X86::JMP_4) ||
@@ -1388,7 +1386,7 @@ void X86MCCodeEmitter::encodeInstruction(const MCInst &MI, raw_ostream &OS,
case X86II::RawFrm:
emitByte(BaseOpcode + OpcodeOffset, CurByte, OS);
- if (!STI.hasFeature(X86::Mode64Bit) || !isPCRel32Branch(MI))
+ if (!STI.hasFeature(X86::Mode64Bit) || !isPCRel32Branch(MI, MCII))
break;
const MCOperand &Op = MI.getOperand(CurOp++);
OpenPOWER on IntegriCloud