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: m68k structure packing


> On the 68000 it takes 4 clocks for each bit shift, so in this code the
> shifts alone take up 64 clocks.  I don't think the tradeoff is worth
> it here.

Nobody claims it is "worth" it.  That is why byte-packing is not the
default.  It is an option, because some people want/need byte-packing,
perhaps to be compatible with some other architecture.  They are
willing to pay the price.

> Again it all depends. If you pack and use short accesses, then yes I
> would expect a SIGBUS error on the short load instruction. If you can
> pack it and the compiler can produce code that uses only byte
> accesses, then the bloated code will go dog slow but not SIGBUS.

Yep.

> If you want packed structures then they should be sized up to a short,

But then they wouldn't be packed, would they ...

Maybe what you are asking for is a "semi-packed" option.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner


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