29183
|
1 |
/*
|
|
2 |
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
|
4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
5 |
*
|
|
6 |
* This code is free software; you can redistribute it and/or modify it
|
|
7 |
* under the terms of the GNU General Public License version 2 only, as
|
|
8 |
* published by the Free Software Foundation.
|
|
9 |
*
|
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
14 |
* accompanied this code).
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License version
|
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
19 |
*
|
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
21 |
* or visit www.oracle.com if you need additional information or have any
|
|
22 |
* questions.
|
|
23 |
*
|
|
24 |
*/
|
|
25 |
|
|
26 |
#ifndef CPU_AARCH64_VM_STUBROUTINES_AARCH64_HPP
|
|
27 |
#define CPU_AARCH64_VM_STUBROUTINES_AARCH64_HPP
|
|
28 |
|
|
29 |
// This file holds the platform specific parts of the StubRoutines
|
|
30 |
// definition. See stubRoutines.hpp for a description on how to
|
|
31 |
// extend it.
|
|
32 |
|
|
33 |
// n.b. if we are notifying entry/exit to the simulator then the call
|
|
34 |
// stub does a notify at normal return placing
|
|
35 |
// call_stub_return_address one instruction beyond the notify. the
|
|
36 |
// latter address is sued by the stack unwind code when doign an
|
|
37 |
// exception return.
|
|
38 |
static bool returns_to_call_stub(address return_pc) {
|
|
39 |
return return_pc == _call_stub_return_address + (NotifySimulator ? -4 : 0);
|
|
40 |
}
|
|
41 |
|
|
42 |
enum platform_dependent_constants {
|
|
43 |
code_size1 = 19000, // simply increase if too small (assembler will crash if too small)
|
|
44 |
code_size2 = 22000 // simply increase if too small (assembler will crash if too small)
|
|
45 |
};
|
|
46 |
|
|
47 |
class aarch64 {
|
|
48 |
friend class StubGenerator;
|
|
49 |
|
|
50 |
private:
|
|
51 |
static address _get_previous_fp_entry;
|
|
52 |
static address _get_previous_sp_entry;
|
|
53 |
|
|
54 |
static address _f2i_fixup;
|
|
55 |
static address _f2l_fixup;
|
|
56 |
static address _d2i_fixup;
|
|
57 |
static address _d2l_fixup;
|
|
58 |
|
|
59 |
static address _float_sign_mask;
|
|
60 |
static address _float_sign_flip;
|
|
61 |
static address _double_sign_mask;
|
|
62 |
static address _double_sign_flip;
|
|
63 |
|
|
64 |
public:
|
|
65 |
|
|
66 |
static address get_previous_fp_entry()
|
|
67 |
{
|
|
68 |
return _get_previous_fp_entry;
|
|
69 |
}
|
|
70 |
|
|
71 |
static address get_previous_sp_entry()
|
|
72 |
{
|
|
73 |
return _get_previous_sp_entry;
|
|
74 |
}
|
|
75 |
|
|
76 |
static address f2i_fixup()
|
|
77 |
{
|
|
78 |
return _f2i_fixup;
|
|
79 |
}
|
|
80 |
|
|
81 |
static address f2l_fixup()
|
|
82 |
{
|
|
83 |
return _f2l_fixup;
|
|
84 |
}
|
|
85 |
|
|
86 |
static address d2i_fixup()
|
|
87 |
{
|
|
88 |
return _d2i_fixup;
|
|
89 |
}
|
|
90 |
|
|
91 |
static address d2l_fixup()
|
|
92 |
{
|
|
93 |
return _d2l_fixup;
|
|
94 |
}
|
|
95 |
|
|
96 |
static address float_sign_mask()
|
|
97 |
{
|
|
98 |
return _float_sign_mask;
|
|
99 |
}
|
|
100 |
|
|
101 |
static address float_sign_flip()
|
|
102 |
{
|
|
103 |
return _float_sign_flip;
|
|
104 |
}
|
|
105 |
|
|
106 |
static address double_sign_mask()
|
|
107 |
{
|
|
108 |
return _double_sign_mask;
|
|
109 |
}
|
|
110 |
|
|
111 |
static address double_sign_flip()
|
|
112 |
{
|
|
113 |
return _double_sign_flip;
|
|
114 |
}
|
|
115 |
|
|
116 |
private:
|
|
117 |
static juint _crc_table[];
|
|
118 |
|
|
119 |
};
|
|
120 |
|
|
121 |
#endif // CPU_AARCH64_VM_STUBROUTINES_AARCH64_HPP
|