mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-17 23:54:16 +08:00
Replace raw-register AMO asm with proper inline-asm constraints for all three operands (rd, rs2, rs1). Use long long for .d-word AMO variants with pre-set values (xd=0xCAFEBABECAFEBABE, val=0xDEADBEEFDEADBEEF) to avoid uninitialized-data issues. Restore csr_pseudo_main printf output and re-enable amo_main() in the test (was commented out as 'crash on qemu'). Use GEN = $(GEN-TCC) since GCC and TCC produce different fcsr initial values on riscv64.
7 lines
95 B
Plaintext
7 lines
95 B
Plaintext
csrr fcsr=1
|
|
csrw: wrote e0 got e0
|
|
csrwi: wrote 0x10 got 10
|
|
csrsi: old|3=3
|
|
csrci: old&~3=0
|
|
PASS
|