mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-29 22:52:18 +00:00
Copy segment register when optimizing to MOV8ao8/MOV16ao16/MOV32ao32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
85026d9375
commit
c3ab5de57c
@ -323,15 +323,16 @@ static void SimplifyShortMoveForm(X86AsmPrinter &Printer, MCInst &Inst,
|
||||
if (Absolute &&
|
||||
(Inst.getOperand(AddrBase + 0).getReg() != 0 ||
|
||||
Inst.getOperand(AddrBase + 2).getReg() != 0 ||
|
||||
Inst.getOperand(AddrBase + 4).getReg() != 0 ||
|
||||
Inst.getOperand(AddrBase + 1).getImm() != 1))
|
||||
return;
|
||||
|
||||
// If so, rewrite the instruction.
|
||||
MCOperand Saved = Inst.getOperand(AddrOp);
|
||||
MCOperand Seg = Inst.getOperand(AddrBase + 4);
|
||||
Inst = MCInst();
|
||||
Inst.setOpcode(Opcode);
|
||||
Inst.addOperand(Saved);
|
||||
Inst.addOperand(Seg);
|
||||
}
|
||||
|
||||
static unsigned getRetOpcode(const X86Subtarget &Subtarget)
|
||||
|
Loading…
x
Reference in New Issue
Block a user