annotate src/share/vm/c1/c1_MacroAssembler.hpp @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children 3cf667df43ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 class CodeEmitInfo;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 class C1_MacroAssembler: public MacroAssembler {
a61af66fc99e Initial load
duke
parents:
diff changeset
28 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
29 // creation
a61af66fc99e Initial load
duke
parents:
diff changeset
30 C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 //----------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
33 void explicit_null_check(Register base);
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 void inline_cache_check(Register receiver, Register iCache);
a61af66fc99e Initial load
duke
parents:
diff changeset
36 void build_frame(int frame_size_in_bytes);
a61af66fc99e Initial load
duke
parents:
diff changeset
37 void method_exit(bool restore_frame);
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 void unverified_entry(Register receiver, Register ic_klass);
a61af66fc99e Initial load
duke
parents:
diff changeset
40 void verified_entry();
a61af66fc99e Initial load
duke
parents:
diff changeset
41 void verify_stack_oop(int offset) PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
42 void verify_not_null_oop(Register r) PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 #include "incls/_c1_MacroAssembler_pd.hpp.incl"
a61af66fc99e Initial load
duke
parents:
diff changeset
45 };
a61af66fc99e Initial load
duke
parents:
diff changeset
46
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 // A StubAssembler is a MacroAssembler w/ extra functionality for runtime
a61af66fc99e Initial load
duke
parents:
diff changeset
50 // stubs. Currently it 'knows' some stub info. Eventually, the information
a61af66fc99e Initial load
duke
parents:
diff changeset
51 // may be set automatically or can be asserted when using specialised
a61af66fc99e Initial load
duke
parents:
diff changeset
52 // StubAssembler functions.
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 class StubAssembler: public C1_MacroAssembler {
a61af66fc99e Initial load
duke
parents:
diff changeset
55 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
56 const char* _name;
a61af66fc99e Initial load
duke
parents:
diff changeset
57 bool _must_gc_arguments;
a61af66fc99e Initial load
duke
parents:
diff changeset
58 int _frame_size;
a61af66fc99e Initial load
duke
parents:
diff changeset
59 int _num_rt_args;
a61af66fc99e Initial load
duke
parents:
diff changeset
60 int _stub_id;
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
63 // creation
a61af66fc99e Initial load
duke
parents:
diff changeset
64 StubAssembler(CodeBuffer* code, const char * name, int stub_id);
a61af66fc99e Initial load
duke
parents:
diff changeset
65 void set_info(const char* name, bool must_gc_arguments);
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 void set_frame_size(int size);
a61af66fc99e Initial load
duke
parents:
diff changeset
68 void set_num_rt_args(int args);
a61af66fc99e Initial load
duke
parents:
diff changeset
69
a61af66fc99e Initial load
duke
parents:
diff changeset
70 // accessors
a61af66fc99e Initial load
duke
parents:
diff changeset
71 const char* name() const { return _name; }
a61af66fc99e Initial load
duke
parents:
diff changeset
72 bool must_gc_arguments() const { return _must_gc_arguments; }
a61af66fc99e Initial load
duke
parents:
diff changeset
73 int frame_size() const { return _frame_size; }
a61af66fc99e Initial load
duke
parents:
diff changeset
74 int num_rt_args() const { return _num_rt_args; }
a61af66fc99e Initial load
duke
parents:
diff changeset
75 int stub_id() const { return _stub_id; }
a61af66fc99e Initial load
duke
parents:
diff changeset
76
a61af66fc99e Initial load
duke
parents:
diff changeset
77 // runtime calls (return offset of call to be used by GC map)
a61af66fc99e Initial load
duke
parents:
diff changeset
78 int call_RT(Register oop_result1, Register oop_result2, address entry, int args_size = 0);
a61af66fc99e Initial load
duke
parents:
diff changeset
79 int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1);
a61af66fc99e Initial load
duke
parents:
diff changeset
80 int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1, Register arg2);
a61af66fc99e Initial load
duke
parents:
diff changeset
81 int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1, Register arg2, Register arg3);
a61af66fc99e Initial load
duke
parents:
diff changeset
82 };