Code Review for 6849984

Prepared by:never on Fri Jan 15 11:50:55 PST 2010
Workspace:/net/smite.sfbay/export/ws/baseline
Compare against: ssh://hg.openjdk.java.net/jdk7/hotspot-comp-gate/hotspot
Summary of changes: 254 lines changed: 230 ins; 6 del; 18 mod; 14906 unchg
Patch of changes: 6849984.patch
Author comments:
6849984: Value methods for platform dependent math functions constant fold incorrectly
Reviewed-by: kvn, twisti

This is actually a long standing issue but has only recently come to
light. C2 uses platform dependent Nodes to take advantage of hardware
instructions for trig and log functions. All of these nodes have
Value methods which will constant fold a constant input. The problem
is that the SharedRuntime version of the functions are the strict ones
but the platform dependent ones aren't necessary strict so this can
lead to different values being returned. The fix is to provide
implementations of these functions that can be used for constant
folding. Additionally this exposed a problem with Xcomp and
interpreter intrinsics where the interpreter will prefer a compiled
version of a method to the interpreter intrinsic so we have to avoid
compiling them. Tested with new test case and the Math and StrictMath
regression test from the JDK. C1 doesn't constant fold these
operations so no changes were needed there.

Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/stubRoutines.hpp

44 lines changed: 43 ins; 0 del; 1 mod; 262 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/stubRoutines.cpp

9 lines changed: 8 ins; 0 del; 1 mod; 277 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/subnode.cpp

14 lines changed: 0 ins; 6 del; 8 mod; 1313 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/cpu/sparc/vm/stubGenerator_sparc.cpp

4 lines changed: 3 ins; 0 del; 1 mod; 2939 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/stubGenerator_x86_32.cpp

51 lines changed: 50 ins; 0 del; 1 mod; 2246 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/stubGenerator_x86_64.cpp

76 lines changed: 75 ins; 0 del; 1 mod; 2975 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/interpreter/abstractInterpreter.hpp

3 lines changed: 2 ins; 0 del; 1 mod; 314 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/compilationPolicy.cpp

11 lines changed: 10 ins; 0 del; 1 mod; 447 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/templateInterpreter_x86_32.cpp

18 lines changed: 17 ins; 0 del; 1 mod; 1826 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/cpu/x86/vm/templateInterpreter_x86_64.cpp

18 lines changed: 17 ins; 0 del; 1 mod; 1874 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/cpu/sparc/vm/interpreter_sparc.cpp

6 lines changed: 5 ins; 0 del; 1 mod; 433 unchg

This code review page was prepared using /never/bin/webrev (vers 23.18-hg-never).