Post #1983859
2025-07-31 00:42 UTC
The state of arm64 assembly support is so bad that godbolt doesn't even support armv8-a clang at all when selecting assembly language, so I can't even demonstrate the issue that I was gonna complain about.
Replies (1)
-
@siguza@infosec.space 2025-07-31 00:57
Anyway, consider: L1: nop nop nop nop nop L2: ret Using clang-1700.0.13.3, this works fine: mov x0, (L2 - L1) Whereas this does not: movz x0, (L2 - L1) demo.S:12:14: error: immediate must be an integer in range [0, 65535]. movz x0, (L2 - L1) ^ (Note that the two labels are 0x14 bytes apart, so the only legal choice for mov above is movz.) Doing raw math is completely fine: .4byte (0xd2800000 | ((L2 - L1) 0xffff .error "Out of bounds" .endif demo.S:15:5: error: expected absolute expression .if (L2 - L1) > 0xffff ^ ???