SPARC: unsigned vs. signed int loads
Thomas.Rodriguez at Sun.COM
Tue Feb 17 20:11:34 PST 2009
On Feb 11, 2009, at 8:41 AM, Paul Hohensee wrote:
> Signed loads require a shifter or mux in the load path, so they can
> cost an extra cycle.
> I think we also use ldub for boolean loads.
We don't but we should. A LoadB variant with a lower cost and this
predicate(n->bottom_type() == TypeInt::BOOL);
would work great.
> Christian Thalinger wrote:
>> Hi all!
>> Still working on 6797305, I recently was looking (again) closer at
>> load instructions in sparc.ad and I noticed that byte and short
>> loads do
>> a sign extend (ldsb and ldsh) while int loads do not (lduw).
>> In CACAO we did fully 64-bit signed extended loads on Alpha and
>> so we could omit I2L conversions.
>> Is there a reason why HotSpot does zero-extended int loads?
>> -- Christian
More information about the hotspot-compiler-dev