summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorZoran Jovanovic <zoran.jovanovic@imgtec.com>2014-10-21 08:44:58 +0000
committerZoran Jovanovic <zoran.jovanovic@imgtec.com>2014-10-21 08:44:58 +0000
commit592239d498c97c25d06eb76dad662df58c49a9b0 (patch)
tree7a8ca1e45c9fa357260e126b02d72542211114d4 /llvm/test
parent81ceebc56e9db99807d2641b9c561124baac5905 (diff)
downloadbcm5719-llvm-592239d498c97c25d06eb76dad662df58c49a9b0.tar.gz
bcm5719-llvm-592239d498c97c25d06eb76dad662df58c49a9b0.zip
[mips][microMIPS] Implement ADDU16 and SUBU16 instructions
Differential Revision: http://reviews.llvm.org/D5118 llvm-svn: 220276
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Mips/micromips-16-bit-instructions.s6
-rw-r--r--llvm/test/MC/Mips/micromips-invalid.s2
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/micromips-16-bit-instructions.s b/llvm/test/MC/Mips/micromips-16-bit-instructions.s
index 2aea84f6a37..4a4b9eb82d8 100644
--- a/llvm/test/MC/Mips/micromips-16-bit-instructions.s
+++ b/llvm/test/MC/Mips/micromips-16-bit-instructions.s
@@ -9,6 +9,8 @@
#------------------------------------------------------------------------------
# Little endian
#------------------------------------------------------------------------------
+# CHECK-EL: addu16 $6, $17, $4 # encoding: [0x42,0x07]
+# CHECK-EL: subu16 $5, $16, $3 # encoding: [0xb1,0x06]
# CHECK-EL: and16 $16, $2 # encoding: [0x82,0x44]
# CHECK-EL: not16 $17, $3 # encoding: [0x0b,0x44]
# CHECK-EL: or16 $16, $4 # encoding: [0xc4,0x44]
@@ -29,6 +31,8 @@
#------------------------------------------------------------------------------
# Big endian
#------------------------------------------------------------------------------
+# CHECK-EB: addu16 $6, $17, $4 # encoding: [0x07,0x42]
+# CHECK-EB: subu16 $5, $16, $3 # encoding: [0x06,0xb1]
# CHECK-EB: and16 $16, $2 # encoding: [0x44,0x82]
# CHECK-EB: not16 $17, $3 # encoding: [0x44,0x0b]
# CHECK-EB: or16 $16, $4 # encoding: [0x44,0xc4]
@@ -47,6 +51,8 @@
# CHECK-EB: jr16 $9 # encoding: [0x45,0x89]
# CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
+ addu16 $6, $17, $4
+ subu16 $5, $16, $3
and16 $16, $2
not16 $17, $3
or16 $16, $4
diff --git a/llvm/test/MC/Mips/micromips-invalid.s b/llvm/test/MC/Mips/micromips-invalid.s
index b9697c2d44b..9cea8ef8b57 100644
--- a/llvm/test/MC/Mips/micromips-invalid.s
+++ b/llvm/test/MC/Mips/micromips-invalid.s
@@ -3,6 +3,8 @@
addius5 $7, 9 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: immediate operand value out of range
addiusp 1032 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: immediate operand value out of range
+ addu16 $6, $14, $4 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
+ subu16 $5, $16, $9 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
and16 $16, $8 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
not16 $18, $9 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
or16 $16, $10 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
OpenPOWER on IntegriCloud