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

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

Issue 1521133002: Add CLZ instruction to the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix comment in clz.ll 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 clz.
2
3 ; NOTE: We use -Om1 to get rid of memory stores.
Jim Stichnoth 2015/12/11 23:44:34 All the other .ll files with this comment say the
Karl 2015/12/17 16:02:40 Yes, I wanted to maximize stability in this case.
4
5 ; REQUIRES: allow_dump
6
7 ; Compile using standalone assembler.
8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
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 -Om1 | FileCheck %s --check-prefix=DIS
14
15 ; Compile using integrated assembler.
16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
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 -Om1 | FileCheck %s --check-prefix=DIS
22
23 declare i32 @llvm.ctlz.i32(i32, i1)
24
25 define internal i32 @testClz(i32 %a) {
26 ; ASM-LABEL:testClz:
27 ; DIS-LABEL:00000000 <testClz>:
28 ; IASM-LABEL:testClz:
29
30 entry:
31 ; ASM-NEXT:.LtestClz$entry:
32 ; IASM-NEXT:.LtestClz$entry:
33
34 ; ASM-NEXT: sub sp, sp, #8
35 ; DIS-NEXT: 0: e24dd008
36 ; IASM-NEXT: .byte 0x8
37 ; IASM-NEXT: .byte 0xd0
38 ; IASM-NEXT: .byte 0x4d
39 ; IASM-NEXT: .byte 0xe2
40
41 ; ASM-NEXT: str r0, [sp, #4]
42 ; ASM-NEXT: # [sp, #4] = def.pseudo
43 ; DIS-NEXT: 4: e58d0004
44 ; IASM-NEXT: .byte 0x4
45 ; IASM-NEXT: .byte 0x0
46 ; IASM-NEXT: .byte 0x8d
47 ; IASM-NEXT: .byte 0xe5
48
49 %x = call i32 @llvm.ctlz.i32(i32 %a, i1 0)
50
51 ; ASM-NEXT: ldr r0, [sp, #4]
52 ; DIS-NEXT: 8: e59d0004
53 ; IASM-NEXT: .byte 0x4
54 ; IASM-NEXT: .byte 0x0
55 ; IASM-NEXT: .byte 0x9d
56 ; IASM-NEXT: .byte 0xe5
57
58 ; ASM-NEXT: clz r0, r0
59 ; DIS-NEXT: c: e16f0f10
60 ; IASM-NEXT: .byte 0x10
61 ; IASM-NEXT: .byte 0xf
62 ; IASM-NEXT: .byte 0x6f
63 ; IASM-NEXT: .byte 0xe1
64
65 ret i32 %x
66 }
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