aboutsummaryrefslogtreecommitdiff
path: root/test/MC/Mips/mips32r3/valid.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/Mips/mips32r3/valid.s')
-rw-r--r--test/MC/Mips/mips32r3/valid.s32
1 files changed, 30 insertions, 2 deletions
diff --git a/test/MC/Mips/mips32r3/valid.s b/test/MC/Mips/mips32r3/valid.s
index 93859dbd1d51..c4c7069b3c42 100644
--- a/test/MC/Mips/mips32r3/valid.s
+++ b/test/MC/Mips/mips32r3/valid.s
@@ -213,6 +213,8 @@ a:
swxc1 $f19,$12($k0)
sync # CHECK: sync # encoding: [0x00,0x00,0x00,0x0f]
sync 1 # CHECK: sync 1 # encoding: [0x00,0x00,0x00,0x4f]
+ syscall # CHECK: syscall # encoding: [0x00,0x00,0x00,0x0c]
+ syscall 256 # CHECK: syscall 256 # encoding: [0x00,0x00,0x40,0x0c]
teq $0,$3 # CHECK: teq $zero, $3 # encoding: [0x00,0x03,0x00,0x34]
teq $5,$7,620 # CHECK: teq $5, $7, 620 # encoding: [0x00,0xa7,0x9b,0x34]
teqi $s5,-17504
@@ -235,11 +237,37 @@ a:
tne $6,$17 # CHECK: tne $6, $17 # encoding: [0x00,0xd1,0x00,0x36]
tne $7,$8,885 # CHECK: tne $7, $8, 885 # encoding: [0x00,0xe8,0xdd,0x76]
tnei $12,-29647
- trunc.w.d $f22,$f15
- trunc.w.s $f28,$f30
+ trunc.w.d $f22,$f15 # CHECK: trunc.w.d $f22, $f14 # encoding: [0x46,0x20,0x75,0x8d]
+ trunc.w.s $f28,$f30 # CHECK: trunc.w.s $f28, $f30 # encoding: [0x46,0x00,0xf7,0x0d]
+ trunc.w.d $f4,$f6,$4 # CHECK: trunc.w.d $f4, $f6 # encoding: [0x46,0x20,0x31,0x0d]
+ trunc.w.s $f4,$f6,$4 # CHECK: trunc.w.s $f4, $f6 # encoding: [0x46,0x00,0x31,0x0d]
wsbh $k1,$9
xor $s2,$a0,$s8
xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04]
synci -15842($a2) # CHECK: synci -15842($6) # encoding: [0x04,0xdf,0xc2,0x1e]
1:
+
+ # Check that we accept traditional %relocation(symbol) offsets for stores
+ # and loads, not just a sign 16 bit offset.
+
+ lui $2, %hi(g_8) # CHECK: encoding: [0x3c,0x02,A,A]
+ lb $3, %lo(g_8)($2) # CHECK: encoding: [0x80,0x43,A,A]
+ lh $3, %lo(g_8)($2) # CHECK: encoding: [0x84,0x43,A,A]
+ lhu $3, %lo(g_8)($2) # CHECK: encoding: [0x94,0x43,A,A]
+ lw $3, %lo(g_8)($2) # CHECK: encoding: [0x8c,0x43,A,A]
+ sb $3, %lo(g_8)($2) # CHECK: encoding: [0xa0,0x43,A,A]
+ sh $3, %lo(g_8)($2) # CHECK: encoding: [0xa4,0x43,A,A]
+ sw $3, %lo(g_8)($2) # CHECK: encoding: [0xac,0x43,A,A]
+
+ lwl $3, %lo(g_8)($2) # CHECK: encoding: [0x88,0x43,A,A]
+ lwr $3, %lo(g_8)($2) # CHECK: encoding: [0x98,0x43,A,A]
+ swl $3, %lo(g_8)($2) # CHECK: encoding: [0xa8,0x43,A,A]
+ swr $3, %lo(g_8)($2) # CHECK: encoding: [0xb8,0x43,A,A]
+
+ lwc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xc4,0x40,A,A]
+ ldc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xd4,0x40,A,A]
+ swc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xe4,0x40,A,A]
+ sdc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xf4,0x40,A,A]
+ .type g_8,@object
+ .comm g_8,16,16