This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k structure packing
- To: Peter Barada <pbarada at wavemark dot com>
- Subject: Re: m68k structure packing
- From: Per Bothner <bothner at cygnus dot com>
- Date: Wed, 01 Oct 1997 16:17:10 -0700
- cc: egcs at cygnus dot com
> 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