changeset 35585:439d9cd90559

8147386: assert(size == calc_size) failed: incorrect size calculattion x86_32.ad Summary: incorrect offset used in spill code for vectors Reviewed-by: vlivanov, kvn, mcberg
author roland
date Tue, 19 Jan 2016 17:58:02 +0100
parents 3e83096ee8e5
children 2aeb1ca2c40b
files hotspot/src/cpu/x86/vm/x86_32.ad
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/cpu/x86/vm/x86_32.ad	Wed Jan 20 17:00:17 2016 -1000
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad	Tue Jan 19 17:58:02 2016 +0100
@@ -968,14 +968,15 @@
   case Op_VecS:
     calc_size = 3+src_offset_size + 3+dst_offset_size;
     break;
-  case Op_VecD:
+  case Op_VecD: {
     calc_size = 3+src_offset_size + 3+dst_offset_size;
-    src_offset += 4;
-    dst_offset += 4;
-    src_offset_size = (src_offset == 0) ? 0 : ((src_offset < 0x80) ? 1 : 4);
-    dst_offset_size = (dst_offset == 0) ? 0 : ((dst_offset < 0x80) ? 1 : 4);
+    int tmp_src_offset = src_offset + 4;
+    int tmp_dst_offset = dst_offset + 4;
+    src_offset_size = (tmp_src_offset == 0) ? 0 : ((tmp_src_offset < 0x80) ? 1 : 4);
+    dst_offset_size = (tmp_dst_offset == 0) ? 0 : ((tmp_dst_offset < 0x80) ? 1 : 4);
     calc_size += 3+src_offset_size + 3+dst_offset_size;
     break;
+  }   
   case Op_VecX:
   case Op_VecY:
   case Op_VecZ:
@@ -1020,7 +1021,7 @@
       ShouldNotReachHere();
     }
     int size = __ offset() - offset;
-    assert(size == calc_size, "incorrect size calculattion");
+    assert(size == calc_size, "incorrect size calculation");
     return size;
 #ifndef PRODUCT
   } else if (!do_size) {