This is the mail archive of the gcc-patches@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: PATCH: PR target/35767: x86 backend uses aligned load on unaligned memory


On Tue, May 27, 2008 at 9:56 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
>> Here is the updated patch with a new testcase to check aligned load.
>> Is there still a problem with canonical type?
>
> No no, the problem was anyway not with the patch -- I only wondered about
> the testcases.

Using TYPE_CANONICAL here is indeed bogus.  I'm now running into
issues with this patch and LTO.  If you want to disregard user alignment
specifiers use TYPE_MAIN_VARIANT instead.

The question is of course what the ABI says - and I suspect that the right
fix for the original problem is at the caller side, not the callee one
(the caller shouldn't look at the alignment of the type of the passed
value but at the alignment requirement of the argument type as specified
in the function signature).

I can make the testcases work for me with using TYPE_MAIN_VARIANT
(but is this really implementing the ABI correctly?)

Richard.


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