Commit f889f8c
committed
builtin: guard linux_bare amd64 syscalls with $if amd64
The amd64 Linux syscall layer in linux_bare was gated on `$if !i386`, which
the C backend emits as `#if !defined(__V_i386)` -- true for arm/arm64/riscv/etc.
Those targets then tried to compile `asm amd64 { syscall ... }`, failing with
"impossible constraint in 'asm'" when cross-compiling -freestanding output
(e.g. for bare-metal Cortex-M with arm-none-eabi-gcc).
Gate it on `$if amd64` instead: the block uses the amd64 syscall ABI and the
`syscall` instruction, i386 has its own linux_syscalls.i386.v, and this matches
how arch-specific asm is guarded elsewhere in vlib. amd64 output is unchanged.1 parent cc39afe commit f889f8c
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
0 commit comments