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:
@@ -1 +1 @@
|
||||
1
|
||||
0
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
|
||||
init: 7
|
||||
after store: 42
|
||||
incremented: 43
|
||||
|
||||
Reference in New Issue
Block a user