RFR: JDK-8314056 Remove runtime platform check from frem/drem [v2]
    Sandhya Viswanathan 
    sviswanathan at openjdk.org
       
    Wed Aug 23 22:15:47 UTC 2023
    
    
  
On Thu, 10 Aug 2023 00:49:59 GMT, Scott Gibbons <sgibbons at openjdk.org> wrote:
>> Remove platform check and move code to stubGenerator.  This fix increases performance by ~4.5%.
>> 
>> Tested tier1.
>
> Scott Gibbons has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Move mxcsr code after denom > num test.
src/hotspot/cpu/x86/stubGenerator_x86_64_fmod.cpp line 299:
> 297:     __ movl(rcx, rax);
> 298:     __ orl(rcx, 0x7f80);
> 299:     __ movl(Address(rsp, 0x04), rcx);
No need to do stmxcsr, we could define mxcsr_rz on similar lines as mxcsr_std as part of StubGenerator::create_control_words() and use those in fmod.
src/hotspot/cpu/x86/stubGenerator_x86_64_fmod.cpp line 325:
> 323:     __ andl(rax, 0x6000);
> 324:     __ cmpl(rax, 0x2000);
> 325:     __ jcc(Assembler::equal, L_10c1);
Some of the jcc and jmp could be generated as short branches where feasible.
Also the stub and the loop entries could be aligned to 16 bytes for better perf.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15210#discussion_r1303589868
PR Review Comment: https://git.openjdk.org/jdk/pull/15210#discussion_r1303590641
    
    
More information about the hotspot-dev
mailing list