mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Allow x86 mov instructions to/from memory with absolute address to be encoded and disassembled with a segment override prefix. Fixes PR16962.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -229,9 +229,16 @@ void X86ATTInstPrinter::printMemReference(const MCInst *MI, unsigned Op,
|
||||
void X86ATTInstPrinter::printMemOffset(const MCInst *MI, unsigned Op,
|
||||
raw_ostream &O) {
|
||||
const MCOperand &DispSpec = MI->getOperand(Op);
|
||||
const MCOperand &SegReg = MI->getOperand(Op+1);
|
||||
|
||||
O << markup("<mem:");
|
||||
|
||||
// If this has a segment register, print it.
|
||||
if (SegReg.getReg()) {
|
||||
printOperand(MI, Op+1, O);
|
||||
O << ':';
|
||||
}
|
||||
|
||||
if (DispSpec.isImm()) {
|
||||
O << formatImm(DispSpec.getImm());
|
||||
} else {
|
||||
|
@@ -215,6 +215,13 @@ void X86IntelInstPrinter::printMemReference(const MCInst *MI, unsigned Op,
|
||||
void X86IntelInstPrinter::printMemOffset(const MCInst *MI, unsigned Op,
|
||||
raw_ostream &O) {
|
||||
const MCOperand &DispSpec = MI->getOperand(Op);
|
||||
const MCOperand &SegReg = MI->getOperand(Op+1);
|
||||
|
||||
// If this has a segment register, print it.
|
||||
if (SegReg.getReg()) {
|
||||
printOperand(MI, Op+1, O);
|
||||
O << ':';
|
||||
}
|
||||
|
||||
O << '[';
|
||||
|
||||
|
Reference in New Issue
Block a user