diff options
author | Eric Christopher <echristo@gmail.com> | 2019-06-14 04:51:55 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2019-06-14 04:51:55 +0000 |
commit | 5e83d8fff43cb23c61f4b85e899c935226faef5a (patch) | |
tree | 721c18098c1361724b1d1cb45ddb9d657b1481f1 /llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | |
parent | e0de6002e8f5ced1b3867d822511df970ed19fe4 (diff) | |
download | bcm5719-llvm-5e83d8fff43cb23c61f4b85e899c935226faef5a.tar.gz bcm5719-llvm-5e83d8fff43cb23c61f4b85e899c935226faef5a.zip |
Move commentary on opcode translation for code16 mov instructions
to segment registers closer to the segment register check for when
we add further optimizations.
llvm-svn: 363355
Diffstat (limited to 'llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp index 8387b9549c1..95cbf46d37e 100644 --- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -2678,13 +2678,13 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, static_cast<X86Operand &>(*Operands[0]).setTokenValue(Repl); } - // Moving a 32 or 16 bit value into a segment register has the same - // behavior. Modify such instructions to always take shorter form. if ((Name == "mov" || Name == "movw" || Name == "movl") && (Operands.size() == 3)) { X86Operand &Op1 = (X86Operand &)*Operands[1]; X86Operand &Op2 = (X86Operand &)*Operands[2]; SMLoc Loc = Op1.getEndLoc(); + // Moving a 32 or 16 bit value into a segment register has the same + // behavior. Modify such instructions to always take shorter form. if (Op1.isReg() && Op2.isReg() && X86MCRegisterClasses[X86::SEGMENT_REGRegClassID].contains( Op2.getReg()) && |