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] Fix powerpc 64 alignment problem for lwa instruction


> The alignment of the object is not the issue,  Look at the ISA for this
> instruction.  It does not talk about the alignment of the load, just
> the offset must be a mutliple of 4.  The reason why we fail is because
> we don't know if the lo(a-b) is going to be a multiple of 4 unless we know
> the alignment.  If you look at my example, we have a load which is unaligned
> but the offset is a multiple of 4 (in my example 8).  We can take into account
> the alignment of the memory address if we get a lo_sum because we don't know if
> what the value of the offset is going to be.
> 
> To sum up the problem:
> lwa's offset has to be a multiple of 4.
> We don't know if lo(a) is going to be a multiple of 4 if the alignment of the memory
>   is 32bits (or higher).
The above should say:

We don't know if lo(a) is going to be a multiple of 4 unless the alignment of the memory
  is 32bits (or higher).


Thanks,
Andrew Pinski


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