This is the mail archive of the gcc@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: Problem in locate_and_pad_parm


In article <10010190159.AA27956@vlsi1.ultra.nyu.edu> you write:
>MUST_PASS_IN_STACK is a macro that's meant to represent those cases
>where GCC does not know to pass parameters in registers.  It should *never*
>be overriden.  Instead, the underlying macros should be changed in
>the ports in question.

The definition of MUST_PASS_IN_STACK is seriously broken.  It makes it 
impossible to implement some ABIs correctly.  The main problem is that it
makes assumptions about alignment of BLKmode values in registers, and not
every ABI wants to align values the same way that MUST_PASS_IN_STACK assumes
they must be aligned.

Unfortunately, changing MUST_PASS_IN_STACK is problematic.  There are a lot
of ports whose ABI is defined by the code that gcc happens to emit for them.
If we change MUST_PASS_IN_STACK, then we are implicitly changing the ABI for
all of those ports.  We could fix that by modifying all of those ports
appropriately, but identifying what ports need to be fixed, and what changes
need to be made to them will be very error prone.

Thus the simplest fix here is to just let a few ports override
MUST_PASS_IN_STACK.

Long term, it would be nice if we rewrote the parameter passing stuff from
scratch, as we have too many macros that interact in confusing ways, but it
will likely to a long time before someone tries that.  

Jim

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