This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unaligned floating point access generation for powerpc
- From: Olivier Hainque <hainque at act-europe dot fr>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org, hainque at act-europe dot fr
- Date: Wed, 22 Oct 2003 19:17:17 +0200
- Subject: Re: Unaligned floating point access generation for powerpc
- References: <hainque@act-europe.fr> <200310221509.h9MF9Zg33194@makai.watson.ibm.com>
Thanks for your prompt feedback, David.
David Edelsohn wrote:
> Olivier> typedef long long data_t __attribute__((aligned (1)));
>
> The programmer is overriding the ABI definitions for alignment.
In that case indeed. The idea is to have some 64bit data field placed
at a specific location in a (packed) structure.
> The compiler assumes the programmer knows what s/he is doing. Violating
> the ABI may produce inefficient code. Why do you expect the compiler to
> do anything else?
I was not expecting the compiler to produce efficient code :)
Still, generating a trap seems a bit too strong an alternative, especially
when the target environment may not have a handler to deal with it.
Wouldn't there be a way to have inefficient aligned loads and mask and others
instead ?
Olivier