8155738: C2: fix frame_complete_offset
authorgoetz
Mon, 02 May 2016 14:17:19 -0700
changeset 38228 6dbbdb9ee00e
parent 38227 2ad0ebc407ab
child 38230 700d01e49492
8155738: C2: fix frame_complete_offset Summary: During scratch_emit_size wrong value was set. Also set offset of ppc. Reviewed-by: kvn, dlong
hotspot/src/cpu/ppc/vm/ppc.ad
hotspot/src/share/vm/opto/compile.hpp
--- a/hotspot/src/cpu/ppc/vm/ppc.ad	Mon May 02 03:24:02 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/ppc.ad	Mon May 02 14:17:19 2016 -0700
@@ -1380,6 +1380,8 @@
     // Save return pc.
     ___(std) std(return_pc, _abi(lr), callers_sp);
   }
+  
+  C->set_frame_complete(cbuf.insts_size());
 }
 #undef ___
 #undef ___stop
--- a/hotspot/src/share/vm/opto/compile.hpp	Mon May 02 03:24:02 2016 +0300
+++ b/hotspot/src/share/vm/opto/compile.hpp	Mon May 02 14:17:19 2016 -0700
@@ -1101,7 +1101,7 @@
   int               code_size()                 { return _method_size; }
   CodeBuffer*       code_buffer()               { return &_code_buffer; }
   int               first_block_size()          { return _first_block_size; }
-  void              set_frame_complete(int off) { _code_offsets.set_value(CodeOffsets::Frame_Complete, off); }
+  void              set_frame_complete(int off) { if (!in_scratch_emit_size()) { _code_offsets.set_value(CodeOffsets::Frame_Complete, off); } }
   ExceptionHandlerTable*  handler_table()       { return &_handler_table; }
   ImplicitExceptionTable* inc_table()           { return &_inc_table; }
   OopMapSet*        oop_map_set()               { return _oop_map_set; }