This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: [PATCH] RFC new builtin to fix PPC/SYSV varargs bug



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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]