This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: combine_pending_stack_adjustment_and_call checkin
- To: hubicka at atrey dot karlin dot mff dot cuni dot cz
- Subject: Re: combine_pending_stack_adjustment_and_call checkin
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 28 Apr 2000 08:44:17 -0700
- Cc: egcs-bugs at egcs dot cygnus dot com
- Organization: CodeSourcery, LLC
- References: <20000428134848.M31945@atrey.karlin.mff.cuni.cz>
>>>>> "Jan" == Jan Hubicka <hubicka@atrey.karlin.mff.cuni.cz> writes:
Jan> Hi I am just trying to understand the code in your checkin (I
Jan> was unable to find an note in egcs-patches, so I am not
Jan> exactly sure what are you shooting for), and it seems to me,
Jan> that you are just hidding the existing bug in stack alignment
Jan> code and making is harder to trigger.
I did post a message.
http://gcc.gnu.org/ml/gcc-bugs/2000-04/msg00747.html
You are right, however, that I neglected to post it to gcc-patches,
for which I apologize.
I'm not sure what you are saying. It seems to me that my code is
correct (modulo any typos of course); it correctly handles the
situation where:
o There is already a pending_stack_adjust
o You are about to call a function and so want to combine the
pop (for the pending_stack_adjust) and the push (to pad the
arguments to a correct alignment boundary).
I'm not sure that it fixes *all* problems in this code -- but I'm
pretty sure that the function behaves as spec'd in its comment.
Although I'm not sure it's relevant to your posting, note that calling
`alloca' inside a function argument is not allowed by ISO C. That
doesn't mean the compiler should crash -- just that actually doing
something sensible there isn't strictly necessary. Giving an error
message would be ideal.
So, I'm not sure what you're getting at. Are you saying:
o The code I checked in has a bug?
If so, that's certainly possible. In that case, we should fix
my code.
o There is a more general solution that subsumes the code
I checked in?
In that case, we should remove my code, and replace it with
something else.
o My code is only necessary because, by the time it is reached,
something has already gone wrong. If we fix that problem, then
there is no need for my code?
In that case, we should fix the other bug, and simplify my code
accordingly.
o There is another bug somewhere else.
In that case, we should fix it, but leave my code alone.
I think any further changes to this code need to be well thought-out
and well-commented. I believe that to be the case for the code I
checked in. That is the case for the code I checked in -- even if
it's incorrect, I spent hours thinking about it, and attempting to
write a coherent justification in its comments.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com