author | cl |
Thu, 26 Jul 2012 16:48:33 -0700 | |
changeset 13318 | 9e9deec19f0f |
parent 8921 | 14bfe81f2a9d |
child 13728 | 882756847a04 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
8921
14bfe81f2a9d
7010070: Update all 2010 Oracle-changed OpenJDK files to have the proper copyright dates - second pass
trims
parents:
8107
diff
changeset
|
2 |
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5046
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5046
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5046
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#ifndef SHARE_VM_C1_C1_MACROASSEMBLER_HPP |
26 |
#define SHARE_VM_C1_C1_MACROASSEMBLER_HPP |
|
27 |
||
28 |
#include "asm/assembler.hpp" |
|
29 |
#ifdef TARGET_ARCH_x86 |
|
30 |
# include "assembler_x86.inline.hpp" |
|
31 |
#endif |
|
32 |
#ifdef TARGET_ARCH_sparc |
|
33 |
# include "assembler_sparc.inline.hpp" |
|
34 |
#endif |
|
35 |
#ifdef TARGET_ARCH_zero |
|
36 |
# include "assembler_zero.inline.hpp" |
|
37 |
#endif |
|
8107
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
38 |
#ifdef TARGET_ARCH_arm |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
39 |
# include "assembler_arm.inline.hpp" |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
40 |
#endif |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
41 |
#ifdef TARGET_ARCH_ppc |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
42 |
# include "assembler_ppc.inline.hpp" |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
43 |
#endif |
7397 | 44 |
|
1 | 45 |
class CodeEmitInfo; |
46 |
||
47 |
class C1_MacroAssembler: public MacroAssembler { |
|
48 |
public: |
|
49 |
// creation |
|
50 |
C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); } |
|
51 |
||
52 |
//---------------------------------------------------- |
|
53 |
void explicit_null_check(Register base); |
|
54 |
||
55 |
void inline_cache_check(Register receiver, Register iCache); |
|
56 |
void build_frame(int frame_size_in_bytes); |
|
5046 | 57 |
void remove_frame(int frame_size_in_bytes); |
1 | 58 |
|
59 |
void unverified_entry(Register receiver, Register ic_klass); |
|
60 |
void verified_entry(); |
|
61 |
void verify_stack_oop(int offset) PRODUCT_RETURN; |
|
62 |
void verify_not_null_oop(Register r) PRODUCT_RETURN; |
|
63 |
||
7397 | 64 |
#ifdef TARGET_ARCH_x86 |
65 |
# include "c1_MacroAssembler_x86.hpp" |
|
66 |
#endif |
|
67 |
#ifdef TARGET_ARCH_sparc |
|
68 |
# include "c1_MacroAssembler_sparc.hpp" |
|
69 |
#endif |
|
8107
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
70 |
#ifdef TARGET_ARCH_arm |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
71 |
# include "c1_MacroAssembler_arm.hpp" |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
72 |
#endif |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
73 |
#ifdef TARGET_ARCH_ppc |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
74 |
# include "c1_MacroAssembler_ppc.hpp" |
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
75 |
#endif |
7397 | 76 |
|
1 | 77 |
}; |
78 |
||
79 |
||
80 |
||
81 |
// A StubAssembler is a MacroAssembler w/ extra functionality for runtime |
|
82 |
// stubs. Currently it 'knows' some stub info. Eventually, the information |
|
83 |
// may be set automatically or can be asserted when using specialised |
|
84 |
// StubAssembler functions. |
|
85 |
||
86 |
class StubAssembler: public C1_MacroAssembler { |
|
87 |
private: |
|
88 |
const char* _name; |
|
89 |
bool _must_gc_arguments; |
|
90 |
int _frame_size; |
|
91 |
int _num_rt_args; |
|
92 |
int _stub_id; |
|
93 |
||
94 |
public: |
|
95 |
// creation |
|
96 |
StubAssembler(CodeBuffer* code, const char * name, int stub_id); |
|
97 |
void set_info(const char* name, bool must_gc_arguments); |
|
98 |
||
99 |
void set_frame_size(int size); |
|
100 |
void set_num_rt_args(int args); |
|
101 |
||
102 |
// accessors |
|
103 |
const char* name() const { return _name; } |
|
104 |
bool must_gc_arguments() const { return _must_gc_arguments; } |
|
105 |
int frame_size() const { return _frame_size; } |
|
106 |
int num_rt_args() const { return _num_rt_args; } |
|
107 |
int stub_id() const { return _stub_id; } |
|
108 |
||
109 |
// runtime calls (return offset of call to be used by GC map) |
|
110 |
int call_RT(Register oop_result1, Register oop_result2, address entry, int args_size = 0); |
|
111 |
int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1); |
|
112 |
int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1, Register arg2); |
|
113 |
int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1, Register arg2, Register arg3); |
|
114 |
}; |
|
7397 | 115 |
|
116 |
#endif // SHARE_VM_C1_C1_MACROASSEMBLER_HPP |