mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-05 19:10:19 +00:00
Bugfixes for edis. Code to initialize instruction
state was being executed too lazily, and the LLVM assembly syntax for the disassembler was not being written into the proper disassembler state variable. llvm-svn: 100830
This commit is contained in:
parent
c33ea94108
commit
736f3ecc4c
@ -171,9 +171,9 @@ EDDisassembler::EDDisassembler(CPUKey &key) :
|
||||
|
||||
const char *triple = infoMap->String;
|
||||
|
||||
int syntaxVariant = getLLVMSyntaxVariant(key.Arch, key.Syntax);
|
||||
LLVMSyntaxVariant = getLLVMSyntaxVariant(key.Arch, key.Syntax);
|
||||
|
||||
if (syntaxVariant < 0)
|
||||
if (LLVMSyntaxVariant < 0)
|
||||
return;
|
||||
|
||||
std::string tripleString(triple);
|
||||
@ -210,7 +210,7 @@ EDDisassembler::EDDisassembler(CPUKey &key) :
|
||||
|
||||
InstString.reset(new std::string);
|
||||
InstStream.reset(new raw_string_ostream(*InstString));
|
||||
InstPrinter.reset(Tgt->createMCInstPrinter(syntaxVariant, *AsmInfo));
|
||||
InstPrinter.reset(Tgt->createMCInstPrinter(LLVMSyntaxVariant, *AsmInfo));
|
||||
|
||||
if (!InstPrinter)
|
||||
return;
|
||||
|
@ -33,6 +33,7 @@ EDInst::EDInst(llvm::MCInst *inst,
|
||||
BranchTarget(-1),
|
||||
MoveSource(-1),
|
||||
MoveTarget(-1) {
|
||||
OperandOrder = ThisInstInfo->operandOrders[Disassembler.llvmSyntaxVariant()];
|
||||
}
|
||||
|
||||
EDInst::~EDInst() {
|
||||
@ -60,8 +61,6 @@ int EDInst::stringify() {
|
||||
|
||||
if (Disassembler.printInst(String, *Inst))
|
||||
return StringifyResult.setResult(-1);
|
||||
|
||||
OperandOrder = ThisInstInfo->operandOrders[Disassembler.llvmSyntaxVariant()];
|
||||
|
||||
return StringifyResult.setResult(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user