Dear professionals, I'm Jake, a Java developer. I'm currently working on adapting code related to JDK 8 instructions f2xm1 and fyl2x, along with 80-bit extended precision implementation, to the ARM architecture. I'm wondering if there are alternative instructions for f2xm1 and fyl2x in the ARM architecture, and how to achieve 80-bit extended precision there. Could you please share any relevant knowledge or reference materials? Your help would be highly appreciated. Thank you!
There may not be direct instruction mapping from x86 to arm.
You need to convert the f2xm1 and fyl2x with arm instructions.
f2xm1: https://c9x.me/x86/html/file_module_x86_id_79.html
fyl2x: https://c9x.me/x86/html/file_module_x86_id_130.html
Thank you for your answer, Zhifei. We have achieved the same result in a similar approach to yours by hardware, of the two instructions. However, we are still unable to get the same result with the software simulation. Additionally, do you have any idea how to achieve 80-bit extended precision on ARM?
Can we know that your software simulation is running on a 32-bit/64-bit x86 host or a 32-bit/64-bit arm host?
On ARM host, https://github.com/openjdk/jdk/blob/jdk8-b120/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp#L2269 please check the link. That is the part we cannot get the same result from.