mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-20 03:44:19 +08:00
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.
14 lines
217 B
C
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;
|
|
}
|