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 */ 23 24 #ifndef CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP 25 #define CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP 26 27 #ifdef COMPILER1 28 class LIR_Assembler; 29 class LIR_OprDesc; 30 typedef LIR_OprDesc* LIR_Opr; 31 class StubAssembler; 32 class ZLoadBarrierStubC1; 33 #endif // COMPILER1 34 35 class ZBarrierSetAssembler : public ZBarrierSetAssemblerBase { 36 private: 37 address _load_barrier_slow_stub[RegisterImpl::number_of_registers]; 38 address _load_barrier_weak_slow_stub[RegisterImpl::number_of_registers]; 39 40 public: 41 ZBarrierSetAssembler(); 42 43 virtual void load_at(MacroAssembler* masm, 44 DecoratorSet decorators, 45 BasicType type, 46 Register dst, 47 Address src, 48 Register tmp1, 49 Register tmp_thread); 50 51 #ifdef ASSERT 52 virtual void store_at(MacroAssembler* masm, 53 DecoratorSet decorators, 54 BasicType type, 55 Address dst, 56 Register val, 57 Register tmp1, 58 Register tmp2); 59 #endif // ASSERT 60 61 virtual void arraycopy_prologue(MacroAssembler* masm, 62 DecoratorSet decorators, 66 Register count, 67 RegSet saved_regs); 68 69 virtual void try_resolve_jobject_in_native(MacroAssembler* masm, 70 Register jni_env, 71 Register robj, 72 Register tmp, 73 Label& slowpath); 74 75 #ifdef COMPILER1 76 void generate_c1_load_barrier_test(LIR_Assembler* ce, 77 LIR_Opr ref) const; 78 79 void generate_c1_load_barrier_stub(LIR_Assembler* ce, 80 ZLoadBarrierStubC1* stub) const; 81 82 void generate_c1_load_barrier_runtime_stub(StubAssembler* sasm, 83 DecoratorSet decorators) const; 84 #endif // COMPILER1 85 86 virtual void barrier_stubs_init(); 87 88 address load_barrier_slow_stub(Register reg); 89 address load_barrier_weak_slow_stub(Register reg); 90 }; 91 92 #endif // CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP | 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 */ 23 24 #ifndef CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP 25 #define CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP 26 27 #include "code/vmreg.hpp" 28 #include "oops/accessDecorators.hpp" 29 #ifdef COMPILER2 30 #include "opto/optoreg.hpp" 31 #endif // COMPILER2 32 33 #ifdef COMPILER1 34 class LIR_Assembler; 35 class LIR_OprDesc; 36 typedef LIR_OprDesc* LIR_Opr; 37 class StubAssembler; 38 class ZLoadBarrierStubC1; 39 #endif // COMPILER1 40 41 #ifdef COMPILER2 42 class Node; 43 class ZLoadBarrierStubC2; 44 #endif // COMPILER2 45 46 class ZBarrierSetAssembler : public ZBarrierSetAssemblerBase { 47 public: 48 virtual void load_at(MacroAssembler* masm, 49 DecoratorSet decorators, 50 BasicType type, 51 Register dst, 52 Address src, 53 Register tmp1, 54 Register tmp_thread); 55 56 #ifdef ASSERT 57 virtual void store_at(MacroAssembler* masm, 58 DecoratorSet decorators, 59 BasicType type, 60 Address dst, 61 Register val, 62 Register tmp1, 63 Register tmp2); 64 #endif // ASSERT 65 66 virtual void arraycopy_prologue(MacroAssembler* masm, 67 DecoratorSet decorators, 71 Register count, 72 RegSet saved_regs); 73 74 virtual void try_resolve_jobject_in_native(MacroAssembler* masm, 75 Register jni_env, 76 Register robj, 77 Register tmp, 78 Label& slowpath); 79 80 #ifdef COMPILER1 81 void generate_c1_load_barrier_test(LIR_Assembler* ce, 82 LIR_Opr ref) const; 83 84 void generate_c1_load_barrier_stub(LIR_Assembler* ce, 85 ZLoadBarrierStubC1* stub) const; 86 87 void generate_c1_load_barrier_runtime_stub(StubAssembler* sasm, 88 DecoratorSet decorators) const; 89 #endif // COMPILER1 90 91 #ifdef COMPILER2 92 OptoReg::Name refine_register(const Node* node, 93 OptoReg::Name opto_reg); 94 95 void generate_c2_load_barrier_stub(MacroAssembler* masm, 96 ZLoadBarrierStubC2* stub) const; 97 #endif // COMPILER2 98 }; 99 100 #endif // CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP |