1 /*
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
77 visitor->do_temp(_tmp);
78 }
79 }
80
81 void ZLoadBarrierStubC1::emit_code(LIR_Assembler* ce) {
82 ZBarrierSet::assembler()->generate_c1_load_barrier_stub(ce, this);
83 }
84
85 #ifndef PRODUCT
86 void ZLoadBarrierStubC1::print_name(outputStream* out) const {
87 out->print("ZLoadBarrierStubC1");
88 }
89 #endif // PRODUCT
90
91 class LIR_OpZLoadBarrierTest : public LIR_Op {
92 private:
93 LIR_Opr _opr;
94
95 public:
96 LIR_OpZLoadBarrierTest(LIR_Opr opr) :
97 LIR_Op(),
98 _opr(opr) {}
99
100 virtual void visit(LIR_OpVisitState* state) {
101 state->do_input(_opr);
102 }
103
104 virtual void emit_code(LIR_Assembler* ce) {
105 ZBarrierSet::assembler()->generate_c1_load_barrier_test(ce, _opr);
106 }
107
108 virtual void print_instr(outputStream* out) const {
109 _opr->print(out);
110 out->print(" ");
111 }
112
113 #ifndef PRODUCT
114 virtual const char* name() const {
115 return "lir_z_load_barrier_test";
116 }
117 #endif // PRODUCT
|
1 /*
2 * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
77 visitor->do_temp(_tmp);
78 }
79 }
80
81 void ZLoadBarrierStubC1::emit_code(LIR_Assembler* ce) {
82 ZBarrierSet::assembler()->generate_c1_load_barrier_stub(ce, this);
83 }
84
85 #ifndef PRODUCT
86 void ZLoadBarrierStubC1::print_name(outputStream* out) const {
87 out->print("ZLoadBarrierStubC1");
88 }
89 #endif // PRODUCT
90
91 class LIR_OpZLoadBarrierTest : public LIR_Op {
92 private:
93 LIR_Opr _opr;
94
95 public:
96 LIR_OpZLoadBarrierTest(LIR_Opr opr) :
97 #ifdef RISCV
98 LIR_Op(lir_zloadbarrier_test, LIR_OprFact::illegalOpr, NULL),
99 #else
100 LIR_Op(),
101 #endif
102 _opr(opr) {}
103
104 virtual void visit(LIR_OpVisitState* state) {
105 state->do_input(_opr);
106 }
107
108 virtual void emit_code(LIR_Assembler* ce) {
109 ZBarrierSet::assembler()->generate_c1_load_barrier_test(ce, _opr);
110 }
111
112 virtual void print_instr(outputStream* out) const {
113 _opr->print(out);
114 out->print(" ");
115 }
116
117 #ifndef PRODUCT
118 virtual const char* name() const {
119 return "lir_z_load_barrier_test";
120 }
121 #endif // PRODUCT
|