commit a3c3bfa0236ef2364ffa372f085db1c64eb901c0
parent 010526be2280ffc15afe52166e607b6ff447594b
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Tue, 12 May 2026 22:33:21 -0700
Expand CG API status TODOs
Diffstat:
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/doc/cg-api-status.md b/doc/cg-api-status.md
@@ -128,6 +128,30 @@ comparison path losing its destination register.
3. Toy assignment only accepts identifier lvalues; pointer stores like
`*p = 7;` fail to parse.
4. Test data definitions with non-zero initializers once compile-time eval lands.
-5. Test `cfree_cg_alloca`, `cfree_cg_va_*` (variadics)
-6. Test `cfree_cg_tail_call`
-7. Write comprehensive `demo.toy` that exercises all features
+5. Test `cfree_cg_data_symbol` relocations in data initializers.
+6. Test `cfree_cg_alloca`, `cfree_cg_va_*` (variadics)
+7. Test `cfree_cg_tail_call`
+8. Test memory/address helpers: `cfree_cg_memcpy`, `cfree_cg_memset`,
+ `cfree_cg_index`, and `cfree_cg_field_addr`.
+9. Implement and test remaining public stubs:
+ - `cfree_cg_intrinsic`
+ - `cfree_cg_atomic_load`, `cfree_cg_atomic_store`,
+ `cfree_cg_atomic_rmw`, `cfree_cg_atomic_cmpxchg`,
+ `cfree_cg_atomic_fence`
+ - `cfree_cg_inline_asm`
+10. Add negative/error tests for public API misuse:
+ - stack underflow
+ - invalid type ids
+ - invalid field indexes / wrong record base
+ - unsupported data relocation widths
+11. Run targeted cross-arch validation for the public CG API and toy frontend
+ on `aa64`, `x64`, and `rv64`, especially ABI-sensitive paths such as
+ variadics, tail calls, atomics, and inline asm.
+12. Tighten and document API semantics:
+ - whether `cfree_cg_push_symbol` always pushes an lvalue or can model
+ GOT/PLT/TLS reference forms directly
+ - expression-scope value semantics, since current target scope support is
+ label-oriented rather than phi-like
+ - whether qualified type ids should be interned or remain fresh source
+ identities
+13. Write comprehensive `demo.toy` that exercises all features