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

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

Issue 1432413003: Implement UXTB and UXTH in the ARM integerated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Merge with master. Created 5 years, 1 month 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 | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Test the UXTB and UXTH instructions.
2
3 ; NOTE: We use -O2 to get rid of memory stores.
4
5 ; REQUIRES: allow_dump
6
7 ; Compile using standalone assembler.
8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
9 ; RUN: | FileCheck %s --check-prefix=ASM
10
11 ; Show bytes in assembled standalone code.
12 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
13 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
14
15 ; Compile using integrated assembler.
16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
17 ; RUN: | FileCheck %s --check-prefix=IASM
18
19 ; Show bytes in assembled integrated code.
20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
21 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
22
23 define internal i32 @_Z7testAddhh(i32 %a, i32 %b) {
24 ; ASM-LABEL: _Z7testAddhh:
25 ; DIS-LABEL: 00000000 <_Z7testAddhh>:
26 ; IASM-LABEL: _Z7testAddhh:
27
28 entry:
29
30 ; ASM-NEXT: .L_Z7testAddhh$entry:
31 ; IASM-NEXT: .L_Z7testAddhh$entry:
32
33 %a.arg_trunc = trunc i32 %a to i8
34 %conv = zext i8 %a.arg_trunc to i32
35
36 ; ASM-NEXT: uxtb r0, r0
37 ; DIS-NEXT: 0: e6ef0070
38 ; IASM-NEXT: .byte 0x70
39 ; IASM-NEXT: .byte 0x0
40 ; IASM-NEXT: .byte 0xef
41 ; IASM-NEXT: .byte 0xe6
42
43 %b.arg_trunc = trunc i32 %b to i8
44 %conv1 = zext i8 %b.arg_trunc to i32
45
46 ; ASM-NEXT: uxtb r1, r1
47 ; DIS-NEXT: 4: e6ef1071
48 ; IASM-NEXT: .byte 0x71
49 ; IASM-NEXT: .byte 0x10
50 ; IASM-NEXT: .byte 0xef
51 ; IASM-NEXT: .byte 0xe6
52
53 %add = add i32 %conv1, %conv
54
55 ; ASM-NEXT: add r1, r1, r0
56 ; DIS-NEXT: 8: e0811000
57 ; IASM-NEXT: .byte 0x0
58 ; IASM-NEXT: .byte 0x10
59 ; IASM-NEXT: .byte 0x81
60 ; IASM-NEXT: .byte 0xe0
61
62 %conv2 = trunc i32 %add to i16
63 %conv2.ret_ext = zext i16 %conv2 to i32
64
65 ; ASM-NEXT: uxth r1, r1
66 ; DIS-NEXT: c: e6ff1071
67 ; IASM-NEXT: .byte 0x71
68 ; IASM-NEXT: .byte 0x10
69 ; IASM-NEXT: .byte 0xff
70 ; IASM-NEXT: .byte 0xe6
71
72 ret i32 %conv2.ret_ext
73
74 ; ASM-NEXT: mov r0, r1
75 ; DIS-NEXT: 10: e1a00001
76 ; IASM-NEXT: mov r0, r1
77
78 ; ASM-NEXT: bx lr
79 ; DIS-NEXT: 14: e12fff1e
80 ; IASM-NEXT: .byte 0x1e
81 ; IASM-NEXT: .byte 0xff
82 ; IASM-NEXT: .byte 0x2f
83 ; IASM-NEXT: .byte 0xe1
84
85 }
86
OLDNEW
« no previous file with comments | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698