llvm.org GIT mirror llvm / 7a01be2
Move commentary on opcode translation for code16 mov instructions to segment registers closer to the segment register check for when we add further optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363355 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 3 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
26772677 static_cast(*Operands[0]).setTokenValue(Repl);
26782678 }
26792679
2680 // Moving a 32 or 16 bit value into a segment register has the same
2681 // behavior. Modify such instructions to always take shorter form.
26822680 if ((Name == "mov" || Name == "movw" || Name == "movl") &&
26832681 (Operands.size() == 3)) {
26842682 X86Operand &Op1 = (X86Operand &)*Operands[1];
26852683 X86Operand &Op2 = (X86Operand &)*Operands[2];
26862684 SMLoc Loc = Op1.getEndLoc();
2685 // Moving a 32 or 16 bit value into a segment register has the same
2686 // behavior. Modify such instructions to always take shorter form.
26872687 if (Op1.isReg() && Op2.isReg() &&
26882688 X86MCRegisterClasses[X86::SEGMENT_REGRegClassID].contains(
26892689 Op2.getReg()) &&