Add documentation for musttail attribute
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pure-code / no-literal-pool-m0.c
blobbd6f4af183b22fb339fb3674e9514c9eff54a2ba
1 /* { dg-do compile } */
2 /* { dg-skip-if "skip override" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
3 /* { dg-options "-mpure-code -mcpu=cortex-m0 -march=armv6s-m -mthumb -mfloat-abi=soft" } */
4 /* { dg-final { check-function-bodies "**" "" } } */
6 /* Does not use thumb1_gen_const_int.
7 ** test_0:
8 ** ...
9 ** movs r[0-3], #0
10 ** ...
12 int
13 test_0 ()
15 return 0;
18 /* Does not use thumb1_gen_const_int.
19 ** test_128:
20 ** ...
21 ** movs r[0-3], #128
22 ** ...
24 int
25 test_128 ()
27 return 128;
30 /* Does not use thumb1_gen_const_int.
31 ** test_264:
32 ** ...
33 ** movs r[0-3], #132
34 ** lsls r[0-3], r[0-3], #1
35 ** ...
37 int
38 test_264 ()
40 return 264;
43 /* Does not use thumb1_gen_const_int.
44 ** test_510:
45 ** ...
46 ** movs r[0-3], #255
47 ** lsls r[0-3], r[0-3], #1
48 ** ...
50 int
51 test_510 ()
53 return 510;
56 /* Does not use thumb1_gen_const_int.
57 ** test_512:
58 ** ...
59 ** movs r[0-3], #128
60 ** lsls r[0-3], r[0-3], #2
61 ** ...
63 int
64 test_512 ()
66 return 512;
69 /* Does not use thumb1_gen_const_int.
70 ** test_764:
71 ** ...
72 ** movs r[0-3], #191
73 ** lsls r[0-3], r[0-3], #2
74 ** ...
76 int
77 test_764 ()
79 return 764;
82 /* Does not use thumb1_gen_const_int.
83 ** test_65536:
84 ** ...
85 ** movs r[0-3], #128
86 ** lsls r[0-3], r[0-3], #9
87 ** ...
89 int
90 test_65536 ()
92 return 65536;
96 ** test_0x123456:
97 ** ...
98 ** movs r[0-3], #18
99 ** lsls r[0-3], r[0-3], #8
100 ** adds r[0-3], r[0-3], #52
101 ** lsls r[0-3], r[0-3], #8
102 ** adds r[0-3], r[0-3], #86
103 ** ...
106 test_0x123456 ()
108 return 0x123456;
112 ** test_0x1123456:
113 ** ...
114 ** movs r[0-3], #137
115 ** lsls r[0-3], r[0-3], #8
116 ** adds r[0-3], r[0-3], #26
117 ** lsls r[0-3], r[0-3], #8
118 ** adds r[0-3], r[0-3], #43
119 ** lsls r[0-3], r[0-3], #1
120 ** ...
123 test_0x1123456 ()
125 return 0x1123456;
128 /* With -Os, we generate:
129 movs r0, #16
130 lsls r0, r0, r0
131 With the other optimization levels, we generate:
132 movs r0, #16
133 lsls r0, r0, #16
134 hence the two alternatives. */
136 ** test_0x1000010:
137 ** ...
138 ** movs r[0-3], #16
139 ** lsls r[0-3], r[0-3], (#16|r[0-3])
140 ** adds r[0-3], r[0-3], #1
141 ** lsls r[0-3], r[0-3], #4
142 ** ...
145 test_0x1000010 ()
147 return 0x1000010;
151 ** test_0x1000011:
152 ** ...
153 ** movs r[0-3], #1
154 ** lsls r[0-3], r[0-3], #24
155 ** adds r[0-3], r[0-3], #17
156 ** ...
159 test_0x1000011 ()
161 return 0x1000011;
165 ** test_m8192:
166 ** ...
167 ** movs r[0-3], #1
168 ** lsls r[0-3], r[0-3], #13
169 ** rsbs r[0-3], r[0-3], #0
170 ** ...
173 test_m8192 ()
175 return -8192;