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

Side by Side Diff: tests_lit/assembler/arm32/mov-const.ll

Issue 1440693002: Handle another form of MOVW in ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. 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
« src/IceAssemblerARM32.cpp ('K') | « src/IceTLS.h ('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 ; Show that we handle constants in a movw, when it isn't represented as
2 ; ConstantRelocatble (see mov-imm.ll for the ConstantRelocatable case).
Jim Stichnoth 2015/11/11 21:46:39 ConstantRelocatable
Karl 2015/11/11 22:48:19 Done.
3
Jim Stichnoth 2015/11/11 21:46:39 just use one blank line
Karl 2015/11/11 22:48:19 Done.
4
5 ; REQUIRES: allow_dump
6
7 ; Compile using standalone assembler.
8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
9 ; RUN: --test-stack-extra 4084 | 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 -Om1 --test-stack-extra 4084 | FileCheck %s --check-prefix=DIS
14
15 ; Compile using integrated assembler.
16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -unsafe-ias \
17 ; RUN: --test-stack-extra 4084 | 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 -Om1 -unsafe-ias --test-stack-extra 4084 \
22 ; RUN: | FileCheck %s --check-prefix=DIS
23
Jim Stichnoth 2015/11/11 21:46:39 single blank line for consistency
Karl 2015/11/11 22:48:19 Done.
24
25 define internal i32 @foo(i32 %x) {
26 entry:
27
28 ; ASM-LABEL: foo:
29 ; ASM-NEXT: .Lfoo$entry:
30 ; ******* Movw case to check *******
31 ; ASM-NEXT: movw ip, #4092
32 ; ASM-NEXT: sub sp, sp, ip
33 ; ASM-NEXT: str r0, [sp, #4088]
34
35 ; DIS-LABEL: 00000000 <foo>:
36 ; DIS-NEXT: 0: e300cffc
37 ; DIS-NEXT: 4: e04dd00c
38 ; DIS-NEXT: 8: e58d0ff8
39
40 ; IASM-LABEL: foo:
41 ; IASM-NEXT: .Lfoo$entry:
42
43 ; IASM-NEXT: .byte 0xfc
44 ; IASM-NEXT: .byte 0xcf
45 ; IASM-NEXT: .byte 0x0
46 ; IASM-NEXT: .byte 0xe3
47
48 ; IASM-NEXT: .byte 0xc
49 ; IASM-NEXT: .byte 0xd0
50 ; IASM-NEXT: .byte 0x4d
51 ; IASM-NEXT: .byte 0xe0
52
53 ; IASM-NEXT: .byte 0xf8
54 ; IASM-NEXT: .byte 0xf
55 ; IASM-NEXT: .byte 0x8d
56 ; IASM-NEXT: .byte 0xe5
57
58 %mul = mul i32 %x, %x
59
60 ; ASM-NEXT: ldr r0, [sp, #4088]
61 ; ASM-NEXT: ldr r1, [sp, #4088]
62 ; ASM-NEXT: mul r0, r0, r1
63 ; ASM-NEXT: str r0, [sp, #4084]
64
65 ; DIS-NEXT: c: e59d0ff8
66 ; DIS-NEXT: 10: e59d1ff8
67 ; DIS-NEXT: 14: e0000190
68 ; DIS-NEXT: 18: e58d0ff4
69
70 ; IASM-NEXT: .byte 0xf8
71 ; IASM-NEXT: .byte 0xf
72 ; IASM-NEXT: .byte 0x9d
73 ; IASM-NEXT: .byte 0xe5
74
75 ; IASM-NEXT: .byte 0xf8
76 ; IASM-NEXT: .byte 0x1f
77 ; IASM-NEXT: .byte 0x9d
78 ; IASM-NEXT: .byte 0xe5
79
80 ; IASM-NEXT: .byte 0x90
81 ; IASM-NEXT: .byte 0x1
82 ; IASM-NEXT: .byte 0x0
83 ; IASM-NEXT: .byte 0xe0
84
85 ; IASM-NEXT: .byte 0xf4
86 ; IASM-NEXT: .byte 0xf
87 ; IASM-NEXT: .byte 0x8d
88 ; IASM-NEXT: .byte 0xe5
89
90 ret i32 %mul
91
92 ; ASM-NEXT: ldr r0, [sp, #4084]
93 ; ******* Movw case to check *******
94 ; ASM-NEXT: movw ip, #4092
95 ; ASM-NEXT: add sp, sp, ip
96 ; ASM-NEXT: bx lr
97
98 ; DIS-NEXT: 1c: e59d0ff4
99 ; DIS-NEXT: 20: e300cffc
100 ; DIS-NEXT: 24: e08dd00c
101 ; DIS-NEXT: 28: e12fff1e
102
103 ; IASM-NEXT: .byte 0xf4
104 ; IASM-NEXT: .byte 0xf
105 ; IASM-NEXT: .byte 0x9d
106 ; IASM-NEXT: .byte 0xe5
107
108 ; IASM-NEXT: .byte 0xfc
109 ; IASM-NEXT: .byte 0xcf
110 ; IASM-NEXT: .byte 0x0
111 ; IASM-NEXT: .byte 0xe3
112
113 ; IASM-NEXT: .byte 0xc
114 ; IASM-NEXT: .byte 0xd0
115 ; IASM-NEXT: .byte 0x8d
116 ; IASM-NEXT: .byte 0xe0
117
118 ; IASM-NEXT: .byte 0x1e
119 ; IASM-NEXT: .byte 0xff
120 ; IASM-NEXT: .byte 0x2f
121 ; IASM-NEXT: .byte 0xe1
122
123 }
OLDNEW
« src/IceAssemblerARM32.cpp ('K') | « src/IceTLS.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698