Request for review (L): 6797305: Add LoadUB and LoadUI opcode class
Christian Thalinger
Christian.Thalinger at Sun.COM
Mon Mar 2 09:53:25 PST 2009
On Mon, 2009-03-02 at 09:34 -0800, John Rose wrote:
> On Mar 2, 2009, at 2:30 AM, Christian Thalinger wrote:
>
> > - Similar to the one above for $mem, e.g. $mem$$Address$high, for long
> > memory accesses. Currently I'm using:
>
> Do be careful with the high/low terminology! That had gotten us into
> "endian" portability problems.
>
> I suggest sticking to first/second, which unlike high/low
> unambiguously refer to the lower address and the higher address. Of
> course, ADLC can make high/low be aliases for second/first on little
> endian systems and first/second on big endian systems. Even better
> would be avoiding high/low, because in different contexts those words
> can seem to refer to arithmetic significance or memory order, and only
> on little-endian systems do those concepts (accidentally) align. When
> talking about arithmetic significance, msw/lsw is probably better than
> high/low.
>
> For register contents, we already use high/low in some places, and it
> twists around our endian story, causing bugs when the system is
> changed. Those points are (loosely speaking) portability problems
> embedded in the system due to early sloppiness, since HotSpot was
> originally an x86-only system. Let's make it better over time.
>
> The "gold standard" would be to use a single terminology for word
> pairs that is consistent across memory and register values. Since
> memory values are copied around in the JVM more than they are used for
> 2s-complement arithmetic, first/second is far more helpful than msw/
> lsw. And high/low is just ambiguous.
Thanks for pointing that out, and you're absolutely right. CACAO
supported about 11 different architectures and I know what you mean by
"endian portability problems".
first/second is probably a bit more confusing when seen for the first
time than lsw/msw would be, but I'm fine with the former too. Is there
already something like first/second around?
-- Christian
More information about the hotspot-compiler-dev
mailing list