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

Unified Diff: tests_lit/assembler/arm32/sub.ll

Issue 1411873002: emit add/sub registers instructions in integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 2 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 | « tests_lit/assembler/arm32/add.ll ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/arm32/sub.ll
diff --git a/tests_lit/assembler/arm32/sub.ll b/tests_lit/assembler/arm32/sub.ll
index 775c3317708a6b3017fc53eecc7be3f56c339f98..138f7bda9fe39eb2b7292d180a6c42b0aaad3030 100644
--- a/tests_lit/assembler/arm32/sub.ll
+++ b/tests_lit/assembler/arm32/sub.ll
@@ -1,5 +1,4 @@
; Show that we know how to translate instruction sub.
-; TODO(kschimpf) Currently only know how to test subtract 1 from R0.
; NOTE: We use -O2 to get rid of memory stores.
@@ -25,3 +24,20 @@ define internal i32 @sub1FromR0(i32 %p) {
; IASM-NEXT: .byte 0x40
; IASM-NEXT: .byte 0xe2
+
+define internal i32 @Sub2Regs(i32 %p1, i32 %p2) {
+ %v = sub i32 %p1, %p2
+ ret i32 %v
+}
+
+; ASM-LABEL: Sub2Regs:
+; ASM: sub r0, r0, r1
+; ASM-NEXT: bx lr
+
+; IASM-LABEL: Sub2Regs:
+
+; IASM: .byte 0x1
+; IASM-NEXT: .byte 0x0
+; IASM-NEXT: .byte 0x40
+; IASM-NEXT: .byte 0xe0
+
« no previous file with comments | « tests_lit/assembler/arm32/add.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698