Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Unified Diff: tests_lit/assembler/mips32/encoding_test_arith.ll

Issue 2375923002: Subzero, MIPS32: SRAV instruction encoding (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/mips32/encoding_test_arith.ll
diff --git a/tests_lit/assembler/mips32/encoding_test_arith.ll b/tests_lit/assembler/mips32/encoding_test_arith.ll
index 7df1d49de4ccb1f6b4aea0ab112cd3c81c966ea6..417d71474b25360b7e2e4a81403ae10a5ccff473 100644
--- a/tests_lit/assembler/mips32/encoding_test_arith.ll
+++ b/tests_lit/assembler/mips32/encoding_test_arith.ll
@@ -162,3 +162,35 @@ define internal i32 @test_02(i32 %a) {
; IASM-NEXT: .byte 0x0
; IASM-NEXT: .byte 0x0
; IASM-NEXT: .byte 0x0
+
+define internal i32 @ashrImm(i32 %val, i32 %shift) {
+entry:
+ %result = ashr i32 %val, %shift
+ ret i32 %result
+}
+
+; ASM-LABEL: ashrImm:
+; ASM-NEXT: .LashrImm$entry:
+; ASM-NEXT: srav $a0, $a0, $a1
+; ASM-NEXT: move $v0, $a0
+; ASM-NEXT: jr $ra
+
+; DIS-LABEL: <ashrImm>:
+; DIS-NEXT: 00a42007 srav a0,a0,a1
+; DIS-NEXT: 00801021 move v0,a0
+; DIS-NEXT: 03e00008 jr ra
+
+; IASM-LABEL: ashrImm:
+; IASM-NEXT: .LashrImm$entry:
+; IASM-NEXT: .byte 0x7
+; IASM-NEXT: .byte 0x20
+; IASM-NEXT: .byte 0xa4
+; IASM-NEXT: .byte 0x0
+; IASM-NEXT: .byte 0x21
+; IASM-NEXT: .byte 0x10
+; IASM-NEXT: .byte 0x80
+; IASM-NEXT: .byte 0x0
+; IASM-NEXT: .byte 0x8
+; IASM-NEXT: .byte 0x0
+; IASM-NEXT: .byte 0xe0
+; IASM-NEXT: .byte 0x3
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698