forked from OSchip/llvm-project
[mips] Update MipsAsmParser so that it's possible to handle immediates that start with the binary operator NOT (~).
Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D4158 llvm-svn: 211163
This commit is contained in:
parent
2c27df9a33
commit
ee73cc5894
|
@ -1480,6 +1480,7 @@ bool MipsAsmParser::ParseOperand(OperandVector &Operands, StringRef Mnemonic) {
|
|||
case AsmToken::Minus:
|
||||
case AsmToken::Plus:
|
||||
case AsmToken::Integer:
|
||||
case AsmToken::Tilde:
|
||||
case AsmToken::String: {
|
||||
DEBUG(dbgs() << ".. generic integer\n");
|
||||
OperandMatchResultTy ResTy = ParseImm(Operands);
|
||||
|
@ -1904,6 +1905,7 @@ MipsAsmParser::ParseImm(OperandVector &Operands) {
|
|||
case AsmToken::Minus:
|
||||
case AsmToken::Plus:
|
||||
case AsmToken::Integer:
|
||||
case AsmToken::Tilde:
|
||||
case AsmToken::String:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# CHECK: addiu $6, $zero, -2345 # encoding: [0xd7,0xf6,0x06,0x24]
|
||||
# CHECK: lui $7, 1 # encoding: [0x01,0x00,0x07,0x3c]
|
||||
# CHECK: ori $7, $7, 2 # encoding: [0x02,0x00,0xe7,0x34]
|
||||
# CHECK: addiu $8, $zero, -8 # encoding: [0xf8,0xff,0x08,0x24]
|
||||
|
||||
# CHECK: addiu $4, $zero, 20 # encoding: [0x14,0x00,0x04,0x24]
|
||||
# CHECK: lui $7, 1 # encoding: [0x01,0x00,0x07,0x3c]
|
||||
# CHECK: ori $7, $7, 2 # encoding: [0x02,0x00,0xe7,0x34]
|
||||
|
@ -35,6 +37,7 @@
|
|||
li $5,123
|
||||
li $6,-2345
|
||||
li $7,65538
|
||||
li $8, ~7
|
||||
|
||||
la $a0, 20
|
||||
la $7,65538
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
add.d $f1,$f7,$f29
|
||||
add.s $f8,$f21,$f24
|
||||
addi $13,$9,26322
|
||||
addi $8,$8,~1 # CHECK: addi $8, $8, -2 # encoding: [0x21,0x08,0xff,0xfe]
|
||||
addu $9,$a0,$a2
|
||||
and $s7,$v0,$12
|
||||
and $2,4 # CHECK: andi $2, $2, 4 # encoding: [0x30,0x42,0x00,0x04]
|
||||
|
|
Loading…
Reference in New Issue