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: ABI change for ports with byte-aligned functions.


> From: Alexandre Oliva <aoliva@redhat.com>
> Date: 06 May 2001 17:30:55 -0300

> On May  4, 2001, Geoff Keating <geoffk@geoffk.org> wrote:
> > No, changing FUNCTION_BOUNDARY for performance reasons is wrong.  The
> > compiler will optimise bit operations on function pointers assuming
> > that FUNCTION_BOUNDARY is correct, so any change to FUNCTION_BOUNDARY
> > is an ABI change even in C.
> 
> Err...  grep FUNCTION_BOUNDARY *.c doesn't reveal anything that would
> do this kind of optimization.  Besides, I don't see how this
> optimization would incur in an ABI change.  Could you please clarify?

Hmmm.  It seems that GCC won't in fact do this.  Pity.

However, there are other parts of the compiler that do care, and there
will be more in future.  Of the six places where FUNCTION_BOUNDARY is
currently used in code, three of them are computing the expected
alignment of a pointer to a function.

I don't see how you could consider this _not_ an ABI change.  Can you
explain why it is safe for the compiler to assume that some bits in a
pointer are zero when in fact they might not be?

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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