This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: splitting load immediates using high and lo_sum
- From: "Tabony, Charles" <ctabony at qualcomm dot com>
- To: "Dale Johannesen" <dalej at apple dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 21 Jul 2005 17:45:06 -0700
- Subject: RE: splitting load immediates using high and lo_sum
> From: Dale Johannesen [mailto:dalej@apple.com]
>
> On Jul 21, 2005, at 5:04 PM, Tabony, Charles wrote:
>
> >> From: Dale Johannesen [mailto:dalej@apple.com]
> >>
> >> On Jul 21, 2005, at 4:36 PM, Tabony, Charles wrote:
> >>
> >>> Hi,
> >>>
> >>> I am working on a port for a processor that has 32 bit registers
but
> >>> can
> >>> only load 16 bit immediates.
> >>> ""
> >>> "%0.h = #HI(%1)")
> >>
> >> What are the semantics of this? Low bits zeroed, or untouched?
> >> If the former, your semantics are identical to Sparc; look at that.
> >
> > The low bits are untouched. However, I would expect the compiler to
> > always follow setting the high bits with setting the low bits.
>
> OK, if you're willing to accept that limitation (your architecture
could
> handle putting the LO first, which Sparc can't) then Sparc is still a
> good model to look at. What it does should work for you.
Aha! I looked at the SPARC code and distilled it down to what I needed
and the difference is that it sets the mode of the high and lo_sum
expressions to the mode of operand 0, while I was setting it to the mode
of operand 1. Now mine works great.
Thank you,
Charles J. Tabony