Why doesn't HotSpot use div machine code?
Christian Thalinger
Christian.Thalinger at Sun.COM
Wed Jan 13 01:55:45 PST 2010
On Wed, 2009-12-23 at 22:01 +0100, Ulf Zibis wrote:
> Why doesn't HotSpot use div machine code?
> I guess this would be faster here.
Intel's div/idiv instructions have a very high latency and the latency
even varies with the input values, as you can see in Intels'
Optimization Reference Manual[1] around page C-27.
Additionally a Java division (idiv) needs special treatment of corner
cases, as you can read in the JVM specification.
[1] http://www.intel.com/Assets/PDF/manual/248966.pdf
-- Christian
More information about the hotspot-compiler-dev
mailing list