tinycc/tests/asm/test-mini.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

14 lines
217 B
C

#include <stdio.h>
#include <assert.h>
int main(void)
{
int x = 42;
int y;
asm("ldr %0, [%1]" : "=r"(y) : "r"(&x));
printf("y = %d\n", y);
assert(y == 42);
printf("PASSED\n");
return 0;
}