8191863: [s390] Fix CDS: some bytecode rewriting doesn't depend on RewriteControl
authorsimonis
Tue, 28 Nov 2017 14:20:15 +0100
changeset 48143 4c8451a12e79
parent 48142 b7fc502cb8aa
child 48144 364207a23251
8191863: [s390] Fix CDS: some bytecode rewriting doesn't depend on RewriteControl Reviewed-by: mdoerr, goetz, jiangli
src/hotspot/cpu/s390/templateTable_s390.cpp
--- a/src/hotspot/cpu/s390/templateTable_s390.cpp	Tue Nov 28 14:11:43 2017 +0100
+++ b/src/hotspot/cpu/s390/templateTable_s390.cpp	Tue Nov 28 14:20:15 2017 +0100
@@ -2884,12 +2884,12 @@
   // ztos
   BTB_BEGIN(is_Bool, bsize, "putfield_or_static:is_Bool");
   __ pop(ztos);
-  if (do_rewrite) {
+  if (!is_static) {
     pop_and_check_object(obj);
   }
   __ z_nilf(Z_tos, 0x1);
   __ z_stc(Z_tos, field);
-  if (!is_static) {
+  if (do_rewrite) {
     patch_bytecode(Bytecodes::_fast_zputfield, bc, Z_ARG5, true, byte_no);
   }
   __ z_bru(Done);