JDK-6531696 : don't use immediate 16-bits value store to memory on Intel cpus
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2007-03-06
  • Updated: 2010-04-03
  • Resolved: 2007-03-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u2Fixed 7Fixed hs10Fixed
Description
By just adding the next predicate to avoid generation of immediate 16-bits stores
I got +5% jbb2005 on woodcrest:

  // Store Short/Char Immediate
  instruct storeImmI16(memory mem, immI16 src) %{
+   predicate(UseImm16ForStore);
    match(Set mem (StoreC mem src));

    ins_cost(150);
    format %{ "MOV16  $mem,$src" %}
    opcode(0xC7);     /* C7 /0 Same as 32 store immediate with prefix */
    ins_encode( SizePrefix, OpcP, RMopc_Mem(0x00,mem),  Con16( src ));
    ins_pipe( ialu_mem_imm );
  %}


hsdev-3% sh compare ref.jbb.n2 ref.jbb.n2_n16s
============================================================================
ref.jbb.n2
  Benchmark         Samples        Mean     Stdev             Geomean Weight
  specjbb2000            20   120380.43    591.43
  specjbb2005            20    51259.08    741.56
============================================================================
ref.jbb.n2_n16s
  Benchmark         Samples        Mean     Stdev   %Diff    P   Significant
  specjbb2000            20   122106.15    856.48    1.43 0.000          Yes
  specjbb2005            20    54137.34    989.22    5.62 0.000          Yes
============================================================================

Comments
SUGGESTED FIX Webrev: http://prt-web.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2007/20070307093536.kvn.6531696/workspace/webrevs/webrev-2007.03.07/index.html Solution: Don't use such store on Intel's cpu.
07-03-2007

EVALUATION don't use immediate 16-bits value store to memory on Intel cpus
07-03-2007