Re: [PATCH V3] Use reg mode to move sub blocks for parameters and returns

2022-12-08 Thread Jiufu Guo via Gcc-patches
Hi Segher, Thanks a lot for your helpful comments! Segher Boessenkool writes: > On Thu, Dec 08, 2022 at 09:17:38PM +0800, Jiufu Guo wrote: >> Segher Boessenkool writes: >> > On Wed, Dec 07, 2022 at 08:00:08PM +0800, Jiufu Guo wrote: >> >> typedef struct SA {double a[3];} A; >> >> A ret_arg_pt

Re: [PATCH V3] Use reg mode to move sub blocks for parameters and returns

2022-12-08 Thread Segher Boessenkool
On Thu, Dec 08, 2022 at 09:17:38PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > On Wed, Dec 07, 2022 at 08:00:08PM +0800, Jiufu Guo wrote: > >> typedef struct SA {double a[3];} A; > >> A ret_arg_pt (A *a) {return *a;} // on ppc64le, expect only 3 lfd(s) > >> A ret_arg (A a) {return

Re: [PATCH V3] Use reg mode to move sub blocks for parameters and returns

2022-12-08 Thread Jiufu Guo via Gcc-patches
Hi Segher, Thanks a lot for your review! Segher Boessenkool writes: > Hi! > > On Wed, Dec 07, 2022 at 08:00:08PM +0800, Jiufu Guo wrote: >> When assigning a parameter to a variable, or assigning a variable to >> return value with struct type, "block move" are used to expand >> the assignment.

Re: [PATCH V3] Use reg mode to move sub blocks for parameters and returns

2022-12-07 Thread Segher Boessenkool
Hi! On Wed, Dec 07, 2022 at 08:00:08PM +0800, Jiufu Guo wrote: > When assigning a parameter to a variable, or assigning a variable to > return value with struct type, "block move" are used to expand > the assignment. It would be better to use the register mode according > to the target/ABI to

[PATCH V3] Use reg mode to move sub blocks for parameters and returns

2022-12-07 Thread Jiufu Guo via Gcc-patches
Hi, When assigning a parameter to a variable, or assigning a variable to return value with struct type, "block move" are used to expand the assignment. It would be better to use the register mode according to the target/ABI to move the blocks if the parameter/return is passed through registers.