diff options
author | Chris Lattner <sabre@nondot.org> | 2002-12-23 23:46:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-12-23 23:46:00 +0000 |
commit | facc9fb9ba7317ac376bfb2518b7abde18de3764 (patch) | |
tree | 0a54061f84ee188cfe30cd5f4897a2f10165367c /lib/Target/X86/Printer.cpp | |
parent | e500864619a0ff4cfd2b41e404e262b2e2891913 (diff) |
Add support for the bswap instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/Printer.cpp')
-rw-r--r-- | lib/Target/X86/Printer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/X86/Printer.cpp b/lib/Target/X86/Printer.cpp index 84b43a0678..385172dc0d 100644 --- a/lib/Target/X86/Printer.cpp +++ b/lib/Target/X86/Printer.cpp @@ -196,20 +196,22 @@ void X86InstrInfo::print(const MachineInstr *MI, std::ostream &O, // or it takes a register and an immediate of the same size as the register // (move immediate f.e.). Note that this immediate value might be stored as // an LLVM value, to represent, for example, loading the address of a global - // into a register. + // into a register. The initial register might be duplicated if this is a + // M_2_ADDR_REG instruction // assert(MI->getOperand(0).isRegister() && (MI->getNumOperands() == 1 || (MI->getNumOperands() == 2 && (MI->getOperand(1).getVRegValueOrNull() || - MI->getOperand(1).isImmediate()))) && + MI->getOperand(1).isImmediate() || + MI->getOperand(1).isRegister()))) && "Illegal form for AddRegFrm instruction!"); unsigned Reg = MI->getOperand(0).getReg(); O << getName(MI->getOpCode()) << " "; printOp(O, MI->getOperand(0), RI); - if (MI->getNumOperands() == 2) { + if (MI->getNumOperands() == 2 && !MI->getOperand(1).isRegister()) { O << ", "; printOp(O, MI->getOperand(1), RI); } |