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

Unified Diff: tests_lit/assembler/arm32/branch-simple.ll

Issue 1407273006: Generate block labels in the ARM hybrid assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. 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') | tests_lit/assembler/arm32/global-load-store.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/arm32/branch-simple.ll
diff --git a/tests_lit/assembler/arm32/branch-simple.ll b/tests_lit/assembler/arm32/branch-simple.ll
new file mode 100644
index 0000000000000000000000000000000000000000..c782cc85e9ae668660073088c72b9847c89e28ab
--- /dev/null
+++ b/tests_lit/assembler/arm32/branch-simple.ll
@@ -0,0 +1,64 @@
+; Test branching instructions.
+; TODO(kschimpf): Get this working.
+
+; Compile using standalone assembler.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
+; RUN: | FileCheck %s --check-prefix=ASM
+
+; Show bytes in assembled standalone code.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
+
+; Compile using integrated assembler.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
+; RUN: | FileCheck %s --check-prefix=IASM
+
+; Show bytes in assembled integrated code.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
+
+; REQUIRES: allow_dump
+
+define internal void @simple_uncond_branch() {
+; DIS-LABEL: 00000000 <simple_uncond_branch>:
+; ASM-LABEL: simple_uncond_branch:
+; IASM-LABEL:simple_uncond_branch:
+
+; ASM-NEXT: .Lsimple_uncond_branch$__0:
+; IASM-NEXT: .Lsimple_uncond_branch$__0:
+
+ br label %l2
+; ASM-NEXT: b .Lsimple_uncond_branch$l2
+; IASM-NEXT: b .Lsimple_uncond_branch$l2
+; DIS-NEXT: 0: ea000000
+
+l1:
+; ASM-NEXT: .Lsimple_uncond_branch$l1:
+; IASM-NEXT: .Lsimple_uncond_branch$l1:
+
+ br label %l3
+; ASM-NEXT: b .Lsimple_uncond_branch$l3
+; IASM-NEXT: b .Lsimple_uncond_branch$l3
+; DIS-NEXT: 4: ea000000
+
+l2:
+; ASM-NEXT: .Lsimple_uncond_branch$l2:
+; IASM-NEXT: .Lsimple_uncond_branch$l2:
+
+ br label %l1
+; ASM-NEXT: b .Lsimple_uncond_branch$l1
+; IASM-NEXT: b .Lsimple_uncond_branch$l1
+; DIS-NEXT: 8: eafffffd
+
+l3:
+; ASM-NEXT: .Lsimple_uncond_branch$l3:
+; IASM-NEXT: .Lsimple_uncond_branch$l3:
+
+ ret void
+; ASM-NEXT: bx lr
+; IASM-NEXT: .byte 0x1e
+; IASM-NEXT: .byte 0xff
+; IASM-NEXT: .byte 0x2f
+; IASM-NEXT: .byte 0xe1
+
+}
« no previous file with comments | « tests_lit/assembler/arm32/add.ll ('k') | tests_lit/assembler/arm32/global-load-store.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698