Deploy a Decimal FP co-processor with openJDK, is it possible?

Joseph D. Darcy Joe.Darcy at Sun.COM
Mon Mar 23 17:36:15 UTC 2009

tarekeldeeb wrote:
> Hello community,
> I work for SilMinds; a company that provides Decimal floating point IP
> cores. We are currently building up a pilot application for our customers as
> well. Our decimal floating point unit is compliant with IEEE 754-2008
> standard. Executing decimal arithmetic routines on hardware shows a
> delay-energy boost of 500X.
> I want to patch the openJDK so that all Decimal data types are executed on
> my hardware co-processor. Java applications shall be accelerated without
> recoding or even re-compiling.
>  I have some basic questions:
> 1- What are all decimal datatypes? java.math.BigDecimal ? other string
> representations ?

That is the one.

> 2- Is there any java conversion functions to be IEEE 754-2008 compliant?

The operations on BigDecimal with limited precision are similar but not 
identical to those defined by IEEE 754-2008.  BigDecimal does not have 
infinities, signed zero, or NaN values.  (Roughly) the exponent range of 
BigDecimal is a 32-bit integer and the significand can be in effect 
arbitrarily large.

> 3- I know that not all the JDK is open, is this correct? Is the arithmetic
> part -including the BigDecimal- open ?

Yes, all the code necessary to implement java.math is in the open.

> 4- What documents shall I start with to override the default arithmetic
> routines and deploy my hardware ?

As Volker indicates, the likely path is hacking HotSpot to intrinsify 
certain operations.

> 5- Do you have any personal hints or suggestions towards what I had said ?

The semantics of BigDecimal are defined by its specification, including 
the rounding operations.  I'd imagine care would need to be taken 
bridging between hardware decimal support and software support for out 
of range exponents or significands.

Have fun,


More information about the discuss mailing list