[llvm] r180245 - Test case for r180238.
Akira Hatanaka
ahatanaka at mips.com
Wed Apr 24 19:21:09 PDT 2013
Author: ahatanak
Date: Wed Apr 24 21:21:09 2013
New Revision: 180245
URL: http://llvm.org/viewvc/llvm-project?rev=180245&view=rev
Log:
Test case for r180238.
Added:
llvm/trunk/test/MC/Mips/micromips-shift-instructions.s
Added: llvm/trunk/test/MC/Mips/micromips-shift-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/micromips-shift-instructions.s?rev=180245&view=auto
==============================================================================
--- llvm/trunk/test/MC/Mips/micromips-shift-instructions.s (added)
+++ llvm/trunk/test/MC/Mips/micromips-shift-instructions.s Wed Apr 24 21:21:09 2013
@@ -0,0 +1,22 @@
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mcpu=mips32r2 -mattr=micromips | FileCheck %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]
+ sll $4, $3, 7
+ sllv $2, $3, $5
+ sra $4, $3, 7
+ srav $2, $3, $5
+ srl $4, $3, 7
+ srlv $2, $3, $5
+ rotr $9, $6, 7
+ rotrv $9, $6, $7
More information about the llvm-commits
mailing list