[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45D4E740.9020504@goop.org>
Date: Thu, 15 Feb 2007 15:05:36 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Ralf Baechle <ralf@...ux-mips.org>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Atsushi Nemoto <anemo@....ocn.ne.jp>,
linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
Ralf Baechle wrote:
> Gcc info page says:
>
> [...]
> `packed'
> The `packed' attribute specifies that a variable or structure field
> should have the smallest possible alignment--one byte for a
> variable, and one bit for a field, unless you specify a larger
> value with the `aligned' attribute.
> [...]
>
> Qed?
So that the compiler has to assume that if its accessing this __packed
structure, it may be embedded unaligned within something else? And
because the pointer is cast through (void *) it isn't allowed to use
alias analysis to notice that the pointer wasn't originally (apparently)
unaligned.
Seems sound to me.
J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists