forked from OSchip/llvm-project
Make Sparc assembler accept parenthesized constant expressions.
Differential Revision: http://reviews.llvm.org/D9087 llvm-svn: 236137
This commit is contained in:
parent
66f2e12f7a
commit
9cb88b73c6
|
@ -682,6 +682,7 @@ SparcAsmParser::parseSparcAsmOperand(std::unique_ptr<SparcOperand> &Op,
|
|||
|
||||
case AsmToken::Minus:
|
||||
case AsmToken::Integer:
|
||||
case AsmToken::LParen:
|
||||
if (!getParser().parseExpression(EVal, E))
|
||||
Op = SparcOperand::CreateImm(EVal, S, E);
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
! RUN: llvm-mc %s -arch=sparc -show-encoding | FileCheck %s
|
||||
|
||||
! CHECK: mov 1033, %o1 ! encoding: [0x92,0x10,0x24,0x09]
|
||||
mov (0x400|9), %o1
|
||||
! CHECK: mov 60, %o2 ! encoding: [0x94,0x10,0x20,0x3c]
|
||||
mov (12+3<<2), %o2
|
Loading…
Reference in New Issue