changeset 532:748572b86af6

6636360: compiler/6595044/Main.java test fails with 64bit java on solaris-sparcv9 with SIGSEGV Reviewed-by: kvn, twisti
author never
date Tue, 07 Apr 2009 14:46:48 -0700
parents c1be035112aa
children 081e91e3e8f3 3b198a510480
files src/cpu/sparc/vm/vtableStubs_sparc.cpp
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/sparc/vm/vtableStubs_sparc.cpp	Wed Mar 25 02:18:06 2009 -0700
+++ b/src/cpu/sparc/vm/vtableStubs_sparc.cpp	Tue Apr 07 14:46:48 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -190,12 +190,16 @@
   // Compute itableMethodEntry and get methodOop(G5_method) and entrypoint(L0) for compiler
   const int method_offset = (itableMethodEntry::size() * wordSize * vtable_index) + itableMethodEntry::method_offset_in_bytes();
   __ add(G3_klassOop, L0, L1);
-  __ ld_ptr(L1, method_offset, G5_method);
+  if (__ is_simm13(method_offset)) {
+    __ ld_ptr(L1, method_offset, G5_method);
+  } else {
+    __ set(method_offset, G5_method);
+    __ ld_ptr(L1, G5_method, G5_method);
+  }
 
 #ifndef PRODUCT
   if (DebugVtables) {
     Label L01;
-    __ ld_ptr(L1, method_offset, G5_method);
     __ bpr(Assembler::rc_nz, false, Assembler::pt, G5_method, L01);
     __ delayed()->nop();
     __ stop("methodOop is null");
@@ -244,7 +248,7 @@
       return basic + slop;
     } else {
       // save, ld, ld, sll, and, add, add, ld, cmp, br, add, ld, add, ld, ld, jmp, restore, sethi, jmpl, restore
-      const int basic = (20 LP64_ONLY(+ 6)) * BytesPerInstWord +
+      const int basic = (22 LP64_ONLY(+ 12)) * BytesPerInstWord +
                         // shift;add for load_klass
                         (UseCompressedOops ? 2*BytesPerInstWord : 0);
       return (basic + slop);