src/share/vm/c1/c1_MacroAssembler.hpp

Wed, 31 Aug 2011 16:46:11 -0700

author
never
date
Wed, 31 Aug 2011 16:46:11 -0700
changeset 3099
c124e2e7463e
parent 2708
1d1603768966
child 4037
da91efe96a93
permissions
-rw-r--r--

7083786: dead various dead chunks of code
Reviewed-by: iveresov, kvn

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

mercurial