Re: [RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Hans Boehm via Gcc-patches
I think A.6-tso also needs to change the last line in the table from lr.aqrl ... sc to lr.aq ... sc.rl, otherwise I think we have problems with a subsequent A.7-tso generated l.aq . Otherwise I agree. I certainly agree that, given the Ztso extension, there should be a standard compiler-implemented

Re: [PATCH v5 06/11] RISC-V: Strengthen atomic stores

2023-04-28 Thread Hans Boehm via Gcc-patches
The RISC-V psABI pull request is at https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/378 . Pointers to Paul Kirth's corresponding LLVM patches are also there. On Fri, Apr 28, 2023 at 2:42 PM Hans Boehm wrote: > The concern with making the new behavior non-default is of course that the >

Re: [PATCH v5 06/11] RISC-V: Strengthen atomic stores

2023-04-28 Thread Hans Boehm via Gcc-patches
The concern with making the new behavior non-default is of course that the generated code will eventually end up on an A.7-capable platform. An A.6-classic option for compiling code that will never run on a newer machine seems OK. But I'm not sure that seq_cst stores are dynamically frequent enoug

Re: [PATCH v5 00/11] RISC-V: Implement ISA Manual Table A.6 Mappings

2023-04-28 Thread Hans Boehm via Gcc-patches
We're certainly pushing for the same ABI (A.6 + trailing fence on store) in LLVM as well. I'm about to upload a pull request for the psABI document that describes this version of the ABI, and a bit of the rationale for it. I'll attach the current draft here. I agree that compatibility is critical