aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/Mips/micromips-shift-instructions.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/Mips/micromips-shift-instructions.s')
-rw-r--r--test/MC/Mips/micromips-shift-instructions.s32
1 files changed, 23 insertions, 9 deletions
diff --git a/test/MC/Mips/micromips-shift-instructions.s b/test/MC/Mips/micromips-shift-instructions.s
index 3b5060f..bbb71ac 100644
--- a/test/MC/Mips/micromips-shift-instructions.s
+++ b/test/MC/Mips/micromips-shift-instructions.s
@@ -1,17 +1,31 @@
-# RUN: llvm-mc %s -triple=mipsel -show-encoding -mcpu=mips32r2 -mattr=micromips | FileCheck %s
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mcpu=mips32r2 -mattr=micromips | FileCheck -check-prefix=CHECK-EL %s
+# RUN: llvm-mc %s -triple=mips -show-encoding -mcpu=mips32r2 -mattr=micromips | FileCheck -check-prefix=CHECK-EB %s
# Check that the assembler can handle the documented syntax
# for shift instructions.
#------------------------------------------------------------------------------
# Shift Instructions
#------------------------------------------------------------------------------
-# CHECK: sll $4, $3, 7 # encoding: [0x00,0x38,0x83,0x00]
-# CHECK: sllv $2, $3, $5 # encoding: [0x10,0x10,0x65,0x00]
-# CHECK: sra $4, $3, 7 # encoding: [0x80,0x38,0x83,0x00]
-# CHECK: srav $2, $3, $5 # encoding: [0x90,0x10,0x65,0x00]
-# CHECK: srl $4, $3, 7 # encoding: [0x40,0x38,0x83,0x00]
-# CHECK: srlv $2, $3, $5 # encoding: [0x50,0x10,0x65,0x00]
-# CHECK: rotr $9, $6, 7 # encoding: [0xc0,0x38,0x26,0x01]
-# CHECK: rotrv $9, $6, $7 # encoding: [0xd0,0x48,0xc7,0x00]
+# Little endian
+#------------------------------------------------------------------------------
+# CHECK-EL: sll $4, $3, 7 # encoding: [0x83,0x00,0x00,0x38]
+# CHECK-EL: sllv $2, $3, $5 # encoding: [0x65,0x00,0x10,0x10]
+# CHECK-EL: sra $4, $3, 7 # encoding: [0x83,0x00,0x80,0x38]
+# CHECK-EL: srav $2, $3, $5 # encoding: [0x65,0x00,0x90,0x10]
+# CHECK-EL: srl $4, $3, 7 # encoding: [0x83,0x00,0x40,0x38]
+# CHECK-EL: srlv $2, $3, $5 # encoding: [0x65,0x00,0x50,0x10]
+# CHECK-EL: rotr $9, $6, 7 # encoding: [0x26,0x01,0xc0,0x38]
+# CHECK-EL: rotrv $9, $6, $7 # encoding: [0xc7,0x00,0xd0,0x48]
+#------------------------------------------------------------------------------
+# Big endian
+#------------------------------------------------------------------------------
+# CHECK-EB: sll $4, $3, 7 # encoding: [0x00,0x83,0x38,0x00]
+# CHECK-EB: sllv $2, $3, $5 # encoding: [0x00,0x65,0x10,0x10]
+# CHECK-EB: sra $4, $3, 7 # encoding: [0x00,0x83,0x38,0x80]
+# CHECK-EB: srav $2, $3, $5 # encoding: [0x00,0x65,0x10,0x90]
+# CHECK-EB: srl $4, $3, 7 # encoding: [0x00,0x83,0x38,0x40]
+# CHECK-EB: srlv $2, $3, $5 # encoding: [0x00,0x65,0x10,0x50]
+# CHECK-EB: rotr $9, $6, 7 # encoding: [0x01,0x26,0x38,0xc0]
+# CHECK-EB: rotrv $9, $6, $7 # encoding: [0x00,0xc7,0x48,0xd0]
sll $4, $3, 7
sllv $2, $3, $5
sra $4, $3, 7