Re: Specific support for Intel Atom architecture

From: Harvey Harrison
Date: Thu May 14 2009 - 01:04:28 EST


On Tue, 2009-05-12 at 10:45 -0700, Ulrich Drepper wrote:
> On Tue, May 12, 2009 at 8:04 AM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> > The problem is that you can't express the situations where
> > movbe is better than bswap (you need both and the old and the new
> > value) in inline assembler in a way that gcc decides automatically.
>
> True. But I was mostly thinking about loads from memory. A quick
> search for ntoh*/hton* shows code like
>
> u_int16_t queue_num = ntohs(nfmsg->res_id);
>
> If there would be a ntohs_load() macro movbe could be used.

It's called be16_to_cpup, or on x86, swab16p()


Cheers,

Harvey

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/