100
|
1 ; RUN: llc -no-integrated-as -march=mipsel < %s | \
|
|
2 ; RUN: FileCheck %s -check-prefix=ALL -check-prefix=GAS
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3
|
100
|
4 define void @constraint_I() nounwind {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 ; First I with short
|
100
|
6 ; ALL-LABEL: constraint_I:
|
|
7 ; ALL: #APP
|
|
8 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, 4096
|
|
9 ; ALL: #NO_APP
|
|
10 tail call i16 asm sideeffect "addiu $0, $1, $2", "=r,r,I"(i16 7, i16 4096) nounwind
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 ; Then I with int
|
100
|
13 ; ALL: #APP
|
|
14 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
|
|
15 ; ALL: #NO_APP
|
|
16 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,I"(i32 7, i32 -3) nounwind
|
|
17 ret void
|
|
18 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19
|
100
|
20 define void @constraint_J() nounwind {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 ; Now J with 0
|
100
|
22 ; ALL-LABEL: constraint_J:
|
|
23 ; ALL: #APP
|
|
24 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, 0
|
|
25 ; ALL: #NO_APP
|
|
26 tail call i32 asm sideeffect "addiu $0, $1, $2\0A\09 ", "=r,r,J"(i32 7, i16 0) nounwind
|
|
27 ret void
|
|
28 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
29
|
100
|
30 define void @constraint_K() nounwind {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 ; Now K with 64
|
100
|
32 ; ALL: #APP
|
|
33 ; GAS: addu ${{[0-9]+}}, ${{[0-9]+}}, 64
|
|
34 ; ALL: #NO_APP
|
|
35 tail call i16 asm sideeffect "addu $0, $1, $2\0A\09 ", "=r,r,K"(i16 7, i16 64) nounwind
|
|
36 ret void
|
|
37 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
38
|
100
|
39 define void @constraint_L() nounwind {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 ; Now L with 0x00100000
|
100
|
41 ; ALL: #APP
|
|
42 ; ALL: add ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}}
|
|
43 ; ALL: #NO_APP
|
|
44 tail call i32 asm sideeffect "add $0, $1, $3\0A\09", "=r,r,L,r"(i32 7, i32 1048576, i32 0) nounwind
|
|
45 ret void
|
|
46 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47
|
100
|
48 define void @constraint_N() nounwind {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
49 ; Now N with -3
|
100
|
50 ; ALL: #APP
|
|
51 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
|
|
52 ; ALL: #NO_APP
|
|
53 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,N"(i32 7, i32 -3) nounwind
|
|
54 ret void
|
|
55 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
56
|
100
|
57 define void @constraint_O() nounwind {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58 ; Now O with -3
|
100
|
59 ; ALL: #APP
|
|
60 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
|
|
61 ; ALL: #NO_APP
|
|
62 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,O"(i32 7, i16 -3) nounwind
|
|
63 ret void
|
|
64 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65
|
100
|
66 define void @constraint_P() nounwind {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67 ; Now P with 65535
|
100
|
68 ; ALL: #APP
|
|
69 ; GAS: addiu ${{[0-9]+}}, ${{[0-9]+}}, 65535
|
|
70 ; ALL: #NO_APP
|
|
71 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,P"(i32 7, i32 65535) nounwind
|
|
72 ret void
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
73 }
|