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


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
 

 

 


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