This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bluesky idea: __attribute__ (netorder)
- To: rth at cygnus dot com
- Subject: Re: bluesky idea: __attribute__ (netorder)
- From: Tim Hollebeek <tim at wagner dot princeton dot edu>
- Date: Mon, 7 Sep 1998 14:32:54 -0400 (EDT)
- Cc: egcs at tantalophile dot demon dot co dot uk, carlo at runaway dot xs4all dot nl, weejock at ferret dot lmh dot ox dot ac dot uk, egcs at cygnus dot com
Richard Henderson writes ...
>
> Take ppc for example: it has three relevant instructions, byte-swap
> load, store, and and a two-address in-register swap. There is no
> way to write an inline asm that can take in to account both source
> and destination to choose which of these three instructions to use.
>
> Of course, we could achieve the same optimization goals with a
> builtin function rather than a data attribute and it would be far
> less invasive.
One wonders, though, whether code that does enough byteswapping in
enough diverse locations to benefit from this sort of optimization is
suffering from poor design, and would be better served by redesign to
reduce the need for byteswapping, or localize the byteswapping and use
asms.
---------------------------------------------------------------------------
Tim Hollebeek | "Everything above is a true
email: tim@wfn-shop.princeton.edu | statement, for sufficiently
URL: http://wfn-shop.princeton.edu/~tim | false values of true."