8138895: C1: PPC64 Port needs special register for Locks in synchronization code
Reviewed-by: vlivanov, goetz
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp Wed Oct 21 11:40:05 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp Mon Oct 05 23:50:43 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -70,6 +70,7 @@
LIR_Opr LIRGenerator::divOutOpr() { Unimplemented(); return LIR_OprFact::illegalOpr; }
LIR_Opr LIRGenerator::remOutOpr() { Unimplemented(); return LIR_OprFact::illegalOpr; }
LIR_Opr LIRGenerator::shiftCountOpr() { Unimplemented(); return LIR_OprFact::illegalOpr; }
+LIR_Opr LIRGenerator::syncLockOpr() { return new_register(T_INT); }
LIR_Opr LIRGenerator::syncTempOpr() { return FrameMap::r0_opr; }
LIR_Opr LIRGenerator::getThreadTemp() { return LIR_OprFact::illegalOpr; }
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Wed Oct 21 11:40:05 2015 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Mon Oct 05 23:50:43 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. 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
@@ -68,6 +68,7 @@
LIR_Opr LIRGenerator::exceptionOopOpr() { return FrameMap::Oexception_opr; }
LIR_Opr LIRGenerator::exceptionPcOpr() { return FrameMap::Oissuing_pc_opr; }
+LIR_Opr LIRGenerator::syncLockOpr() { return new_register(T_INT); }
LIR_Opr LIRGenerator::syncTempOpr() { return new_register(T_OBJECT); }
LIR_Opr LIRGenerator::getThreadTemp() { return rlock_callee_saved(NOT_LP64(T_INT) LP64_ONLY(T_LONG)); }
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Wed Oct 21 11:40:05 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Mon Oct 05 23:50:43 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. 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
@@ -80,6 +80,7 @@
LIR_Opr LIRGenerator::divOutOpr() { return FrameMap::rax_opr; }
LIR_Opr LIRGenerator::remOutOpr() { return FrameMap::rdx_opr; }
LIR_Opr LIRGenerator::shiftCountOpr() { return FrameMap::rcx_opr; }
+LIR_Opr LIRGenerator::syncLockOpr() { return new_register(T_INT); }
LIR_Opr LIRGenerator::syncTempOpr() { return FrameMap::rax_opr; }
LIR_Opr LIRGenerator::getThreadTemp() { return LIR_OprFact::illegalOpr; }
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Wed Oct 21 11:40:05 2015 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Mon Oct 05 23:50:43 2015 +0200
@@ -2802,7 +2802,7 @@
assert(obj->is_valid(), "must be valid");
if (method()->is_synchronized() && GenerateSynchronizationCode) {
- LIR_Opr lock = new_register(T_INT);
+ LIR_Opr lock = syncLockOpr();
__ load_stack_address_monitor(0, lock);
CodeEmitInfo* info = new CodeEmitInfo(scope()->start()->state()->copy(ValueStack::StateBefore, SynchronizationEntryBCI), NULL, x->check_flag(Instruction::DeoptimizeOnException));
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp Wed Oct 21 11:40:05 2015 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp Mon Oct 05 23:50:43 2015 +0200
@@ -495,6 +495,7 @@
static LIR_Opr divOutOpr();
static LIR_Opr remOutOpr();
static LIR_Opr shiftCountOpr();
+ LIR_Opr syncLockOpr();
LIR_Opr syncTempOpr();
LIR_Opr atomicLockOpr();