Skip to content

Commit bbd0eca

Browse files
author
Toma Tabacu
committedSep 15, 2014
[mips] Marked the DADDiu instruction aliases as MIPS III.
Patch by Vasileios Kalintiris. Differential Revision: http://reviews.llvm.org/D5239 llvm-svn: 217770
1 parent a59459d commit bbd0eca

File tree

9 files changed

+36
-4
lines changed

9 files changed

+36
-4
lines changed
 

‎llvm/lib/Target/Mips/Mips64InstrInfo.td

+4-4
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,13 @@ def : MipsInstAlias<"move $dst, $src",
442442
GPR_64;
443443
def : MipsInstAlias<"daddu $rs, $rt, $imm",
444444
(DADDiu GPR64Opnd:$rs, GPR64Opnd:$rt, simm16_64:$imm),
445-
0>;
445+
0>, ISA_MIPS3;
446446
def : MipsInstAlias<"dadd $rs, $rt, $imm",
447447
(DADDi GPR64Opnd:$rs, GPR64Opnd:$rt, simm16_64:$imm),
448448
0>, ISA_MIPS3_NOT_32R6_64R6;
449449
def : MipsInstAlias<"daddu $rs, $imm",
450450
(DADDiu GPR64Opnd:$rs, GPR64Opnd:$rs, simm16_64:$imm),
451-
0>;
451+
0>, ISA_MIPS3;
452452
def : MipsInstAlias<"dadd $rs, $imm",
453453
(DADDi GPR64Opnd:$rs, GPR64Opnd:$rs, simm16_64:$imm),
454454
0>, ISA_MIPS3_NOT_32R6_64R6;
@@ -463,7 +463,7 @@ def : MipsInstAlias<"dsll $rd, $rt, $rs",
463463
ISA_MIPS3;
464464
def : MipsInstAlias<"dsubu $rt, $rs, $imm",
465465
(DADDiu GPR64Opnd:$rt, GPR64Opnd:$rs,
466-
InvertedImOperand64:$imm), 0>;
466+
InvertedImOperand64:$imm), 0>, ISA_MIPS3;
467467
def : MipsInstAlias<"dsubi $rs, $rt, $imm",
468468
(DADDi GPR64Opnd:$rs, GPR64Opnd:$rt,
469469
InvertedImOperand64:$imm),
@@ -483,7 +483,7 @@ def : MipsInstAlias<"dsub $rs, $imm",
483483
def : MipsInstAlias<"dsubu $rs, $imm",
484484
(DADDiu GPR64Opnd:$rs, GPR64Opnd:$rs,
485485
InvertedImOperand64:$imm),
486-
0>;
486+
0>, ISA_MIPS3;
487487
def : MipsInstAlias<"dsra $rd, $rt, $rs",
488488
(DSRAV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>,
489489
ISA_MIPS3;

‎llvm/test/MC/Mips/mips1/invalid-mips3.s

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
daddi $sp,$s4,-27705 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
2020
daddiu $k0,$s6,-4586 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
2121
daddu $s3,$at,$ra # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
22+
daddu $24,$2,18079 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
23+
daddu $19,26943 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
2224
ddiv $zero,$k0,$s3 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
2325
ddivu $zero,$s0,$s1 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
2426
dmfc1 $12,$f13 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
@@ -43,6 +45,8 @@
4345
dsrl32 $s3,$6,23 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4446
dsrlv $s3,$14,$s4 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4547
dsubu $a1,$a1,$k0 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
48+
dsubu $15,$11,5025 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
49+
dsubu $14,-4586 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4650
floor.l.d $f26,$f7 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4751
floor.l.s $f12,$f5 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4852
floor.w.d $f14,$f11 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled

‎llvm/test/MC/Mips/mips2/invalid-mips3.s

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
daddi $sp,$s4,-27705 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
1616
daddiu $k0,$s6,-4586 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
1717
daddu $s3,$at,$ra # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
18+
daddu $24,$2,18079 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
19+
daddu $19,26943 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
1820
ddiv $zero,$k0,$s3 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
1921
ddivu $zero,$s0,$s1 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
2022
dmfc1 $t0,$f13 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
@@ -40,6 +42,8 @@
4042
dsrlv $s3,$t2,$s4 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4143
dsub $a3,$s6,$a4 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4244
dsubu $a1,$a1,$k0 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
45+
dsubu $15,$11,5025 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
46+
dsubu $14,-4586 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4347
eret # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4448
floor.l.d $f26,$f7 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
4549
floor.l.s $f12,$f5 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled

‎llvm/test/MC/Mips/mips3/valid.s

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
daddi $sp,-27705 # CHECK: daddi $sp, $sp, -27705 # encoding: [0x63,0xbd,0x93,0xc7]
5151
daddiu $k0,$s6,-4586
5252
daddu $s3,$at,$ra
53+
daddu $24,$2,18079 # CHECK: daddiu $24, $2, 18079 # encoding: [0x64,0x58,0x46,0x9f]
54+
daddu $19,26943 # CHECK: daddiu $19, $19, 26943 # encoding: [0x66,0x73,0x69,0x3f]
5355
ddiv $zero,$k0,$s3
5456
ddivu $zero,$s0,$s1
5557
div $zero,$25,$11
@@ -84,6 +86,8 @@
8486
dsubi $sp,$s4,-27705 # CHECK: daddi $sp, $20, 27705 # encoding: [0x62,0x9d,0x6c,0x39]
8587
dsubi $sp,-27705 # CHECK: daddi $sp, $sp, 27705 # encoding: [0x63,0xbd,0x6c,0x39]
8688
dsubu $a1,$a1,$k0
89+
dsubu $15,$11,5025 # CHECK: daddiu $15, $11, -5025 # encoding: [0x65,0x6f,0xec,0x5f]
90+
dsubu $14,-4586 # CHECK: daddiu $14, $14, 4586 # encoding: [0x65,0xce,0x11,0xea]
8791
ehb # CHECK: ehb # encoding: [0x00,0x00,0x00,0xc0]
8892
eret
8993
floor.l.d $f26,$f7

‎llvm/test/MC/Mips/mips4/valid.s

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
daddi $sp,-27705 # CHECK: daddi $sp, $sp, -27705 # encoding: [0x63,0xbd,0x93,0xc7]
5353
daddiu $k0,$s6,-4586
5454
daddu $s3,$at,$ra
55+
daddu $24,$2,18079 # CHECK: daddiu $24, $2, 18079 # encoding: [0x64,0x58,0x46,0x9f]
56+
daddu $19,26943 # CHECK: daddiu $19, $19, 26943 # encoding: [0x66,0x73,0x69,0x3f]
5557
ddiv $zero,$k0,$s3
5658
ddivu $zero,$s0,$s1
5759
div $zero,$25,$11
@@ -86,6 +88,8 @@
8688
dsubi $sp,$s4,-27705 # CHECK: daddi $sp, $20, 27705 # encoding: [0x62,0x9d,0x6c,0x39]
8789
dsubi $sp,-27705 # CHECK: daddi $sp, $sp, 27705 # encoding: [0x63,0xbd,0x6c,0x39]
8890
dsubu $a1,$a1,$k0
91+
dsubu $15,$11,5025 # CHECK: daddiu $15, $11, -5025 # encoding: [0x65,0x6f,0xec,0x5f]
92+
dsubu $14,-4586 # CHECK: daddiu $14, $14, 4586 # encoding: [0x65,0xce,0x11,0xea]
8993
ehb # CHECK: ehb # encoding: [0x00,0x00,0x00,0xc0]
9094
eret
9195
floor.l.d $f26,$f7

‎llvm/test/MC/Mips/mips5/valid.s

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
daddi $sp,-27705 # CHECK: daddi $sp, $sp, -27705 # encoding: [0x63,0xbd,0x93,0xc7]
5353
daddiu $k0,$s6,-4586
5454
daddu $s3,$at,$ra
55+
daddu $24,$2,18079 # CHECK: daddiu $24, $2, 18079 # encoding: [0x64,0x58,0x46,0x9f]
56+
daddu $19,26943 # CHECK: daddiu $19, $19, 26943 # encoding: [0x66,0x73,0x69,0x3f]
5557
ddiv $zero,$k0,$s3
5658
ddivu $zero,$s0,$s1
5759
div $zero,$25,$11
@@ -86,6 +88,8 @@
8688
dsubi $sp,$s4,-27705 # CHECK: daddi $sp, $20, 27705 # encoding: [0x62,0x9d,0x6c,0x39]
8789
dsubi $sp,-27705 # CHECK: daddi $sp, $sp, 27705 # encoding: [0x63,0xbd,0x6c,0x39]
8890
dsubu $a1,$a1,$k0
91+
dsubu $15,$11,5025 # CHECK: daddiu $15, $11, -5025 # encoding: [0x65,0x6f,0xec,0x5f]
92+
dsubu $14,-4586 # CHECK: daddiu $14, $14, 4586 # encoding: [0x65,0xce,0x11,0xea]
8993
ehb # CHECK: ehb # encoding: [0x00,0x00,0x00,0xc0]
9094
eret
9195
floor.l.d $f26,$f7

‎llvm/test/MC/Mips/mips64/valid.s

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
daddi $sp,-27705 # CHECK: daddi $sp, $sp, -27705 # encoding: [0x63,0xbd,0x93,0xc7]
5555
daddiu $k0,$s6,-4586
5656
daddu $s3,$at,$ra
57+
daddu $24,$2,18079 # CHECK: daddiu $24, $2, 18079 # encoding: [0x64,0x58,0x46,0x9f]
58+
daddu $19,26943 # CHECK: daddiu $19, $19, 26943 # encoding: [0x66,0x73,0x69,0x3f]
5759
dclo $s2,$a2 # CHECK: dclo $18, $6 # encoding: [0x70,0xd2,0x90,0x25]
5860
dclz $s0,$25 # CHECK: dclz $16, $25 # encoding: [0x73,0x30,0x80,0x24]
5961
deret
@@ -91,6 +93,8 @@
9193
dsubi $sp,$s4,-27705 # CHECK: daddi $sp, $20, 27705 # encoding: [0x62,0x9d,0x6c,0x39]
9294
dsubi $sp,-27705 # CHECK: daddi $sp, $sp, 27705 # encoding: [0x63,0xbd,0x6c,0x39]
9395
dsubu $a1,$a1,$k0
96+
dsubu $15,$11,5025 # CHECK: daddiu $15, $11, -5025 # encoding: [0x65,0x6f,0xec,0x5f]
97+
dsubu $14,-4586 # CHECK: daddiu $14, $14, 4586 # encoding: [0x65,0xce,0x11,0xea]
9498
ehb # CHECK: ehb # encoding: [0x00,0x00,0x00,0xc0]
9599
eret
96100
floor.l.d $f26,$f7

‎llvm/test/MC/Mips/mips64r2/valid.s

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
daddi $sp,-27705 # CHECK: daddi $sp, $sp, -27705 # encoding: [0x63,0xbd,0x93,0xc7]
5555
daddiu $k0,$s6,-4586
5656
daddu $s3,$at,$ra
57+
daddu $24,$2,18079 # CHECK: daddiu $24, $2, 18079 # encoding: [0x64,0x58,0x46,0x9f]
58+
daddu $19,26943 # CHECK: daddiu $19, $19, 26943 # encoding: [0x66,0x73,0x69,0x3f]
5759
dclo $s2,$a2 # CHECK: dclo $18, $6 # encoding: [0x70,0xd2,0x90,0x25]
5860
dclz $s0,$25 # CHECK: dclz $16, $25 # encoding: [0x73,0x30,0x80,0x24]
5961
deret
@@ -101,6 +103,8 @@
101103
dsubi $sp,-27705 # CHECK: daddi $sp, $sp, 27705 # encoding: [0x63,0xbd,0x6c,0x39]
102104
dsubu $a1,$a1,$k0
103105
dsubu $a1,$a1,$k0
106+
dsubu $15,$11,5025 # CHECK: daddiu $15, $11, -5025 # encoding: [0x65,0x6f,0xec,0x5f]
107+
dsubu $14,-4586 # CHECK: daddiu $14, $14, 4586 # encoding: [0x65,0xce,0x11,0xea]
104108
ehb # CHECK: ehb # encoding: [0x00,0x00,0x00,0xc0]
105109
ei $14
106110
eret

‎llvm/test/MC/Mips/mips64r6/valid.s

+4
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,17 @@
9696
cmp.sle.d $f2,$f3,$f4 # CHECK: cmp.sle.d $f2, $f3, $f4 # encoding: [0x46,0xa4,0x18,0x8e]
9797
cmp.sule.s $f2,$f3,$f4 # CHECK: cmp.sule.s $f2, $f3, $f4 # encoding: [0x46,0x84,0x18,0x8f]
9898
cmp.sule.d $f2,$f3,$f4 # CHECK: cmp.sule.d $f2, $f3, $f4 # encoding: [0x46,0xa4,0x18,0x8f]
99+
daddu $24,$2,18079 # CHECK: daddiu $24, $2, 18079 # encoding: [0x64,0x58,0x46,0x9f]
100+
daddu $19,26943 # CHECK: daddiu $19, $19, 26943 # encoding: [0x66,0x73,0x69,0x3f]
99101
dalign $4,$2,$3,5 # CHECK: dalign $4, $2, $3, 5 # encoding: [0x7c,0x43,0x23,0x64]
100102
daui $3,$2,0x1234 # CHECK: daui $3, $2, 4660 # encoding: [0x74,0x62,0x12,0x34]
101103
dahi $3,0x5678 # CHECK: dahi $3, 22136 # encoding: [0x04,0x66,0x56,0x78]
102104
dati $3,0xabcd # CHECK: dati $3, 43981 # encoding: [0x04,0x7e,0xab,0xcd]
103105
dbitswap $4, $2 # CHECK: dbitswap $4, $2 # encoding: [0x7c,0x02,0x20,0x24]
104106
div $2,$3,$4 # CHECK: div $2, $3, $4 # encoding: [0x00,0x64,0x10,0x9a]
105107
divu $2,$3,$4 # CHECK: divu $2, $3, $4 # encoding: [0x00,0x64,0x10,0x9b]
108+
dsubu $15,$11,5025 # CHECK: daddiu $15, $11, -5025 # encoding: [0x65,0x6f,0xec,0x5f]
109+
dsubu $14,-4586 # CHECK: daddiu $14, $14, 4586 # encoding: [0x65,0xce,0x11,0xea]
106110
jialc $5, 256 # CHECK: jialc $5, 256 # encoding: [0xf8,0x05,0x01,0x00]
107111
jic $5, 256 # CHECK: jic $5, 256 # encoding: [0xd8,0x05,0x01,0x00]
108112
mod $2,$3,$4 # CHECK: mod $2, $3, $4 # encoding: [0x00,0x64,0x10,0xda]

0 commit comments

Comments
 (0)
Please sign in to comment.