mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e60bb15982
commit
4285b294a8
@ -171,9 +171,9 @@ EDDisassembler::EDDisassembler(CPUKey &key) :
|
|||||||
|
|
||||||
const char *triple = infoMap->String;
|
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;
|
return;
|
||||||
|
|
||||||
std::string tripleString(triple);
|
std::string tripleString(triple);
|
||||||
@ -210,7 +210,7 @@ EDDisassembler::EDDisassembler(CPUKey &key) :
|
|||||||
|
|
||||||
InstString.reset(new std::string);
|
InstString.reset(new std::string);
|
||||||
InstStream.reset(new raw_string_ostream(*InstString));
|
InstStream.reset(new raw_string_ostream(*InstString));
|
||||||
InstPrinter.reset(Tgt->createMCInstPrinter(syntaxVariant, *AsmInfo));
|
InstPrinter.reset(Tgt->createMCInstPrinter(LLVMSyntaxVariant, *AsmInfo));
|
||||||
|
|
||||||
if (!InstPrinter)
|
if (!InstPrinter)
|
||||||
return;
|
return;
|
||||||
|
@ -33,6 +33,7 @@ EDInst::EDInst(llvm::MCInst *inst,
|
|||||||
BranchTarget(-1),
|
BranchTarget(-1),
|
||||||
MoveSource(-1),
|
MoveSource(-1),
|
||||||
MoveTarget(-1) {
|
MoveTarget(-1) {
|
||||||
|
OperandOrder = ThisInstInfo->operandOrders[Disassembler.llvmSyntaxVariant()];
|
||||||
}
|
}
|
||||||
|
|
||||||
EDInst::~EDInst() {
|
EDInst::~EDInst() {
|
||||||
@ -60,8 +61,6 @@ int EDInst::stringify() {
|
|||||||
|
|
||||||
if (Disassembler.printInst(String, *Inst))
|
if (Disassembler.printInst(String, *Inst))
|
||||||
return StringifyResult.setResult(-1);
|
return StringifyResult.setResult(-1);
|
||||||
|
|
||||||
OperandOrder = ThisInstInfo->operandOrders[Disassembler.llvmSyntaxVariant()];
|
|
||||||
|
|
||||||
return StringifyResult.setResult(0);
|
return StringifyResult.setResult(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user