asb wrote:

Thanks James, that matches what I'd understood. Just one comment on this though:

> If Zaamo is present, but neither Zalrsc nor Zacas are present, I think 
> there's no way to implement a cmpxchg operation. This means lock-free atomics 
> cannot be supported, so it should `setMaxAtomicSizeInBitsSupported(0)`.

Especially given that Zaamo is 
[documented](https://github.com/riscv/riscv-zaamo-zalrsc/blob/main/zaamo-zalrsc.adoc)
 as targeting embedded systems, emitting __sync calls for the non-AMO atomics 
(as would be done with +forced-atomics, presumably they'd be implemented by 
turning off interrupts) seems defensible doesn't it? Or is there a correctness 
issue with that I'm missing?

https://github.com/llvm/llvm-project/pull/77424
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to