This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix powerpc 64 alignment problem for lwa instruction
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: pinskia at physics dot uc dot edu (Andrew Pinski)
- Cc: dalej at apple dot com (Dale Johannesen), hm dot chang at apple dot com (Hui-May Chang), gcc-patches at gcc dot gnu dot org, pinskia at physics dot uc dot edu (Andrew Pinski)
- Date: Tue, 7 Nov 2006 18:31:41 -0500 (EST)
- Subject: 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