JDK-7172640 : C2: instrinsic implementations in LibraryCallKit should use argument() instead of pop()
  • Type: Enhancement
  • Status: Resolved
  • Resolution: Fixed
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P3
  • Affected Version: hs24
  • OS: generic
  • CPU: generic
  • Submit Date: 2012-05-30
  • Updated Date: 2013-06-26
  • Resolved Date: 2012-11-27
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Resolved 8Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
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
Tests affected: RULE jruby/test.rubicon.test_thread_group Crash assert(sp() >= inputs) failed: must have enough JVMS stack to execute
2013-01-09

JDK-7184394 needs to be verified.
2012-11-12

JDK-7023898 needs to be verified.
2012-10-23