annotate src/share/vm/c1/c1_MacroAssembler.hpp @ 3602:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 1d1603768966
children cd3d6a6b95d9
rev   line source
duke@0 1 /*
coleenp@3602 2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
duke@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 *
duke@0 5 * This code is free software; you can redistribute it and/or modify it
duke@0 6 * under the terms of the GNU General Public License version 2 only, as
duke@0 7 * published by the Free Software Foundation.
duke@0 8 *
duke@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 * accompanied this code).
duke@0 14 *
duke@0 15 * You should have received a copy of the GNU General Public License version
duke@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 *
trims@1472 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 20 * or visit www.oracle.com if you need additional information or have any
trims@1472 21 * questions.
duke@0 22 *
duke@0 23 */
duke@0 24
stefank@1879 25 #ifndef SHARE_VM_C1_C1_MACROASSEMBLER_HPP
stefank@1879 26 #define SHARE_VM_C1_C1_MACROASSEMBLER_HPP
stefank@1879 27
stefank@1879 28 #include "asm/assembler.hpp"
stefank@1879 29 #ifdef TARGET_ARCH_x86
stefank@1879 30 # include "assembler_x86.inline.hpp"
stefank@1879 31 #endif
stefank@1879 32 #ifdef TARGET_ARCH_sparc
stefank@1879 33 # include "assembler_sparc.inline.hpp"
stefank@1879 34 #endif
stefank@1879 35 #ifdef TARGET_ARCH_zero
stefank@1879 36 # include "assembler_zero.inline.hpp"
stefank@1879 37 #endif
bobv@2073 38 #ifdef TARGET_ARCH_arm
bobv@2073 39 # include "assembler_arm.inline.hpp"
bobv@2073 40 #endif
bobv@2073 41 #ifdef TARGET_ARCH_ppc
bobv@2073 42 # include "assembler_ppc.inline.hpp"
bobv@2073 43 #endif
stefank@1879 44
duke@0 45 class CodeEmitInfo;
duke@0 46
duke@0 47 class C1_MacroAssembler: public MacroAssembler {
duke@0 48 public:
duke@0 49 // creation
duke@0 50 C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); }
duke@0 51
duke@0 52 //----------------------------------------------------
duke@0 53 void explicit_null_check(Register base);
duke@0 54
duke@0 55 void inline_cache_check(Register receiver, Register iCache);
duke@0 56 void build_frame(int frame_size_in_bytes);
twisti@1295 57 void remove_frame(int frame_size_in_bytes);
duke@0 58
duke@0 59 void unverified_entry(Register receiver, Register ic_klass);
duke@0 60 void verified_entry();
duke@0 61 void verify_stack_oop(int offset) PRODUCT_RETURN;
duke@0 62 void verify_not_null_oop(Register r) PRODUCT_RETURN;
duke@0 63
stefank@1879 64 #ifdef TARGET_ARCH_x86
stefank@1879 65 # include "c1_MacroAssembler_x86.hpp"
stefank@1879 66 #endif
stefank@1879 67 #ifdef TARGET_ARCH_sparc
stefank@1879 68 # include "c1_MacroAssembler_sparc.hpp"
stefank@1879 69 #endif
bobv@2073 70 #ifdef TARGET_ARCH_arm
bobv@2073 71 # include "c1_MacroAssembler_arm.hpp"
bobv@2073 72 #endif
bobv@2073 73 #ifdef TARGET_ARCH_ppc
bobv@2073 74 # include "c1_MacroAssembler_ppc.hpp"
bobv@2073 75 #endif
stefank@1879 76
duke@0 77 };
duke@0 78
duke@0 79
duke@0 80
duke@0 81 // A StubAssembler is a MacroAssembler w/ extra functionality for runtime
duke@0 82 // stubs. Currently it 'knows' some stub info. Eventually, the information
duke@0 83 // may be set automatically or can be asserted when using specialised
duke@0 84 // StubAssembler functions.
duke@0 85
duke@0 86 class StubAssembler: public C1_MacroAssembler {
duke@0 87 private:
duke@0 88 const char* _name;
duke@0 89 bool _must_gc_arguments;
duke@0 90 int _frame_size;
duke@0 91 int _num_rt_args;
duke@0 92 int _stub_id;
duke@0 93
duke@0 94 public:
duke@0 95 // creation
duke@0 96 StubAssembler(CodeBuffer* code, const char * name, int stub_id);
duke@0 97 void set_info(const char* name, bool must_gc_arguments);
duke@0 98
duke@0 99 void set_frame_size(int size);
duke@0 100 void set_num_rt_args(int args);
duke@0 101
duke@0 102 // accessors
duke@0 103 const char* name() const { return _name; }
duke@0 104 bool must_gc_arguments() const { return _must_gc_arguments; }
duke@0 105 int frame_size() const { return _frame_size; }
duke@0 106 int num_rt_args() const { return _num_rt_args; }
duke@0 107 int stub_id() const { return _stub_id; }
duke@0 108
duke@0 109 // runtime calls (return offset of call to be used by GC map)
coleenp@3602 110 int call_RT(Register oop_result1, Register metadata_result, address entry, int args_size = 0);
coleenp@3602 111 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1);
coleenp@3602 112 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2);
coleenp@3602 113 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3);
duke@0 114 };
stefank@1879 115
stefank@1879 116 #endif // SHARE_VM_C1_C1_MACROASSEMBLER_HPP