mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
[X86] Read the feature bits from the subtarget that is passed to printInst
instead of from MCInstPrinter::AvailableFeatures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0de206d8d6
commit
e03685b10a
@ -57,7 +57,7 @@ void X86ATTInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
|
|||||||
// InstrInfo.td as soon as Requires clause is supported properly
|
// InstrInfo.td as soon as Requires clause is supported properly
|
||||||
// for InstAlias.
|
// for InstAlias.
|
||||||
if (MI->getOpcode() == X86::CALLpcrel32 &&
|
if (MI->getOpcode() == X86::CALLpcrel32 &&
|
||||||
(getAvailableFeatures() & X86::Mode64Bit) != 0) {
|
(STI.getFeatureBits() & X86::Mode64Bit) != 0) {
|
||||||
OS << "\tcallq\t";
|
OS << "\tcallq\t";
|
||||||
printPCRelImm(MI, 0, OS);
|
printPCRelImm(MI, 0, OS);
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,7 @@ class X86ATTInstPrinter final : public MCInstPrinter {
|
|||||||
public:
|
public:
|
||||||
X86ATTInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
|
X86ATTInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
|
||||||
const MCRegisterInfo &MRI, const MCSubtargetInfo &STI)
|
const MCRegisterInfo &MRI, const MCSubtargetInfo &STI)
|
||||||
: MCInstPrinter(MAI, MII, MRI) {
|
: MCInstPrinter(MAI, MII, MRI) {}
|
||||||
// Initialize the set of available features.
|
|
||||||
setAvailableFeatures(STI.getFeatureBits());
|
|
||||||
}
|
|
||||||
|
|
||||||
void printRegName(raw_ostream &OS, unsigned RegNo) const override;
|
void printRegName(raw_ostream &OS, unsigned RegNo) const override;
|
||||||
void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
|
void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user