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

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

Issue 1494433005: Add RSB instruction to the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Reformat and update Dart assembler files. 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
« 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 ; Show that we know how to translate rsb. Uses shl as example, because it
2 ; uses rsb for type i64
3
4 ; REQUIRES: allow_dump
5
6 ; Compile using standalone assembler.
7 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
8 ; RUN: | FileCheck %s --check-prefix=ASM
9
10 ; Show bytes in assembled standalone code.
11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
12 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
13
14 ; Compile using integrated assembler.
15 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
16 ; RUN: | FileCheck %s --check-prefix=IASM
17
18 ; Show bytes in assembled integrated code.
19 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
20 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS
21
22 define internal i64 @shiftLeft(i64 %v, i64 %l) {
23 ; ASM-LABEL:shiftLeft:
24 ; DIS-LABEL:00000000 <shiftLeft>:
25 ; IASM-LABEL:shiftLeft:
26
27 entry:
28 ; ASM-NEXT:.LshiftLeft$entry:
29 ; IASM-NEXT:.LshiftLeft$entry:
30
31 ; ASM-NEXT: sub sp, sp, #24
32 ; DIS-NEXT: 0: e24dd018
33 ; IASM-NEXT: .byte 0x18
34 ; IASM-NEXT: .byte 0xd0
35 ; IASM-NEXT: .byte 0x4d
36 ; IASM-NEXT: .byte 0xe2
37
38 ; ASM-NEXT: str r0, [sp, #20]
39 ; ASM-NEXT: # [sp, #20] = def.pseudo
40 ; DIS-NEXT: 4: e58d0014
41 ; IASM-NEXT: .byte 0x14
42 ; IASM-NEXT: .byte 0x0
43 ; IASM-NEXT: .byte 0x8d
44 ; IASM-NEXT: .byte 0xe5
45
46 ; ASM-NEXT: mov r0, r1
47 ; DIS-NEXT: 8: e1a00001
48 ; IASM-NEXT: .byte 0x1
49 ; IASM-NEXT: .byte 0x0
50 ; IASM-NEXT: .byte 0xa0
51 ; IASM-NEXT: .byte 0xe1
52
53 ; ASM-NEXT: str r0, [sp, #16]
54 ; ASM-NEXT: # [sp, #16] = def.pseudo
55 ; DIS-NEXT: c: e58d0010
56 ; IASM-NEXT: .byte 0x10
57 ; IASM-NEXT: .byte 0x0
58 ; IASM-NEXT: .byte 0x8d
59 ; IASM-NEXT: .byte 0xe5
60
61 ; ASM-NEXT: mov r0, r2
62 ; DIS-NEXT: 10: e1a00002
63 ; IASM-NEXT: .byte 0x2
64 ; IASM-NEXT: .byte 0x0
65 ; IASM-NEXT: .byte 0xa0
66 ; IASM-NEXT: .byte 0xe1
67
68 ; ASM-NEXT: str r0, [sp, #12]
69 ; ASM-NEXT: # [sp, #12] = def.pseudo
70 ; DIS-NEXT: 14: e58d000c
71 ; IASM-NEXT: .byte 0xc
72 ; IASM-NEXT: .byte 0x0
73 ; IASM-NEXT: .byte 0x8d
74 ; IASM-NEXT: .byte 0xe5
75
76 ; ASM-NEXT: mov r0, r3
77 ; DIS-NEXT: 18: e1a00003
78 ; IASM-NEXT: .byte 0x3
79 ; IASM-NEXT: .byte 0x0
80 ; IASM-NEXT: .byte 0xa0
81 ; IASM-NEXT: .byte 0xe1
82
83 ; ASM-NEXT: str r0, [sp, #8]
84 ; ASM-NEXT: # [sp, #8] = def.pseudo
85 ; DIS-NEXT: 1c: e58d0008
86 ; IASM-NEXT: .byte 0x8
87 ; IASM-NEXT: .byte 0x0
88 ; IASM-NEXT: .byte 0x8d
89 ; IASM-NEXT: .byte 0xe5
90
91 %result = shl i64 %v, %l
92
93 ; ASM-NEXT: ldr r0, [sp, #20]
94 ; DIS-NEXT: 20: e59d0014
95 ; IASM-NEXT: .byte 0x14
96 ; IASM-NEXT: .byte 0x0
97 ; IASM-NEXT: .byte 0x9d
98 ; IASM-NEXT: .byte 0xe5
99
100 ; ASM-NEXT: ldr r1, [sp, #16]
101 ; DIS-NEXT: 24: e59d1010
102 ; IASM-NEXT: .byte 0x10
103 ; IASM-NEXT: .byte 0x10
104 ; IASM-NEXT: .byte 0x9d
105 ; IASM-NEXT: .byte 0xe5
106
107 ; ASM-NEXT: ldr r2, [sp, #12]
108 ; DIS-NEXT: 28: e59d200c
109 ; IASM-NEXT: .byte 0xc
110 ; IASM-NEXT: .byte 0x20
111 ; IASM-NEXT: .byte 0x9d
112 ; IASM-NEXT: .byte 0xe5
113
114 ; ****** Here is the example of rsb *****
115 ; ASM-NEXT: rsb r3, r2, #32
116 ; DIS-NEXT: 2c: e2623020
117 ; IASM-NEXT: .byte 0x20
118 ; IASM-NEXT: .byte 0x30
119 ; IASM-NEXT: .byte 0x62
120 ; IASM-NEXT: .byte 0xe2
121
122 ret i64 %result
123 }
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