United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7172640 : C2: instrinsic implementations in LibraryCallKit should use argument() instead of pop()

Details
Type:
Enhancement
Submit Date:
2012-05-30
Status:
Resolved
Updated Date:
2013-04-30
Project Name:
JDK
Resolved Date:
2012-11-27
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs24
Fixed Versions:
hs25 (b12)

Related Reports
Backport:
Backport:
Backport:
Duplicate:
Duplicate:
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
Most intrinsics in LibraryCallKit re-push the arguments that have been popped off before the call to just pop them again as arguments.  It would be much cleaner and more correct to use argument() accessors instead.

Another problem is that it is very tricky to find the places where the stack pointer needs to be adjusted to the correct value for re-execution (uncommon traps).  This adjustment is a plain SP bump and decrease after the call.  In itself very error prone and it could be handled in a much more elegant way.
                                    

Comments
JDK-7023898 needs to be verified.
                                     
2012-10-23
JDK-7184394 needs to be verified.
                                     
2012-11-12
URL:   http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/beebba0acc11
User:  twisti
Date:  2012-11-27 04:02:27 +0000

                                     
2012-11-27
URL:   http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/beebba0acc11
User:  amurillo
Date:  2012-12-07 21:13:19 +0000

                                     
2012-12-07
Tests affected:
RULE jruby/test.rubicon.test_thread_group Crash assert(sp() >= inputs) failed: must have enough JVMS stack to execute 
                                     
2013-01-09



Hardware and Software, Engineered to Work Together