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

Unified Diff: tests_lit/assembler/arm32/add.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 | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/sub.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/arm32/add.ll
diff --git a/tests_lit/assembler/arm32/add.ll b/tests_lit/assembler/arm32/add.ll
index 3345cab71d6c93c53f336072059584a0f7915267..2322dfcccebdfd84a71bb017a186593bb8167f8c 100644
--- a/tests_lit/assembler/arm32/add.ll
+++ b/tests_lit/assembler/arm32/add.ll
@@ -1,5 +1,4 @@
; Show that we know how to translate add.
-; TODO(kschimpf) Currently only know how to test add 1 to R0.
; NOTE: We use -O2 to get rid of memory stores.
@@ -16,8 +15,8 @@ define internal i32 @add1ToR0(i32 %p) {
}
; ASM-LABEL: add1ToR0:
-; ASM: add r0, r0, #1
-; ASM: bx lr
+; ASM: add r0, r0, #1
+; ASM-NEXT: bx lr
; IASM-LABEL: add1ToR0:
; IASM: .byte 0x1
@@ -25,3 +24,18 @@ define internal i32 @add1ToR0(i32 %p) {
; IASM-NEXT: .byte 0x80
; IASM-NEXT: .byte 0xe2
+define internal i32 @Add2Regs(i32 %p1, i32 %p2) {
+ %v = add i32 %p1, %p2
+ ret i32 %v
+}
+
+; ASM-LABEL: Add2Regs:
+; ASM: add r0, r0, r1
+; ASM-NEXT: bx lr
+
+; IASM-LABEL: Add2Regs:
+
+; IASM: .byte 0x1
+; IASM-NEXT: .byte 0x0
+; IASM-NEXT: .byte 0x80
+; IASM-NEXT: .byte 0xe0
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/sub.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698