This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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?

David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]