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