--- a/src/hotspot/cpu/ppc/ppc.ad Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/cpu/ppc/ppc.ad Thu Oct 17 20:53:35 2019 +0100
@@ -1,6 +1,6 @@
//
-// Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2012, 2018 SAP SE. All rights reserved.
+// Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2012, 2019 SAP SE. 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
@@ -1400,6 +1400,24 @@
___(mflr) mflr(return_pc);
}
+ if (C->clinit_barrier_on_entry()) {
+ assert(!C->method()->holder()->is_not_initialized(), "initialization should have been started");
+
+ Label L_skip_barrier;
+ Register klass = toc_temp;
+
+ // Notify OOP recorder (don't need the relocation)
+ AddressLiteral md = __ constant_metadata_address(C->method()->holder()->constant_encoding());
+ __ load_const_optimized(klass, md.value(), R0);
+ __ clinit_barrier(klass, R16_thread, &L_skip_barrier /*L_fast_path*/);
+
+ __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub(), R0);
+ __ mtctr(klass);
+ __ bctr();
+
+ __ bind(L_skip_barrier);
+ }
+
// Calls to C2R adapters often do not accept exceptional returns.
// We require that their callers must bang for them. But be
// careful, because some VM calls (such as call site linkage) can
@@ -4631,6 +4649,16 @@
interface(CONST_INTER);
%}
+// Double Immediate: +0.0d.
+operand immD_0() %{
+ predicate(jlong_cast(n->getd()) == 0);
+ match(ConD);
+
+ op_cost(0);
+ format %{ %}
+ interface(CONST_INTER);
+%}
+
// Integer Register Operands
// Integer Destination Register
// See definition of reg_class bits32_reg_rw.
@@ -10839,6 +10867,14 @@
ins_pipe(pipe_class_default);
%}
+instruct castLL(iRegLdst dst) %{
+ match(Set dst (CastLL dst));
+ format %{ " -- \t// castLL of $dst" %}
+ size(0);
+ ins_encode( /*empty*/ );
+ ins_pipe(pipe_class_default);
+%}
+
instruct checkCastPP(iRegPdst dst) %{
match(Set dst (CheckCastPP dst));
format %{ " -- \t// checkcastPP of $dst" %}
@@ -14009,7 +14045,7 @@
instruct repl4S_immI0(iRegLdst dst, immI_0 zero) %{
match(Set dst (ReplicateS zero));
predicate(n->as_Vector()->length() == 4);
- format %{ "LI $dst, #0 \t// replicate4C" %}
+ format %{ "LI $dst, #0 \t// replicate4S" %}
size(4);
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_addi);
@@ -14021,7 +14057,7 @@
instruct repl4S_immIminus1(iRegLdst dst, immI_minus1 src) %{
match(Set dst (ReplicateS src));
predicate(n->as_Vector()->length() == 4);
- format %{ "LI $dst, -1 \t// replicate4C" %}
+ format %{ "LI $dst, -1 \t// replicate4S" %}
size(4);
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_addi);
@@ -14062,7 +14098,7 @@
match(Set dst (ReplicateS src));
predicate(n->as_Vector()->length() == 8);
- format %{ "XXLEQV $dst, $src \t// replicate16B" %}
+ format %{ "XXLEQV $dst, $src \t// replicate8S" %}
size(4);
ins_encode %{
__ xxleqv($dst$$VectorSRegister, $dst$$VectorSRegister, $dst$$VectorSRegister);
@@ -14083,7 +14119,7 @@
instruct repl2I_immI0(iRegLdst dst, immI_0 zero) %{
match(Set dst (ReplicateI zero));
predicate(n->as_Vector()->length() == 2);
- format %{ "LI $dst, #0 \t// replicate4C" %}
+ format %{ "LI $dst, #0 \t// replicate2I" %}
size(4);
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_addi);
@@ -14095,7 +14131,7 @@
instruct repl2I_immIminus1(iRegLdst dst, immI_minus1 src) %{
match(Set dst (ReplicateI src));
predicate(n->as_Vector()->length() == 2);
- format %{ "LI $dst, -1 \t// replicate4C" %}
+ format %{ "LI $dst, -1 \t// replicate2I" %}
size(4);
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_addi);
@@ -14669,7 +14705,7 @@
ins_pipe(pipe_class_default);
%}
-instruct repl2D_immI0(vecX dst, immI_0 zero) %{
+instruct repl2D_immD0(vecX dst, immD_0 zero) %{
match(Set dst (ReplicateD zero));
predicate(n->as_Vector()->length() == 2);
@@ -14681,18 +14717,6 @@
ins_pipe(pipe_class_default);
%}
-instruct repl2D_immIminus1(vecX dst, immI_minus1 src) %{
- match(Set dst (ReplicateD src));
- predicate(n->as_Vector()->length() == 2);
-
- format %{ "XXLEQV $dst, $src \t// replicate16B" %}
- size(4);
- ins_encode %{
- __ xxleqv($dst$$VectorSRegister, $dst$$VectorSRegister, $dst$$VectorSRegister);
- %}
- ins_pipe(pipe_class_default);
-%}
-
instruct mtvsrd(vecX dst, iRegLsrc src) %{
predicate(false);
effect(DEF dst, USE src);
@@ -14754,7 +14778,7 @@
match(Set dst (ReplicateL src));
predicate(n->as_Vector()->length() == 2);
- format %{ "XXLEQV $dst, $src \t// replicate16B" %}
+ format %{ "XXLEQV $dst, $src \t// replicate2L" %}
size(4);
ins_encode %{
__ xxleqv($dst$$VectorSRegister, $dst$$VectorSRegister, $dst$$VectorSRegister);