annotate src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.hpp @ 51327:db0a17475826

8205336: Modularize allocations in assembler Reviewed-by: aph, eosterlund
author rkennke
date Tue, 19 Jun 2018 13:03:12 -0400
parents 8434981a4137
children 57565f7dcb2a
rev   line source
eosterlund@49949 1 /*
eosterlund@49949 2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
eosterlund@49949 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
eosterlund@49949 4 *
eosterlund@49949 5 * This code is free software; you can redistribute it and/or modify it
eosterlund@49949 6 * under the terms of the GNU General Public License version 2 only, as
eosterlund@49949 7 * published by the Free Software Foundation.
eosterlund@49949 8 *
eosterlund@49949 9 * This code is distributed in the hope that it will be useful, but WITHOUT
eosterlund@49949 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eosterlund@49949 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
eosterlund@49949 12 * version 2 for more details (a copy is included in the LICENSE file that
eosterlund@49949 13 * accompanied this code).
eosterlund@49949 14 *
eosterlund@49949 15 * You should have received a copy of the GNU General Public License version
eosterlund@49949 16 * 2 along with this work; if not, write to the Free Software Foundation,
eosterlund@49949 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
eosterlund@49949 18 *
eosterlund@49949 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
eosterlund@49949 20 * or visit www.oracle.com if you need additional information or have any
eosterlund@49949 21 * questions.
eosterlund@49949 22 *
eosterlund@49949 23 */
eosterlund@49949 24
shade@50224 25 #ifndef CPU_X86_GC_SHARED_BARRIERSETASSEMBLER_X86_HPP
shade@50224 26 #define CPU_X86_GC_SHARED_BARRIERSETASSEMBLER_X86_HPP
eosterlund@49949 27
eosterlund@49949 28 #include "asm/macroAssembler.hpp"
eosterlund@49949 29 #include "memory/allocation.hpp"
eosterlund@49949 30 #include "oops/access.hpp"
eosterlund@49949 31
eosterlund@49949 32 class InterpreterMacroAssembler;
eosterlund@49949 33
eosterlund@49949 34 class BarrierSetAssembler: public CHeapObj<mtGC> {
rkennke@51327 35 private:
rkennke@51327 36 void incr_allocated_bytes(MacroAssembler* masm, Register thread,
rkennke@51327 37 Register var_size_in_bytes,
rkennke@51327 38 int con_size_in_bytes,
rkennke@51327 39 Register t1);
rkennke@51327 40
eosterlund@49949 41 public:
eosterlund@49949 42 virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
eosterlund@49949 43 Register src, Register dst, Register count) {}
eosterlund@49949 44 virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
eosterlund@49949 45 Register src, Register dst, Register count) {}
eosterlund@50243 46
eosterlund@50243 47 virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
eosterlund@50243 48 Register dst, Address src, Register tmp1, Register tmp_thread);
eosterlund@50243 49 virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
eosterlund@50243 50 Address dst, Register val, Register tmp1, Register tmp2);
eosterlund@50243 51
rkennke@51149 52 #ifndef _LP64
rkennke@51149 53 virtual void obj_equals(MacroAssembler* masm,
rkennke@51149 54 Address obj1, jobject obj2);
rkennke@51149 55 virtual void obj_equals(MacroAssembler* masm,
rkennke@51149 56 Register obj1, jobject obj2);
rkennke@51149 57 #endif
rkennke@51149 58
rkennke@51149 59 virtual void obj_equals(MacroAssembler* masm,
rkennke@51149 60 Register obj1, Register obj2);
rkennke@51149 61 virtual void obj_equals(MacroAssembler* masm,
rkennke@51149 62 Register obj1, Address obj2);
rkennke@51149 63
eosterlund@50409 64 // Support for jniFastGetField to try resolving a jobject/jweak in native
eosterlund@50454 65 virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
eosterlund@50454 66 Register obj, Register tmp, Label& slowpath);
eosterlund@50409 67
rkennke@51327 68 virtual void tlab_allocate(MacroAssembler* masm,
rkennke@51327 69 Register thread, Register obj,
rkennke@51327 70 Register var_size_in_bytes,
rkennke@51327 71 int con_size_in_bytes,
rkennke@51327 72 Register t1, Register t2,
rkennke@51327 73 Label& slow_case);
rkennke@51327 74 virtual void eden_allocate(MacroAssembler* masm,
rkennke@51327 75 Register thread, Register obj,
rkennke@51327 76 Register var_size_in_bytes,
rkennke@51327 77 int con_size_in_bytes,
rkennke@51327 78 Register t1,
rkennke@51327 79 Label& slow_case);
rkennke@51327 80
eosterlund@50243 81 virtual void barrier_stubs_init() {}
eosterlund@49949 82 };
eosterlund@49949 83
shade@50224 84 #endif // CPU_X86_GC_SHARED_BARRIERSETASSEMBLER_X86_HPP