[Info-vax] x86-64 data aligment / faulting

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Mon Feb 28 13:55:06 EST 2022


On 2022-02-28, Simon Clubley <clubley at remove_me.eisner.decus.org-Earth.UFP> wrote:
> On 2022-02-27, Arne Vajhøj <arne at vajhoej.dk> wrote:
>>
>> I modified the program to test with different data sizes, verified
>> that the code was indeed working on an unaligned addresses and
>> tried both sequential and random access to array.
>>
>> I simply can't get a big difference between aligned and unaligned access.
>>
>
> Have you looked at the generated code to verify that unaligned access
> is really occuring ?
>
> Another possibility, depending on how smart the compiler is, is that
> it could always do aligned access lookups and then only extract the
> data it needs out of each lookup.
>

Also, the optimisation settings and level might make a difference.
Try varying them to see if the behaviour changes, especially when
you switch between optimising for time versus space (and yes, include
-O0 in the list of things you try. :-)).

It's for reasons like this that I suggested at the start of this
to look at the generated code, just in case the compiler is doing
something you are not expecting.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.



More information about the Info-vax mailing list