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

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

Issue 1516063002: Add some missing encodings in the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up CL. 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
(Empty)
1 ; Show that we know how to translate mov (shifted register), which
2 ; are pseudo instructions for ASR, LSR, ROR, and RRX.
3
4 ; NOTE: We use -O2 to get rid of memory stores.
5
6 ; REQUIRES: allow_dump
7
8 ; Compile using standalone assembler.
9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
10 ; RUN: | FileCheck %s --check-prefix=ASM
11
12 ; Show bytes in assembled standalone code.
13 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
14 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
15
16 ; Compile using integrated assembler.
17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
18 ; RUN: | FileCheck %s --check-prefix=IASM
19
20 ; Show bytes in assembled integrated code.
21 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
22 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
23
24 define internal i64 @_Z4castIaxET0_T_(i32 %a) {
Jim Stichnoth 2015/12/11 16:53:45 Friendlier function name?
Karl 2015/12/11 17:42:16 Done.
25 ; ASM-LABEL:_Z4castIaxET0_T_:
26 ; DIS-LABEL:00000000 <_Z4castIaxET0_T_>:
27 ; IASM-LABEL:_Z4castIaxET0_T_:
28
29 entry:
30 ; ASM-NEXT:.L_Z4castIaxET0_T_$entry:
31 ; IASM-NEXT:.L_Z4castIaxET0_T_$entry:
32
33 %a.arg_trunc = trunc i32 %a to i8
34 %conv = sext i8 %a.arg_trunc to i64
35 ret i64 %conv
36
37 ; ASM-NEXT: sxtb r0, r0
38 ; DIS-NEXT: 0: e6af0070
39 ; IASM-NEXT: .byte 0x70
40 ; IASM-NEXT: .byte 0x0
41 ; IASM-NEXT: .byte 0xaf
42 ; IASM-NEXT: .byte 0xe6
43
44 ; ***** Example of mov pseudo instruction.
45 ; ASM-NEXT: mov r1, r0, asr #31
46 ; DIS-NEXT: 4: e1a01fc0
47 ; IASM-NEXT: .byte 0xc0
48 ; IASM-NEXT: .byte 0x1f
49 ; IASM-NEXT: .byte 0xa0
50 ; IASM-NEXT: .byte 0xe1
51
52 ; ASM-NEXT: bx lr
53
54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698