This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] RFC new builtin to fix PPC/SYSV varargs bug
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: RE: [PATCH] RFC new builtin to fix PPC/SYSV varargs bug
- From: Gary Thomas <gthomas at cygnus dot co dot uk>
- Date: Mon, 19 Apr 1999 17:58:07 +0100 (BST)
- Cc: egcs-patches at egcs dot cygnus dot com, Michael Meissner <meissner at cygnus dot com>, David Edelsohn <dje at watson dot ibm dot com>
- Organization: Cygnus Solutions, UK
On 19-Apr-99 Franz Sirl wrote:
> My patch changes the offset calculation from being based on
> frame_pointer_rtx+outgoing_args_size to
> virtual_stack_vars_rtx-varargs_save_area_size. virtual_stack_vars_rtx
> corresponds to the base of the "Local variable space" mentioned in the
> diagram above and varargs_save_area_size is fortunately fixed on PPC/SYSV,
> so the calculation is easy. Changing this calculation in rs6000.c produced
> a correct prologue, but the varargs were still accessed at the wrong
> offsets by the macros in va-ppc.h, cause they are based on
> __builtin_args_info(4), which still returned wrong offsets. That's why I
> introduce the new __builtin_varargs_save_area(), which looked to me like
> the least intrusive method to solve this and thus has a good chance to be
> accepted for egcs-1.2. Might be even useful on other targets.
>
This sort of problem is exactly why these macros (like __builtin_args_info(4))
are there. Is it not possible to fix the macro? Or are you worried about
code that's already been compiled?