On 29.07.2026 09:41, [email protected] wrote:
Hi all,
I am working on building kertex for windows, and I believe I found a bug with
TinyCC.
fixed i hope ยท Thewafflication/kertex_package@f099814
<https://github.com/Thewafflication/kertex_package/actions/runs/30430108664/job/90505462956#step:9:152>
* TinyCC: 0.9.28rc
* Commit: d9d02c56401e
* Target: AArch64 Windows
* Host: GitHub windows-11-arm
> The decisive generated instructions are:
>
> mov w0, #-0x1000000
>
> add x1, x1, x0
>
> Writing w0 zero-extends into x0, so the add uses 0x00000000ff000000 instead
of 0xffffffffff000000. The result is exactly 0x100000000 too high.
Seems that a 32-bit-windows 'long' at
static void arm64_sym(int r, Sym *sym, unsigned long addend)
could truncate the addend even before the generator would see it.
Try unsigned long long or uint64_t.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel