Skip to content

Commit 295ac53

Browse files
committed
OR1K: Switch the fixed-length disassembler to be table-driven.
see r161888
1 parent 412c03d commit 295ac53

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Target/OR1K/Disassembler/OR1KDisassembler.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "OR1KRegisterInfo.h"
1818
#include "llvm/MC/EDInstInfo.h"
1919
#include "llvm/MC/MCDisassembler.h"
20+
#include "llvm/MC/MCFixedLenDisassembler.h"
2021
#include "llvm/Support/MemoryObject.h"
2122
#include "llvm/Support/TargetRegistry.h"
2223
#include "llvm/MC/MCSubtargetInfo.h"
@@ -95,7 +96,8 @@ OR1KDisassembler::getInstruction(MCInst &instr,
9596
return MCDisassembler::Fail;
9697

9798
// Call auto-generated decoder function
98-
Result = decodeOR1KInstruction32(instr, Insn, Address, this, STI);
99+
Result = decodeInstruction(DecoderTableOR1K32, instr, Insn, Address,
100+
this, STI);
99101
if (Result != MCDisassembler::Fail) {
100102
Size = 4;
101103
return Result;
@@ -131,4 +133,4 @@ static DecodeStatus DecodeMemoryValue(MCInst &Inst,
131133
unsigned Offset = (Insn & 0xffff);
132134
Inst.addOperand(MCOperand::CreateImm(SignExtend32<16>(Offset)));
133135
return MCDisassembler::Success;
134-
}
136+
}

0 commit comments

Comments
 (0)