RFR(S): 8160651: StubRoutines::_dtan does not restore callee save register rbx
tobias.hartmann at oracle.com
Fri Jul 1 06:14:00 UTC 2016
shanks for verifying!
[CC'ing hotspot-compiler-dev for the record]
On 30.06.2016 19:36, Deshpande, Vivek R wrote:
> Hi Tobias
> Thank you for finding and fixing the bug.
> I cross checked with the LIBM library assembly code for pop(rbx);
> Looks good to me. :)
> -----Original Message-----
> From: Tobias Hartmann [mailto:tobias.hartmann at oracle.com]
> Sent: Thursday, June 30, 2016 6:16 AM
> To: hotspot-compiler-dev at openjdk.java.net
> Cc: Deshpande, Vivek R; Deshpande, Vivek R; Rukmannagari, Shravya
> Subject:  RFR(S): 8160651: StubRoutines::_dtan does not restore callee save register rbx
> please review the following patch:
> StubRoutines::_dtan overwrites the callee save register $rbx but does not restore the original value before returning. The problem is in MacroAssembler::fast_tan() introduced by JDK-8152907 : we set $rbx to 32768 (0x8000) but do not pop the saved value from the stack before returning. This causes several test failures (see linked bugs) because $rbx contains incorrect values. The implementations of MacroAssembler::fast_cos() are MacroAssembler::fast_sin() are similar, but correctly restore $rbx .
> I also removed the unused LibraryCallKit::inline_trig().
> Tested with failing tests, JPRT and RBT (running).
>  http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/33f10a35ce20#l16.1052
>  http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/33f10a35ce20#l8.3947
More information about the hotspot-compiler-dev