Re: Help with an ABI peculiarity

2022-01-21 Thread Richard Sandiford via Gcc
Iain Sandoe writes: > Hi Richard, >> On 20 Jan 2022, at 22:32, Richard Sandiford >> wrot>> Iain Sandoe writes: On 10 Jan 2022, at 10:46, Richard Sandiford wrot>> An alternative might be to make promote_function_arg a “proper” ABI hook, taking a cumulative_args_t and a function_

Re: Help with an ABI peculiarity

2022-01-21 Thread Iain Sandoe
Hi Richard, > On 20 Jan 2022, at 22:32, Richard Sandiford wrote: > > Iain Sandoe writes: >>> On 10 Jan 2022, at 10:46, Richard Sandiford >>> wrot>> An alternative might be to make promote_function_arg a “proper” >>> ABI hook, taking a cumulative_args_t and a function_arg_info. >>> Perhaps the

Re: Help with an ABI peculiarity

2022-01-20 Thread Richard Sandiford via Gcc
Iain Sandoe writes: >> On 10 Jan 2022, at 10:46, Richard Sandiford >> wrot>> An alternative might be to make promote_function_arg a “proper” >> ABI hook, taking a cumulative_args_t and a function_arg_info. >> Perhaps the return case should become a separate hook at the >> same time. >> >> That

Re: Help with an ABI peculiarity

2022-01-11 Thread Eric Gallager via Gcc
On Mon, Jan 10, 2022 at 8:28 AM Iain Sandoe wrote: > > Hi Florian, > > > On 10 Jan 2022, at 08:38, Florian Weimer wrote: > > > > * Jeff Law via Gcc: > > > >> Most targets these days use registers for parameter passing and > >> obviously we can run out of registers on all of them. The key > >> pr

Re: Help with an ABI peculiarity

2022-01-11 Thread Richard Earnshaw via Gcc
On 10/01/2022 08:38, Florian Weimer via Gcc wrote: * Jeff Law via Gcc: Most targets these days use registers for parameter passing and obviously we can run out of registers on all of them.  The key property is the size/alignment of the argument differs depending on if it's pass in a register

Re: Help with an ABI peculiarity

2022-01-10 Thread Florian Weimer via Gcc
* Iain Sandoe: > In the case that a call is built and no prototype is available, the > assumption is that all parms are named. The promotion is then done > according to the C promotion rules. > > [for the number of args that can be passed in int regs] the callee > will happen to observe the same

Re: Help with an ABI peculiarity

2022-01-10 Thread Iain Sandoe
Hi Florian, > On 10 Jan 2022, at 08:38, Florian Weimer wrote: > > * Jeff Law via Gcc: > >> Most targets these days use registers for parameter passing and >> obviously we can run out of registers on all of them. The key >> property is the size/alignment of the argument differs depending on if

Re: Help with an ABI peculiarity

2022-01-10 Thread Iain Sandoe
> On 10 Jan 2022, at 10:46, Richard Sandiford wrote: > > Iain Sandoe writes: >> Hi Folks, >> >> In the aarch64 Darwin ABI we have an unusual (OK, several unusual) feature >> of the calling convention. >> >> When an argument is passed *in a register* and it is integral and less than >> SI

Re: Help with an ABI peculiarity

2022-01-10 Thread Richard Sandiford via Gcc
Iain Sandoe writes: > Hi Folks, > > In the aarch64 Darwin ABI we have an unusual (OK, several unusual) feature of > the calling convention. > > When an argument is passed *in a register* and it is integral and less than > SI it is promoted (with appropriate signedness) to SI. This applies when

Re: Help with an ABI peculiarity

2022-01-10 Thread Florian Weimer via Gcc
* Jeff Law via Gcc: > Most targets these days use registers for parameter passing and > obviously we can run out of registers on all of them.  The key > property is the size/alignment of the argument differs depending on if > it's pass in a register (get promoted) or passed in memory (not > promot

Re: Help with an ABI peculiarity

2022-01-08 Thread Jeff Law via Gcc
On 1/7/2022 2:55 PM, Paul Koning via Gcc wrote: On Jan 7, 2022, at 4:06 PM, Iain Sandoe wrote: Hi Folks, In the aarch64 Darwin ABI we have an unusual (OK, several unusual) feature of the calling convention. When an argument is passed *in a register* and it is integral and less than SI

Re: Help with an ABI peculiarity

2022-01-07 Thread Paul Koning via Gcc
> On Jan 7, 2022, at 4:06 PM, Iain Sandoe wrote: > > Hi Folks, > > In the aarch64 Darwin ABI we have an unusual (OK, several unusual) feature of > the calling convention. > > When an argument is passed *in a register* and it is integral and less than > SI it is promoted (with appropriate s