On 6/22/26 3:51 PM, Jeffrey Law wrote: >>> On 6/21/2026 8:59 PM, Peter Bergner wrote: >>>> I downloaded musl, newlib and >>>> picolibc and their riscv setjmp functions do save all non-volatile >>>> registers,
I have also downloaded uclibc and bionic and they also save/restore the non-volatile registers, so basically every libc I've looked at behaves correctly on riscv. I will argue that if we ever see a libc for riscv that does not behave that way, then that is a bug in that libc. > I meant I don't think we need to worry about changing the C library via > command line options. So if we're configured for glibc, we know we'll > still be using glibc. Similarly for musl or the other libraries. Thus > if you've confirmed a particular library does the right thing WRT > setjmp, then I think we're free to handle that library just like you're > doing for glibc. On yesterday's GCC patch review call, Jeff Ok'd not needing to limit this change to only GLIBC and enabling it everywhere, so just: +# undef TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P +# define TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P hook_bool_void_true I'm redoing my testing and will push this when that returns with no regressions. If anyone else has concerns, please speak up before that. Peter
