# HG changeset patch # User never # Date 1239140808 25200 # Node ID 748572b86af635f0d27f980fd8b8fd63b381e048 # Parent c1be035112aa27c34866710e72698746095d356b 6636360: compiler/6595044/Main.java test fails with 64bit java on solaris-sparcv9 with SIGSEGV Reviewed-by: kvn, twisti diff -r c1be035112aa -r 748572b86af6 src/cpu/sparc/vm/vtableStubs_sparc.cpp --- 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);