atomics A.0b: real seq_cst load/store emission (green)

Replace the A.0a emit bail with real LLVM atomic codegen:
- emitAtomicLoad: LLVMBuildLoad2 + LLVMSetOrdering + LLVMSetAlignment
- emitAtomicStore: LLVMBuildStore + LLVMSetOrdering + LLVMSetAlignment (value
  coerced to the pointee type, mirroring emitStore)
- llvmOrdering: explicit sx AtomicOrdering -> LLVMAtomicOrdering map (LLVM's enum
  is non-contiguous; never an identity cast)

examples/1700 now prints 7/42/43; IR is 'load atomic i64, ptr .. seq_cst, align 8'
+ 'store atomic ..'. Unit test 'emit: atomic load/store (seq_cst, aligned)' locks
the emission shape (load atomic/store atomic/seq_cst/align 8) without a fragile
full-module .ir snapshot. Suite green (710 examples + units).
This commit is contained in:
agra
2026-06-20 09:08:05 +03:00
parent 22af40413d
commit 64c7db5eb1
6 changed files with 98 additions and 22 deletions

View File

@@ -1 +1 @@
1
0

View File

@@ -1,2 +1 @@
error: atomic load LLVM emission not yet implemented (Stream A, A.0b)
error: atomic store LLVM emission not yet implemented (Stream A, A.0b)

View File

@@ -1 +1,3 @@
init: 7
after store: 42
incremented: 43