Hi Aaron,

On Wed, Mar 20, 2024 at 02:14:18PM -0400, Aaron Merey wrote:
> 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

This is why there is the run-funcretval-struct.sh with riscv binary
testcase. So at least you can see it generates a DWARF expression for
the return values in a riscv ELF binary.

> but I see that
> for the first time a build has successfully passed on the elfutils riscv
> trybot [1].

Yes, nice.
David also tested it on the fedora riscv koji builder:
http://fedora.riscv.rocks/koji/taskinfo?taskID=1654120

============================================================================
Testsuite summary for elfutils 0.191
============================================================================
# TOTAL: 276
# PASS:  270
# SKIP:  6
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

So I think it generally works.

Thanks,

Mark

> 
> [1] https://builder.sourceware.org/buildbot/#/builders/273
> 

Reply via email to