Ping^2: [patch] convert some call ABI macros to hooks, apply to sh, add bitfield swapper

Richard Henderson rth@redhat.com
Wed Sep 3 19:49:00 GMT 2003


On Fri, Aug 29, 2003 at 08:59:31PM -0400, DJ Delorie wrote:
> I've added this so far:
> 
>   /* We cannot allow bitfield reversal unless the struct has a
>      consistent mapping between the bytes of the struct and the
>      underlying type of the bits stored in those bytes.  So, we
>      enforce that here.  */
> 
> How much more explanation seems reasonable at that point in the code?

I think this is inscrutable.  I think perhaps the reverse_bitfield
hook that you've added isn't the right way to go at all.

Perhaps better would be to have a collection of routines that 
layout bitfields in whatever way their respective abi says, and
a hook that chooses between them.

This would, for instance, clean up the handling of ms bitfields,
which are strung through the stor-layout routines quite nastily.
It would also then let you (1) keep this foreign abi widgetry
provate to the target that needs it and (2) be able to do sensible
things with the edge conditions previously described.

Most definitely, however, *none* of this should be combined with
the patch to create the default target hooks.


r~



More information about the Gcc-patches mailing list