This is the mail archive of the
mailing list for the GCC project.
Re: Unaligned floating point access generation for powerpc
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Olivier Hainque <hainque at act-europe dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 22 Oct 2003 11:09:35 -0400
- Subject: Re: Unaligned floating point access generation for powerpc
>>>>> Olivier Hainque writes:
Olivier> On some ppc models, misaligned integer accesses are acceptable while floating
Olivier> point misaligned accesses are not (undesired traps).
Olivier> Using the current mainline GCC sources, the powerpc-elf O1 compilation of the
Olivier> code below generates a floating point register load from a
Olivier> misaligned address.
Olivier> typedef long long data_t __attribute__((aligned (1)));
The programmer is overriding the ABI definitions for alignment.
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?