Re: [Bug target/106585] RISC-V: Mis-optimized code gen for zbs

2022-12-07 Thread Andrew Waterman
On Wed, Dec 7, 2022 at 7:02 PM palmer at gcc dot gnu.org via Gcc-bugs wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106585 > > palmer at gcc dot gnu.org changed: > >What|Removed |Added > -

Re: [Bug target/106265] RISC-V SPEC2017 507.cactu code bloat due to address generation

2022-07-12 Thread Andrew Waterman
To be clear, `li rx, 4096' isn't unsupported: it's a very-much-supported idiom for `lui rx, 1`. On Mon, Jul 11, 2022 at 11:45 PM rguenth at gcc dot gnu.org via Gcc-bugs wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106265 > > --- Comment #5 from Richard Biener --- > So why do we even

Re: [Bug target/104831] RISCV libatomic LR.aq/SC.rl pair insufficient for SEQ_CST

2022-03-07 Thread Andrew Waterman
Cool, thanks, Patrick. On Mon, Mar 7, 2022 at 6:58 PM patrick at rivosinc dot com via Gcc-bugs wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104831 > > Patrick O'Neill changed: > >What|Removed |Added > ---

Re: [Bug target/104831] New: RISCV libatomic LR.aq/SC.rl pair insufficient for SEQ_CST

2022-03-07 Thread Andrew Waterman
Correction: Appendix A recommends lr.w.aqrl + sc.w.rl. https://github.com/riscv/riscv-isa-manual/blob/9ec8c0105dbf1492b57f6cafdb90a268628f476a/src/memory.tex#L1150-L1152 On Mon, Mar 7, 2022 at 3:51 PM Andrew Waterman wrote: > > Appendix A of the RISC-V ISA manual says that lr.w.aq + sc.

Re: [Bug target/104831] New: RISCV libatomic LR.aq/SC.rl pair insufficient for SEQ_CST

2022-03-07 Thread Andrew Waterman
Appendix A of the RISC-V ISA manual says that lr.w.aq + sc.w.aqrl should suffice. I see the patch puts aqrl on both the load and store, which, while correct, appears to be stronger than necessary. (cc Dan Lustig) On Mon, Mar 7, 2022 at 3:25 PM patrick at rivosinc dot com via Gcc-bugs wrote: >

Re: [Bug target/102211] [12 regression] ICE introduced by r12-3277

2021-09-09 Thread Andrew Waterman
On Tue, Sep 7, 2021 at 10:55 PM wilson at gcc dot gnu.org via Gcc-bugs wrote: > > The hardware may trap if > you access a 32-bit value which is not properly NaN-boxed. I don't think the following affects the resolution of the ticket, but just for the record, trapping is _not_ an option the ISA pe

Re: [Bug bootstrap/91602] GCC fails to build for riscv in a combined tree due to misconfigured leb128 support

2019-08-29 Thread Andrew Waterman
Yeah, this is a bit a rat hole. Of course there's nothing about RISC-V that precludes the use of the leb128 data formats. We fib that they aren't supported to prevent the DWARF emitters from subtracting label addresses at assembly time. RISC-V linker relaxations foil the assumption that those di

Re: [Bug c++/91420] relocation truncated to fit: R_RISCV_HI20 against `.LC0' with GCC 8.2/8.3 with "-O2" on RISC-V

2019-08-11 Thread Andrew Waterman
In -O2, the compiler materializes ("x" + INT_MIN) by loading that symbol+offset into a register in one shot, whereas in -O0 it loads the address of "x" into a register, then adds INT_MIN to that register. The same phenomenon happens in the x86-64 -mcmodel=kernel case.

Re: [Bug c++/91420] New: relocation truncated to fit: R_RISCV_HI20 against `.LC0' with GCC 8.2/8.3 on RISC-V

2019-08-11 Thread Andrew Waterman
The RISC-V code models currently in existence place a 2 GiB limit on the extent of the statically linked portion of a binary. Rather than a bug, I would describe this as a limitation of the existing code models, which we should eventually lift by introducing larger code models. Note that it's pos

Re: [Bug target/86005] [RISCV] Invalid intermixing of __atomic_* libcalls and inline atomic instruction sequences

2018-05-30 Thread Andrew Waterman
I realize the documentation doesn't concur with me, but as long as gcc and libgcc agree on the lock-freeness of the routines, I don't see the harm. (wrt. rv32ia, at least.) On Wed, May 30, 2018 at 10:40 PM, asb at lowrisc dot org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86005 > > Ale

Re: [Bug target/82717] [RISCV] Default value of the -mabi option doesn't match documentation

2017-10-25 Thread Andrew Waterman
On Wed, Oct 25, 2017 at 12:27 PM, asb at lowrisc dot org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82717 > > --- Comment #2 from Alex Bradbury --- > (In reply to palmer from comment #1) >> Thanks Alex -- you're correct that this is a documentation/code mismatch. I >> just talked to A