Commit 445fc0c
committed
cbe+compiler_rt: fix f16 ABI on Darwin; gate strlen extern off CBE
Both upstream regressions, not fork-specific:
- lib/zig.h: zig_compiler_rt_f16 was uint16_t only on darwin+x86; extend
to darwin+aarch64. Apple's libSystem compiler_rt is built without
COMPILER_RT_HAS_FLOAT16 so __extendhfsf2/etc take uint16_t in a GPR;
zig.h was passing _Float16 in h0. Also fix zig_convert_builtin to
return res (the bitcast result) not extern_res.
- lib/compiler_rt/common.zig F16T: aarch64+Darwin returns u16 for f32/f64
pairing, mirroring the x86 case, so Zig's compiler_rt agrees with
libSystem regardless of link order.
- lib/std/mem.zig: gate the libc strlen/wcslen fast-path off the C
backend (CBE emits a redeclaration that conflicts with the C builtin).
- test/behavior/{cast,floatop,vector,widening}.zig: skip 4 f16 tests on
stage2_x86_64+Darwin. Upstream 8195b64 rewrote scalar float
conversions to select-tables that hardcode SSE for f16; compiler_rt
uses GPR on Darwin. The proper fix is in the select tables upstream.1 parent c38724a commit 445fc0c
File tree
7 files changed
+17
-5
lines changed- lib
- compiler_rt
- std
- test/behavior
7 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
131 | 139 | | |
132 | 140 | | |
133 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1105 | 1105 | | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | | - | |
| 1108 | + | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3283 | 3283 | | |
3284 | 3284 | | |
3285 | 3285 | | |
3286 | | - | |
| 3286 | + | |
3287 | 3287 | | |
3288 | 3288 | | |
3289 | 3289 | | |
| |||
3476 | 3476 | | |
3477 | 3477 | | |
3478 | 3478 | | |
3479 | | - | |
| 3479 | + | |
3480 | 3480 | | |
3481 | 3481 | | |
3482 | 3482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1549 | 1549 | | |
1550 | 1550 | | |
1551 | 1551 | | |
| 1552 | + | |
1552 | 1553 | | |
1553 | 1554 | | |
1554 | 1555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
0 commit comments