1 /*
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
154 }
155
156 if (RegisterFinalizersAtInit && m->code_size() == 1 &&
157 m->intrinsic_id() == vmIntrinsics::_Object_init) {
158 // We need to execute the special return bytecode to check for
159 // finalizer registration so create a normal frame.
160 return zerolocals;
161 }
162
163 // Empty method?
164 if (m->is_empty_method()) {
165 return empty;
166 }
167
168 // Special intrinsic method?
169 // Note: This test must come _after_ the test for native methods,
170 // otherwise we will run into problems with JDK 1.2, see also
171 // TemplateInterpreterGenerator::generate_method_entry() for
172 // for details.
173 switch (m->intrinsic_id()) {
174 case vmIntrinsics::_dsin : return java_lang_math_sin ;
175 case vmIntrinsics::_dcos : return java_lang_math_cos ;
176 case vmIntrinsics::_dtan : return java_lang_math_tan ;
177 case vmIntrinsics::_dabs : return java_lang_math_abs ;
178 case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
179 case vmIntrinsics::_dlog : return java_lang_math_log ;
180 case vmIntrinsics::_dlog10: return java_lang_math_log10;
181 case vmIntrinsics::_dpow : return java_lang_math_pow ;
182 case vmIntrinsics::_dexp : return java_lang_math_exp ;
183 case vmIntrinsics::_fmaD : return java_lang_math_fmaD ;
184 case vmIntrinsics::_fmaF : return java_lang_math_fmaF ;
185
186 case vmIntrinsics::_Reference_get
187 : return java_lang_ref_reference_get;
188 default : break;
189 }
190
191 // Accessor method?
192 if (m->is_getter()) {
193 // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters.
|
1 /*
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
154 }
155
156 if (RegisterFinalizersAtInit && m->code_size() == 1 &&
157 m->intrinsic_id() == vmIntrinsics::_Object_init) {
158 // We need to execute the special return bytecode to check for
159 // finalizer registration so create a normal frame.
160 return zerolocals;
161 }
162
163 // Empty method?
164 if (m->is_empty_method()) {
165 return empty;
166 }
167
168 // Special intrinsic method?
169 // Note: This test must come _after_ the test for native methods,
170 // otherwise we will run into problems with JDK 1.2, see also
171 // TemplateInterpreterGenerator::generate_method_entry() for
172 // for details.
173 switch (m->intrinsic_id()) {
174 case vmIntrinsics::_setBit: return java_lang_System_setBit;
175 case vmIntrinsics::_clrBit: return java_lang_System_clrBit;
176 case vmIntrinsics::_dsin : return java_lang_math_sin ;
177 case vmIntrinsics::_dcos : return java_lang_math_cos ;
178 case vmIntrinsics::_dtan : return java_lang_math_tan ;
179 case vmIntrinsics::_dabs : return java_lang_math_abs ;
180 case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
181 case vmIntrinsics::_dlog : return java_lang_math_log ;
182 case vmIntrinsics::_dlog10: return java_lang_math_log10;
183 case vmIntrinsics::_dpow : return java_lang_math_pow ;
184 case vmIntrinsics::_dexp : return java_lang_math_exp ;
185 case vmIntrinsics::_fmaD : return java_lang_math_fmaD ;
186 case vmIntrinsics::_fmaF : return java_lang_math_fmaF ;
187
188 case vmIntrinsics::_Reference_get
189 : return java_lang_ref_reference_get;
190 default : break;
191 }
192
193 // Accessor method?
194 if (m->is_getter()) {
195 // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters.
|