Re: [PATCH] riscv: Partial implementation of flatten_aggregate

2024-03-20 Thread Palmer Dabbelt
On Wed, 20 Mar 2024 16:15:30 PDT (-0700), m...@klomp.org wrote: Hi Palmer, On Wed, Mar 20, 2024 at 01:17:14PM -0700, Palmer Dabbelt wrote: >+flatten_aggregate_arg (Dwarf_Die *typedie, >+ Dwarf_Word size, >+ Dwarf_Die *arg0, >+ Dwarf_Die *arg1)

Re: [PATCH] riscv: Partial implementation of flatten_aggregate

2024-03-20 Thread Mark Wielaard
Hi Palmer, On Wed, Mar 20, 2024 at 01:17:14PM -0700, Palmer Dabbelt wrote: > >+flatten_aggregate_arg (Dwarf_Die *typedie, > >+ Dwarf_Word size, > >+ Dwarf_Die *arg0, > >+ Dwarf_Die *arg1) > > { > >- /* ??? */ > >+ int tag0, tag1; > >+ Dwarf_

Re: [PATCH] riscv: Partial implementation of flatten_aggregate

2024-03-20 Thread Palmer Dabbelt
On Wed, 20 Mar 2024 08:03:12 PDT (-0700), 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 tw

Re: [PATCH] riscv: Partial implementation of flatten_aggregate

2024-03-20 Thread Mark Wielaard
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 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_agg

Re: [PATCH] riscv: Partial implementation of flatten_aggregate

2024-03-20 Thread Aaron Merey
Hi Mark, On Wed, Mar 20, 2024 at 11:03 AM Mark Wielaard 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

[PATCH] riscv: Partial implementation of flatten_aggregate

2024-03-20 Thread Mark Wielaard
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