Commit 8cf33a5
[cc] Fix loop regalloc, macOS .comm alignment, and array alignment
- Loop-carried values now use callee-saved registers to prevent clobber
across iterations when no function calls force spills. Added `in_loop`
flag to LiveInterval for intervals spanning loop back edges.
- macOS .comm directive now emits log2(alignment) per Apple assembler
convention, while Linux/FreeBSD continue using byte alignment.
- Global arrays >= 16 bytes now get 16-byte alignment, matching clang's
LargeArrayMinWidth optimization for vectorization.
These fixes enable successful compilation of zlib (`make test` passes).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 5a99d3e commit 8cf33a5
File tree
7 files changed
+485
-9
lines changed- cc
- arch
- x86_64
- tests
- features
- globals
7 files changed
+485
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
620 | 632 | | |
621 | 633 | | |
622 | 634 | | |
623 | 635 | | |
624 | 636 | | |
625 | | - | |
| 637 | + | |
626 | 638 | | |
627 | 639 | | |
628 | 640 | | |
| |||
890 | 902 | | |
891 | 903 | | |
892 | 904 | | |
| 905 | + | |
893 | 906 | | |
| 907 | + | |
894 | 908 | | |
895 | 909 | | |
896 | 910 | | |
897 | 911 | | |
| 912 | + | |
898 | 913 | | |
899 | 914 | | |
900 | | - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
901 | 958 | | |
902 | 959 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| |||
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
| 176 | + | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| |||
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| 215 | + | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
| |||
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
| 233 | + | |
227 | 234 | | |
228 | 235 | | |
229 | 236 | | |
| |||
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| 272 | + | |
265 | 273 | | |
266 | 274 | | |
267 | 275 | | |
| |||
281 | 289 | | |
282 | 290 | | |
283 | 291 | | |
| 292 | + | |
284 | 293 | | |
285 | 294 | | |
286 | 295 | | |
| |||
310 | 319 | | |
311 | 320 | | |
312 | 321 | | |
313 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
314 | 326 | | |
315 | 327 | | |
316 | 328 | | |
317 | 329 | | |
318 | | - | |
| 330 | + | |
| 331 | + | |
319 | 332 | | |
320 | | - | |
321 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
322 | 336 | | |
| 337 | + | |
323 | 338 | | |
324 | 339 | | |
325 | 340 | | |
| |||
338 | 353 | | |
339 | 354 | | |
340 | 355 | | |
| 356 | + | |
341 | 357 | | |
342 | 358 | | |
343 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
744 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
745 | 746 | | |
746 | 747 | | |
747 | 748 | | |
| |||
0 commit comments