This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bluesky idea: __attribute__ (netorder)
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: bluesky idea: __attribute__ (netorder)
- From: Matthew Kirkwood <weejock at ferret dot lmh dot ox dot ac dot uk>
- Date: Tue, 8 Sep 1998 10:03:24 +0100 (GMT)
- cc: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>, Tim Hollebeek <tim at wagner dot princeton dot edu>, carlo at runaway dot xs4all dot nl, egcs at cygnus dot com
On Mon, 7 Sep 1998, Richard Henderson wrote:
> > Please note you can use still use inline __asm__ in your version of
> > ntohl etc.
>
> Not effectively. Inline asms do not have the same alternatives
> feature of a full-fledged define_insn.
>
> 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.
My original idea wasn't actually to have gcc _do_ the conversions
itself -- just warn when they weren't supplied.
Matthew.