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: Vector misalignment


On Mon, Aug 16, 2010 at 7:18 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, Aug 16, 2010 at 11:15 AM, Artem Shinkarov
> <artyom.shinkaroff@gmail.com> wrote:
>> would produce no warnings, but causes a segmentation fault on intel
>> and powerpc architecture.
>
> How will it produce a seg fault on PPC (VMX) targets? ?The VMX load
> instructions don't fault but rather just use the "aligned" address.
>
> -- Pinski
>

I may be wrong about PPC, I tested it quite some time ago on mac with
AltiVec, but the point is that gcc inserts an aligned vector move
instruction instead of unaligned (that surely happens on Intel). It is
correct in terms of gcc, but if user made a mistake there is no chance
that the compiler would warn him.


Artem.


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