Short/Character.reverseBytes intrinsics
Ulf Zibis
Ulf.Zibis at gmx.de
Thu Apr 22 14:54:02 PDT 2010
Am 22.04.2010 02:30, schrieb John Rose:
> On Apr 21, 2010, at 4:47 PM, Ulf Zibis wrote:
>
>
>> Are there intrinsics for int/float raw conversion ?
>> How are the macros called ?
>>
> Google floatToRawIntBits and doubleToRawLongBits. Any optimizing dynamic compiler (like Hotspot's C2) will know these are simple bitwise representation casts.
>
After some search I found the macros and their implementation in the webrev.
At this point I'm asking, why those and the reverseBytes methods are
coded in java and later were intrinsified by the JIT.
Couldn't they directly be implemented as native methods? This would give
the developer a clear hint, that they are processed fast, and would
reduce the optimization work by HotSpot.
-Ulf
More information about the hotspot-compiler-dev
mailing list