This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC function calling: Parameter passing on stack...
- From: "Steve Silva via gcc" <gcc at gcc dot gnu dot org>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 23 Jan 2017 17:52:33 +0000 (UTC)
- Subject: GCC function calling: Parameter passing on stack...
- Authentication-results: sourceware.org; auth=none
- References: <1541343706.2070434.1485193953027.ref@mail.yahoo.com>
- Reply-to: Steve Silva <stv_007 at yahoo dot com>
- Reply-to: Steve Silva <stv_007 at yahoo dot com>
Hi All,
I am doing a port of GCC for a small internal processor and I have a question about function parameter passing. I am allocating space for function parameters on the frame (via crtl->outgoing_args_size) and want gcc to use this space via frame pointer manipulation, not stack pointer manipulation. So far, I cannot get gcc to use the frame pointer for the args, it manipulates the stack pointer directly (this is a problem since the stack pointer is not directly accessible). I have the following configurations set:
#define ACCUMULATE_OUTGOING_ARGS (1)
#define REG_PARM_STACK_SPACE(x) (0)
//NOT USED #define INCOMING_REG_PARM_STACK_SPACE
#define OUTGOING_REG_PARM_STACK_SPACE(x) (1)
#define STACK_PARMS_IN_REG_PARM_AREA (1)
but these do not seem to help. The compiler uses the frame pointer correctly for all the local variables, so I know it is aware of it. Any suggestions are appreciated.
Steve
(Broadcom)