mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-11 21:57:55 +00:00
[mips] not instruction alias
This patch adds the single operand form of the not alias to microMIPS and MIPS along with additional tests. This partially resolves PR/30381. Thanks to Sean Bruno for reporting the issue! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a33f3dffef
commit
bc5962ad36
@ -1177,6 +1177,8 @@ let Predicates = [InMicroMips] in {
|
||||
(XORi_MM GPR32Opnd:$rs, GPR32Opnd:$rs, uimm16:$imm), 0>;
|
||||
def : MipsInstAlias<"not $rt, $rs",
|
||||
(NOR_MM GPR32Opnd:$rt, GPR32Opnd:$rs, ZERO), 0>;
|
||||
def : MipsInstAlias<"not $rt",
|
||||
(NOR_MM GPR32Opnd:$rt, GPR32Opnd:$rt, ZERO), 0>;
|
||||
def : MipsInstAlias<"bnez $rs,$offset",
|
||||
(BNE_MM GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>;
|
||||
def : MipsInstAlias<"beqz $rs,$offset",
|
||||
|
@ -2348,6 +2348,9 @@ let AdditionalPredicates = [NotInMicroMips] in {
|
||||
def : MipsInstAlias<
|
||||
"not $rt, $rs",
|
||||
(NOR GPR32Opnd:$rt, GPR32Opnd:$rs, ZERO), 0>;
|
||||
def : MipsInstAlias<
|
||||
"not $rt",
|
||||
(NOR GPR32Opnd:$rt, GPR32Opnd:$rt, ZERO), 0>;
|
||||
def : MipsInstAlias<"nop", (SLL ZERO, ZERO, 0), 1>;
|
||||
}
|
||||
def : MipsInstAlias<"mfc0 $rt, $rd", (MFC0 GPR32Opnd:$rt, COP0Opnd:$rd, 0), 0>;
|
||||
|
@ -74,6 +74,7 @@ xor $3, $3, $5 # CHECK: xor $3, $3, $5 # encoding: [0x00,0x
|
||||
xori $9, $6, 17767 # CHECK: xori $9, $6, 17767 # encoding: [0x71,0x26,0x45,0x67]
|
||||
nor $9, $6, $7 # CHECK: nor $9, $6, $7 # encoding: [0x00,0xe6,0x4a,0xd0]
|
||||
not $7, $8 # CHECK: not $7, $8 # encoding: [0x00,0x08,0x3a,0xd0]
|
||||
not $7 # CHECK: not $7, $7 # encoding: [0x00,0x07,0x3a,0xd0]
|
||||
mul $9, $6, $7 # CHECK: mul $9, $6, $7 # encoding: [0x00,0xe6,0x4a,0x10]
|
||||
mult $9, $7 # CHECK: mult $9, $7 # encoding: [0x00,0xe9,0x8b,0x3c]
|
||||
multu $9, $7 # CHECK: multu $9, $7 # encoding: [0x00,0xe9,0x9b,0x3c]
|
||||
|
@ -359,6 +359,7 @@
|
||||
and $3, 5 # CHECK: andi $3, $3, 5 # encoding: [0xd0,0x63,0x00,0x05]
|
||||
and $3, $4, 5 # CHECK: andi $3, $4, 5 # encoding: [0xd0,0x64,0x00,0x05]
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x04,0x1a,0xd0]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x03,0x1a,0xd0]
|
||||
or $3, 5 # CHECK: ori $3, $3, 5 # encoding: [0x50,0x63,0x00,0x05]
|
||||
or $3, $4, 5 # CHECK: ori $3, $4, 5 # encoding: [0x50,0x64,0x00,0x05]
|
||||
xor $3, 5 # CHECK: xori $3, $3, 5 # encoding: [0x70,0x63,0x00,0x05]
|
||||
|
@ -293,6 +293,7 @@ a:
|
||||
andi $3, $4, 1234 # CHECK: andi $3, $4, 1234 # encoding: [0xd0,0x64,0x04,0xd2]
|
||||
nor $3, $4, $5 # CHECK: nor $3, $4, $5 # encoding: [0x00,0xa4,0x1a,0xd0]
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x04,0x1a,0xd0]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x03,0x1a,0xd0]
|
||||
or $3, 5 # CHECK: ori $3, $3, 5 # encoding: [0x50,0x63,0x00,0x05]
|
||||
or $3, $4, 5 # CHECK: ori $3, $4, 5 # encoding: [0x50,0x64,0x00,0x05]
|
||||
or $3, $4, $5 # CHECK: or $3, $4, $5 # encoding: [0x00,0xa4,0x1a,0x90]
|
||||
|
@ -85,6 +85,8 @@ a:
|
||||
neg.s $f1,$f15
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
sb $s6,-19857($14)
|
||||
|
@ -107,6 +107,8 @@ a:
|
||||
neg.s $f1,$f15
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
round.w.d $f6,$f4
|
||||
|
@ -167,6 +167,8 @@ a:
|
||||
neg.s $f1,$f15
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
round.l.d $f12,$f1
|
||||
|
@ -135,6 +135,8 @@ a:
|
||||
neg.s $f1,$f15
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
|
||||
|
@ -157,6 +157,8 @@ a:
|
||||
nmsub.s $f1,$f24,$f19,$f4
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
|
||||
|
@ -157,6 +157,8 @@ a:
|
||||
nmsub.s $f1,$f24,$f19,$f4
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
|
||||
|
@ -158,6 +158,8 @@ a:
|
||||
nmsub.s $f1,$f24,$f19,$f4
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
|
||||
|
@ -136,6 +136,8 @@ a:
|
||||
neg $2, $3 # CHECK: neg $2, $3 # encoding: [0x00,0x03,0x10,0x22]
|
||||
negu $2 # CHECK: negu $2, $2 # encoding: [0x00,0x02,0x10,0x23]
|
||||
negu $2,$3 # CHECK: negu $2, $3 # encoding: [0x00,0x03,0x10,0x23]
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0x7c,0xa1,0x04,0x35]
|
||||
# FIXME: Use the code generator in order to print the .set directives
|
||||
# instead of the instruction printer.
|
||||
|
@ -193,6 +193,8 @@ a:
|
||||
nmsub.s $f0, $f24, $f20, $f4 # encoding: [0x4f,0x04,0xa0,0x38]
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
|
||||
|
@ -194,6 +194,8 @@ a:
|
||||
nmsub.s $f0, $f24, $f20, $f4 # encoding: [0x4f,0x04,0xa0,0x38]
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
|
||||
|
@ -210,6 +210,8 @@ a:
|
||||
nmsub.s $f0, $f24, $f20, $f4 # encoding: [0x4f,0x04,0xa0,0x38]
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
|
||||
|
@ -224,6 +224,8 @@ a:
|
||||
nmsub.s $f1,$f24,$f19,$f4
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
|
||||
|
@ -224,6 +224,8 @@ a:
|
||||
nmsub.s $f1,$f24,$f19,$f4
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
|
||||
|
@ -225,6 +225,8 @@ a:
|
||||
nmsub.s $f1,$f24,$f19,$f4
|
||||
nop
|
||||
nor $a3,$zero,$a3
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $12,$s0,$sp
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
|
||||
|
@ -190,6 +190,8 @@ a:
|
||||
neg $2, $3 # CHECK: neg $2, $3 # encoding: [0x00,0x03,0x10,0x22]
|
||||
negu $2 # CHECK: negu $2, $2 # encoding: [0x00,0x02,0x10,0x23]
|
||||
negu $2,$3 # CHECK: negu $2, $3 # encoding: [0x00,0x03,0x10,0x23]
|
||||
not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
|
||||
not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
|
||||
or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
|
||||
pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0x7c,0xa1,0x04,0x35]
|
||||
# FIXME: Use the code generator in order to print the .set directives
|
||||
|
Loading…
Reference in New Issue
Block a user