Mercurial > hg > release > icedtea7-forest-2.6 > hotspot
changeset 6490:7b278d190877
8037915: PPC64/AIX: Several smaller fixes
Reviewed-by: kvn
author | goetz |
---|---|
date | Mon, 31 Mar 2014 12:51:40 +0200 |
parents | 807f61aed46a |
children | 5d31d3750e8c |
files | src/cpu/ppc/vm/assembler_ppc.cpp src/cpu/ppc/vm/assembler_ppc.inline.hpp src/cpu/ppc/vm/methodHandles_ppc.cpp src/cpu/ppc/vm/stubRoutines_ppc_64.cpp src/cpu/ppc/vm/vm_version_ppc.cpp src/cpu/ppc/vm/vm_version_ppc.hpp src/os/aix/vm/mutex_aix.inline.hpp src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp src/os_cpu/aix_ppc/vm/thread_aix_ppc.cpp src/os_cpu/linux_ppc/vm/thread_linux_ppc.cpp |
diffstat | 10 files changed, 49 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/ppc/vm/assembler_ppc.cpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/cpu/ppc/vm/assembler_ppc.cpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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 @@ -36,6 +36,7 @@ #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" +#include "utilities/macros.hpp" #ifndef SERIALGC #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" @@ -383,10 +384,10 @@ bool load_xa = (xa != 0) || (xb < 0); bool return_xd = false; - if (load_xa) lis(tmp, xa); - if (xc) lis(d, xc); + if (load_xa) { lis(tmp, xa); } + if (xc) { lis(d, xc); } if (load_xa) { - if (xb) ori(tmp, tmp, xb); // No addi, we support tmp == R0. + if (xb) { ori(tmp, tmp, (unsigned short)xb); } // No addi, we support tmp == R0. } else { li(tmp, xb); // non-negative } @@ -408,18 +409,18 @@ // opt 4: avoid adding 0 if (xa) { // Highest 16-bit needed? lis(d, xa); - if (xb) addi(d, d, xb); + if (xb) { addi(d, d, xb); } } else { li(d, xb); } sldi(d, d, 32); - if (xc) addis(d, d, xc); + if (xc) { addis(d, d, xc); } } // opt 5: Return offset to be inserted into following instruction. if (return_simm16_rest) return xd; - if (xd) addi(d, d, xd); + if (xd) { addi(d, d, xd); } return 0; }
--- a/src/cpu/ppc/vm/assembler_ppc.inline.hpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/cpu/ppc/vm/assembler_ppc.inline.hpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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
--- a/src/cpu/ppc/vm/methodHandles_ppc.cpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/cpu/ppc/vm/methodHandles_ppc.cpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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 @@ -121,6 +121,7 @@ void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register target, Register temp, bool for_compiler_entry) { + Label L_no_such_method; assert(method == R19_method, "interpreter calling convention"); assert_different_registers(method, target, temp); __ verify_oop(method); @@ -134,17 +135,31 @@ __ lwz(temp, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread); __ cmplwi(CCR0, temp, 0); __ beq(CCR0, run_compiled_code); + // Null method test is replicated below in compiled case, + // it might be able to address across the verify_thread() + __ cmplwi(CCR0, R19_method, 0); + __ beq(CCR0, L_no_such_method); __ ld(target, in_bytes(methodOopDesc::interpreter_entry_offset()), R19_method); __ mtctr(target); __ bctr(); __ BIND(run_compiled_code); } + // Compiled case, either static or fall-through from runtime conditional + __ cmplwi(CCR0, R19_method, 0); + __ beq(CCR0, L_no_such_method); + const ByteSize entry_offset = for_compiler_entry ? methodOopDesc::from_compiled_offset() : methodOopDesc::from_interpreted_offset(); __ ld(target, in_bytes(entry_offset), R19_method); __ mtctr(target); __ bctr(); + + __ bind(L_no_such_method); + assert(StubRoutines::throw_AbstractMethodError_entry() != NULL, "not yet generated!"); + __ load_const_optimized(target, StubRoutines::throw_AbstractMethodError_entry()); + __ mtctr(target); + __ bctr(); }
--- a/src/cpu/ppc/vm/stubRoutines_ppc_64.cpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/cpu/ppc/vm/stubRoutines_ppc_64.cpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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 @@ -23,17 +23,6 @@ * */ -#include "precompiled.hpp" -#include "runtime/deoptimization.hpp" -#include "runtime/frame.inline.hpp" -#include "runtime/stubRoutines.hpp" -#ifdef TARGET_OS_FAMILY_aix -# include "thread_aix.inline.hpp" -#endif -#ifdef TARGET_OS_FAMILY_linux -# include "thread_linux.inline.hpp" -#endif - // Implementation of the platform-specific part of StubRoutines - for // a description of how to extend it, see the stubRoutines.hpp file.
--- a/src/cpu/ppc/vm/vm_version_ppc.cpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/cpu/ppc/vm/vm_version_ppc.cpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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 @@ -401,6 +401,9 @@ // Must be set to true so we can generate the test code. _features = VM_Version::all_features_m; + // Must be set to true so we can generate the test code. + _features = VM_Version::all_features_m; + // Emit code. void (*test)(address addr, uint64_t offset)=(void(*)(address addr, uint64_t offset))(void *)a->function_entry(); uint32_t *code = (uint32_t *)a->pc();
--- a/src/cpu/ppc/vm/vm_version_ppc.hpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/cpu/ppc/vm/vm_version_ppc.hpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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
--- a/src/os/aix/vm/mutex_aix.inline.hpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/os/aix/vm/mutex_aix.inline.hpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,5 @@ /* * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. 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 @@ -23,11 +22,16 @@ * */ -#ifndef OS_AIX_VM_MUTEX_AIX_INLINE_HPP -#define OS_AIX_VM_MUTEX_AIX_INLINE_HPP +#ifndef OS_LINUX_VM_MUTEX_LINUX_INLINE_HPP +#define OS_LINUX_VM_MUTEX_LINUX_INLINE_HPP #include "os_aix.inline.hpp" #include "runtime/interfaceSupport.hpp" #include "thread_aix.inline.hpp" -#endif // OS_AIX_VM_MUTEX_AIX_INLINE_HPP + +// Reconciliation History +// mutex_solaris.inline.hpp 1.5 99/06/22 16:38:49 +// End + +#endif // OS_LINUX_VM_MUTEX_LINUX_INLINE_HPP
--- a/src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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 @@ -25,14 +25,14 @@ #include "precompiled.hpp" #include "runtime/threadLocalStorage.hpp" -#include "thread_aix.inline.hpp" +#include "runtime/thread.hpp" void ThreadLocalStorage::generate_code_for_get_thread() { - // nothing we can do here for user-level thread + // Nothing we can do here for user-level thread. } void ThreadLocalStorage::pd_init() { - // Nothing to do + // Nothing to do. } void ThreadLocalStorage::pd_set_thread(Thread* thread) {
--- a/src/os_cpu/aix_ppc/vm/thread_aix_ppc.cpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/os_cpu/aix_ppc/vm/thread_aix_ppc.cpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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 @@ -24,8 +24,8 @@ */ #include "precompiled.hpp" -#include "runtime/frame.inline.hpp" -#include "thread_aix.inline.hpp" +#include "runtime/frame.hpp" +#include "runtime/thread.hpp" // Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Aix/PPC. bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {
--- a/src/os_cpu/linux_ppc/vm/thread_linux_ppc.cpp Fri Mar 28 15:05:47 2014 +0100 +++ b/src/os_cpu/linux_ppc/vm/thread_linux_ppc.cpp Mon Mar 31 12:51:40 2014 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright 2012, 2014 SAP AG. 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 @@ -24,8 +24,8 @@ */ #include "precompiled.hpp" -#include "runtime/frame.inline.hpp" -#include "thread_linux.inline.hpp" +#include "runtime/frame.hpp" +#include "runtime/thread.hpp" // Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Linux/PPC. bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {