Debian Codegraph @

gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool-m23.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_cpu_cortex_m23_ok } */
3 /* { dg-options "-mpure-code" } */
4 /* { dg-add-options arm_cpu_cortex_m23 } */
5 /* { dg-final { check-function-bodies "**" "" } } */
6
7 /*
8 ** testi:
9 ** ...
10 ** movs r[0-3], #1
11 ** lsls r[0-3], #13
12 ** rsbs r[0-3], #0
13 ** ...
14 */
15 int
16 testi (int *p)
17 {
18 if (*p > 0x12345678)
19 return *p-8192;
20 else
21 return *p+8192;
22 }
23
24 /* Does not use thumb1_gen_const_int.
25 ** test_0:
26 ** ...
27 ** movs r[0-3], #0
28 ** ...
29 */
30 int
31 test_0 ()
32 {
33 return 0;
34 }
35
36 /* Does not use thumb1_gen_const_int.
37 ** test_128:
38 ** ...
39 ** movs r[0-3], #128
40 ** ...
41 */
42 int
43 test_128 ()
44 {
45 return 128;
46 }
47
48 /* Does not use thumb1_gen_const_int.
49 ** test_264:
50 ** ...
51 ** movw r[0-3], #264
52 ** ...
53 */
54 int
55 test_264 ()
56 {
57 return 264;
58 }
59
60 /* Does not use thumb1_gen_const_int.
61 ** test_510:
62 ** ...
63 ** movw r[0-3], #510
64 ** ...
65 */
66 int
67 test_510 ()
68 {
69 return 510;
70 }
71
72 /* Does not use thumb1_gen_const_int.
73 ** test_512:
74 ** ...
75 ** movw r[0-3], #512
76 ** ...
77 */
78 int
79 test_512 ()
80 {
81 return 512;
82 }
83
84 /* Does not use thumb1_gen_const_int.
85 ** test_764:
86 ** ...
87 ** movw r[0-3], #764
88 ** ...
89 */
90 int
91 test_764 ()
92 {
93 return 764;
94 }
95
96 /* Does not use thumb1_gen_const_int.
97 ** test_65536:
98 ** ...
99 ** movs r[0-3], #128
100 ** lsls r[0-3], r[0-3], #9
101 ** ...
102 */
103 int
104 test_65536 ()
105 {
106 return 65536;
107 }
108
109 /* Does not use thumb1_gen_const_int.
110 ** test_0x123456:
111 ** ...
112 ** movw r[0-3], #13398
113 ** movt r[0-3], 18
114 ** ...
115 */
116 int
117 test_0x123456 ()
118 {
119 return 0x123456;
120 }
121
122 /* Does not use thumb1_gen_const_int.
123 ** test_0x1123456:
124 ** ...
125 ** movw r[0-3], #13398
126 ** movt r[0-3], 274
127 ** ...
128 */
129 int
130 test_0x1123456 ()
131 {
132 return 0x1123456;
133 }
134
135 /* Does not use thumb1_gen_const_int.
136 ** test_0x1000010:
137 ** ...
138 ** movs r[0-3], #16
139 ** movt r[0-3], 256
140 ** ...
141 */
142 int
143 test_0x1000010 ()
144 {
145 return 0x1000010;
146 }
147
148 /* Does not use thumb1_gen_const_int.
149 ** test_0x1000011:
150 ** ...
151 ** movs r[0-3], #17
152 ** movt r[0-3], 256
153 ** ...
154 */
155 int
156 test_0x1000011 ()
157 {
158 return 0x1000011;
159 }
160
161 /*
162 ** test_m8192:
163 ** ...
164 ** movs r[0-3], #1
165 ** lsls r[0-3], #13
166 ** rsbs r[0-3], #0
167 ** ...
168 */
169 int
170 test_m8192 ()
171 {
172 return -8192;
173 }