diff options
Diffstat (limited to 'llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp b/llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp index 3cc6da2c21a..1ad70ac72c7 100644 --- a/llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp +++ b/llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp @@ -497,7 +497,11 @@ bool MSP430AsmParser::ParseOperand(OperandVector &Operands) { getLexer().Lex(); // Eat '+' return false; } - Operands.push_back(MSP430Operand::CreateIndReg(RegNo, StartLoc, EndLoc)); + if (Operands.size() > 1) // Emulate @rd in destination position as 0(rd) + Operands.push_back(MSP430Operand::CreateMem(RegNo, + MCConstantExpr::create(0, getContext()), StartLoc, EndLoc)); + else + Operands.push_back(MSP430Operand::CreateIndReg(RegNo, StartLoc, EndLoc)); return false; } case AsmToken::Hash: |