tinycc/tests/asm/test-basic.c
Benjamin Oldenburg d9b0c5b920 feat: implement ARM64 extended inline assembly support
Implement full GCC-style extended inline assembly for ARM64 backend:

- Add constraint parsing (constraint_priority, skip_constraint_modifiers)
- Implement register allocation (asm_compute_constraints)
- Add code generation for prolog/epilog and load/store (asm_gen_code)
- Support output/input/read-write operands with r, w, f, x, m, g constraints
- Support immediate constraints (i, I, J, K, L, n)
- Handle clobber lists (registers, memory, cc)
- Support constraint references, early clobber, named operands
- Fix '#' character handling in tccpp.c for ARM64 asm mode

Tests: Add comprehensive test suite with 18 test cases covering all features.

All existing TCC tests continue to pass.
2026-04-04 20:02:33 +07:00

10 lines
119 B
C

#include <stdio.h>
int main(void)
{
int x = 42;
asm("mov x0, #0");
printf("x = %d\n", x);
return 0;
}