Re: [RFC] PR61300 K&R incoming args

2014-06-05 Thread Alan Modra
On Thu, Jun 05, 2014 at 01:19:19PM -0600, Jeff Law wrote: > And so the problem you're trying to solve is that when compiling the > callee. You incorrectly assumed that if there was not a prototype > for the callee's definition that the caller had set up the save area > and that you could flush arg

Re: [RFC] PR61300 K&R incoming args

2014-06-05 Thread Jeff Law
On 05/31/14 00:30, Alan Modra wrote: On Fri, May 30, 2014 at 11:27:52AM -0600, Jeff Law wrote: On 05/26/14 01:38, Alan Modra wrote: PR61300 shows a need to differentiate between incoming and outgoing REG_PARM_STACK_SPACE for the PowerPC64 ELFv2 ABI, due to code like function.c:assign_parm_is_st

Re: [RFC] PR61300 K&R incoming args

2014-06-03 Thread Richard Biener
On June 2, 2014 11:30:20 PM CEST, "Joseph S. Myers" wrote: >On Mon, 2 Jun 2014, Florian Weimer wrote: > >> On 05/31/2014 08:56 AM, Alan Modra wrote: >> >> > > It's fine to change ABI when compiling an old-style function >> > > definition for which a prototype exists (relative to the >> > > non-p

Re: [RFC] PR61300 K&R incoming args

2014-06-02 Thread Joseph S. Myers
On Mon, 2 Jun 2014, Florian Weimer wrote: > On 05/31/2014 08:56 AM, Alan Modra wrote: > > > > It's fine to change ABI when compiling an old-style function > > > definition for which a prototype exists (relative to the > > > non-prototype case). It happens on i386, too. > > > > That might be so,

Re: [RFC] PR61300 K&R incoming args

2014-06-02 Thread Alan Modra
On Mon, Jun 02, 2014 at 12:00:41PM +0200, Florian Weimer wrote: > On 05/31/2014 08:56 AM, Alan Modra wrote: > > >>It's fine to change ABI when compiling an old-style function > >>definition for which a prototype exists (relative to the > >>non-prototype case). It happens on i386, too. > > > >That

Re: [RFC] PR61300 K&R incoming args

2014-06-02 Thread Florian Weimer
On 05/31/2014 08:56 AM, Alan Modra wrote: It's fine to change ABI when compiling an old-style function definition for which a prototype exists (relative to the non-prototype case). It happens on i386, too. That might be so, but when compiling the function body you must assume the worst case,

Re: [RFC] PR61300 K&R incoming args

2014-05-30 Thread Alan Modra
On Fri, May 30, 2014 at 09:22:30PM +0200, Florian Weimer wrote: > On 05/26/2014 09:38 AM, Alan Modra wrote: > > >Background: The ELFv2 ABI requires a parameter save area only when > >stack is actually used to pass parameters, and since varargs are > >passed on the stack, unprototyped calls must pa

Re: [RFC] PR61300 K&R incoming args

2014-05-30 Thread Alan Modra
On Fri, May 30, 2014 at 11:27:52AM -0600, Jeff Law wrote: > On 05/26/14 01:38, Alan Modra wrote: > >PR61300 shows a need to differentiate between incoming and outgoing > >REG_PARM_STACK_SPACE for the PowerPC64 ELFv2 ABI, due to code like > >function.c:assign_parm_is_stack_parm determining that a st

Re: [RFC] PR61300 K&R incoming args

2014-05-30 Thread Florian Weimer
On 05/26/2014 09:38 AM, Alan Modra wrote: Background: The ELFv2 ABI requires a parameter save area only when stack is actually used to pass parameters, and since varargs are passed on the stack, unprototyped calls must pass both on the stack and in registers. OK, easy you say, !prototype_p(fun)

Re: [RFC] PR61300 K&R incoming args

2014-05-30 Thread Jeff Law
On 05/26/14 01:38, Alan Modra wrote: PR61300 shows a need to differentiate between incoming and outgoing REG_PARM_STACK_SPACE for the PowerPC64 ELFv2 ABI, due to code like function.c:assign_parm_is_stack_parm determining that a stack home is available for incoming args if REG_PARM_STACK_SPACE is