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

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

Issue 1474883002: Subzero. ARM32. Pre-lowers calls to ARM32 Helpers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make presubmit fixes. Created 5 years 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
OLDNEW
1 ; Show that we know how to translate lsl. 1 ; Show that we know how to translate lsl.
2 2
3 ; NOTE: We use -O2 to get rid of memory stores. 3 ; NOTE: We use -O2 to get rid of memory stores.
4 4
5 ; REQUIRES: allow_dump 5 ; REQUIRES: allow_dump
6 6
7 ; Compile using standalone assembler. 7 ; Compile using standalone assembler.
8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ 8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
9 ; RUN: | FileCheck %s --check-prefix=ASM 9 ; RUN: | FileCheck %s --check-prefix=ASM
10 10
11 ; Show bytes in assembled standalone code. 11 ; Show bytes in assembled standalone code.
12 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ 12 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
13 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS 13 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
14 14
15 ; Compile using integrated assembler. 15 ; Compile using integrated assembler.
16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ 16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
17 ; RUN: | FileCheck %s --check-prefix=IASM 17 ; RUN: | FileCheck %s --check-prefix=IASM
18 18
19 ; Show bytes in assembled integrated code. 19 ; Show bytes in assembled integrated code.
20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ 20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
21 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS 21 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
22 22
23 define internal i32 @_Z8testUdivhh(i32 %a, i32 %b) { 23 define internal i32 @_Z7testIs0h(i32 %a) {
Jim Stichnoth 2015/11/30 21:47:20 Optional: Consider renaming to something that's no
John 2015/11/30 22:16:25 Done.
24 24
25 ; ASM-LABEL:_Z8testUdivhh: 25 ; ASM-LABEL:_Z7testIs0h:
26 ; DIS-LABEL:00000000 <_Z8testUdivhh>: 26 ; DIS-LABEL:00000000 <_Z7testIs0h>:
27 ; IASM-LABEL:_Z8testUdivhh: 27 ; IASM-LABEL:_Z7testIs0h:
28 28
29 entry: 29 entry:
30 30
31 ; ASM-NEXT:.L_Z8testUdivhh$entry: 31 ; ASM-NEXT:.L_Z7testIs0h$entry:
32 ; ASM-NEXT: push {lr} 32 ; IASM-NEXT:.L_Z7testIs0h$entry:
33 ; DIS-NEXT: 0: e52de004
34 ; IASM-NEXT:.L_Z8testUdivhh$entry:
35 ; IASM-NEXT: .byte 0x4
36 ; IASM-NEXT: .byte 0xe0
37 ; IASM-NEXT: .byte 0x2d
38 ; IASM-NEXT: .byte 0xe5
39 33
40 %b.arg_trunc = trunc i32 %b to i8
41 %a.arg_trunc = trunc i32 %a to i8 34 %a.arg_trunc = trunc i32 %a to i8
42 %div3 = udiv i8 %a.arg_trunc, %b.arg_trunc 35 %icmp3 = icmp eq i8 %a.arg_trunc, 0
43 36
44 ; ASM-NEXT: sub sp, sp, #12 37 ; ASM-NEXT: mov r1, #0
45 ; DIS-NEXT: 4: e24dd00c 38 ; DIS-NEXT: 0: e3a01000
39 ; IASM-NEXT: .byte 0x0
40 ; IASM-NEXT: .byte 0x10
41 ; IASM-NEXT: .byte 0xa0
42 ; IASM-NEXT: .byte 0xe3
43
44 ; ASM-NEXT: lsls r0, r0, #24
45 ; DIS-NEXT: 4: e1b00c00
46 ; IASM-NEXT: .byte 0x0
46 ; IASM-NEXT: .byte 0xc 47 ; IASM-NEXT: .byte 0xc
47 ; IASM-NEXT: .byte 0xd0
48 ; IASM-NEXT: .byte 0x4d
49 ; IASM-NEXT: .byte 0xe2
50
51 ; ASM-NEXT: lsls r2, r1, #24
52 ; DIS-NEXT: 8: e1b02c01
53 ; IASM-NEXT: .byte 0x1
54 ; IASM-NEXT: .byte 0x2c
55 ; IASM-NEXT: .byte 0xb0 48 ; IASM-NEXT: .byte 0xb0
56 ; IASM-NEXT: .byte 0xe1 49 ; IASM-NEXT: .byte 0xe1
57 50
58 %div3.ret_ext = zext i8 %div3 to i32 51 ; ASM-NEXT moveq r1, #1
59 ret i32 %div3.ret_ext 52 ; DIS-NEXT: 8: 03a01001
53 ; IASM-NEXT: .byte 0x1
54 ; IASM-NEXT: .byte 0x10
55 ; IASM-NEXT: .byte 0xa0
56 ; IASM-NEXT: .byte 0x3
57
58 %icmp3.ret_ext = zext i1 %icmp3 to i32
59 ret i32 %icmp3.ret_ext
60
61 ; ASM-NEXT mov r0, r1
62 ; DIS-NEXT: c: e1a00001
63 ; IASM-NEXT: .byte 0x1
64 ; IASM-NEXT: .byte 0x0
65 ; IASM-NEXT: .byte 0xa0
66 ; IASM-NEXT: .byte 0xe1
67
68 ; ASM-NEXT bx lr
69 ; DIS-NEXT: 10: e12fff1e
70 ; IASM-NEXT: .byte 0x1e
71 ; IASM-NEXT: .byte 0xff
72 ; IASM-NEXT: .byte 0x2f
73 ; IASM-NEXT: .byte 0xe1
60 } 74 }
61 75
62 define internal i32 @_Z7testShljj(i32 %a, i32 %b) { 76 define internal i32 @_Z7testShljj(i32 %a, i32 %b) {
63 77
64 ; ASM-LABEL:_Z7testShljj: 78 ; ASM-LABEL:_Z7testShljj:
65 ; DIS-LABEL:00000030 <_Z7testShljj>: 79 ; DIS-LABEL:00000020 <_Z7testShljj>:
66 ; IASM-LABEL:_Z7testShljj: 80 ; IASM-LABEL:_Z7testShljj:
67 81
68 entry: 82 entry:
69 83
70 ; ASM-NEXT:.L_Z7testShljj$entry: 84 ; ASM-NEXT:.L_Z7testShljj$entry:
71 ; IASM-NEXT:.L_Z7testShljj$entry: 85 ; IASM-NEXT:.L_Z7testShljj$entry:
72 86
73 %shl = shl i32 %a, %b 87 %shl = shl i32 %a, %b
74 88
75 ; ASM-NEXT: lsl r0, r0, r1 89 ; ASM-NEXT: lsl r0, r0, r1
76 ; DIS-NEXT: 30: e1a00110 90 ; DIS-NEXT: 20: e1a00110
77 ; IASM-NEXT: .byte 0x10 91 ; IASM-NEXT: .byte 0x10
78 ; IASM-NEXT: .byte 0x1 92 ; IASM-NEXT: .byte 0x1
79 ; IASM-NEXT: .byte 0xa0 93 ; IASM-NEXT: .byte 0xa0
80 ; IASM-NEXT: .byte 0xe1 94 ; IASM-NEXT: .byte 0xe1
81 95
82 ret i32 %shl 96 ret i32 %shl
83 } 97 }
OLDNEW
« src/IceTargetLoweringARM32.cpp ('K') | « src/IceTargetLoweringARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698