Hi Mark, On Wed, Mar 20, 2024 at 11:03 AM Mark Wielaard <m...@klomp.org> wrote: > > dwfl_module_return_value_location would fail on riscv for functions > which return a (small) struct. This patch implements the simplest > cases of flatten_aggregate in backends/riscv_retval.c. It just handles > structs containing one or two members of the same base type which fit > completely or in pieces in one or two general or floating point > registers. > > It also adds a specific test case run-funcretval-struct.sh containing > small structs of ints, longs, floats and doubles. All these testscases > now work for riscv. There is already a slightly more extensive > testcase for this in tests/run-funcretval.sh but that only has a > testcase for aarch64.
This patch LGTM. I'm not able to test it myself on riscv but I see that for the first time a build has successfully passed on the elfutils riscv trybot [1]. Aaron [1] https://builder.sourceware.org/buildbot/#/builders/273