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

Side by Side Diff: tests_lit/assembler/arm32/trap.ll

Issue 1649053002: Add the trap instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « tests_lit/assembler/arm32/sdiv.ll ('k') | tests_lit/assembler/arm32/udiv.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Test the "vmrs APSR_nzcv, FPSCR" form of the VMRS instruction. 1 ; Show that we can translate IR instruction "trap".
2 2
3 ; Note: We use integer division to test this, since a trap is inserted
Jim Stichnoth 2016/01/29 20:49:53 Could you also test the "unreachable" bitcode inst
Karl 2016/01/29 22:00:36 Done.
4 ; if one divides by zero.
5
3 ; REQUIRES: allow_dump 6 ; REQUIRES: allow_dump
4 7
5 ; Compile using standalone assembler. 8 ; Compile using standalone assembler.
6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ 9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
7 ; RUN: | FileCheck %s --check-prefix=ASM 10 ; RUN: | FileCheck %s --check-prefix=ASM
8 11
9 ; Show bytes in assembled standalone code. 12 ; Show bytes in assembled standalone code.
10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ 13 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
11 ; RUN: --args -Om1 \ 14 ; RUN: --args -Om1 \
12 ; RUN: | FileCheck %s --check-prefix=DIS 15 ; RUN: | FileCheck %s --check-prefix=DIS
13 16
14 ; Compile using integrated assembler. 17 ; Compile using integrated assembler.
15 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ 18 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
16 ; RUN: | FileCheck %s --check-prefix=IASM 19 ; RUN: | FileCheck %s --check-prefix=IASM
17 20
18 ; Show bytes in assembled integrated code. 21 ; Show bytes in assembled integrated code.
19 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ 22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
20 ; RUN: --args -Om1 \ 23 ; RUN: --args -Om1 \
21 ; RUN: | FileCheck %s --check-prefix=DIS 24 ; RUN: | FileCheck %s --check-prefix=DIS
22 25
23 define internal i32 @testVmrsASPR_nzcv() { 26 define internal i32 @testTrap(i32 %v1, i32 %v2) {
24 ; ASM-LABEL: testVmrsASPR_nzcv: 27 ; ASM-LABEL: testTrap:
25 ; DIS-LABEL: 00000000 <testVmrsASPR_nzcv>: 28 ; DIS-LABEL: 00000000 <testTrap>:
29 ; IASM-LABEL: testTrap:
26 30
27 entry: 31 %res = udiv i32 %v1, %v2
28 ; ASM: .LtestVmrsASPR_nzcv$entry:
29 32
30 %test = fcmp olt float 0.0, 0.0 33 ; ASM: bne
34 ; DIS: 18:» 1a000000
Jim Stichnoth 2016/01/29 20:49:53 tabs
35 ; IASM-NOT: bne
31 36
32 ; ASM: vmrs APSR_nzcv, FPSCR 37 ; ASM-NEXT: .long 0xe7fedef0
33 ; DIS: 14: eef1fa10 38 ; DIS-NEXT: 1c:» e7fedef0
34 ; IASM-NOT: vmrs 39 ; IASM-NOT: .long
35 40
36 %result = zext i1 %test to i32 41 ret i32 %res
37 ret i32 %result
38 } 42 }
OLDNEW
« no previous file with comments | « tests_lit/assembler/arm32/sdiv.ll ('k') | tests_lit/assembler/arm32/udiv.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698