1 /*
2 * Copyright (c) 1998, 2013, 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 *
4160 _frame->_return_addr);
4161 }
4162 // Java Stack Slot Preservation
4163 fprintf(fp_cpp,"uint Compile::in_preserve_stack_slots() ");
4164 fprintf(fp_cpp,"{ return %s; }\n\n", _frame->_in_preserve_slots);
4165 // Top Of Stack Slot Preservation, for both Java and C
4166 fprintf(fp_cpp,"uint Compile::out_preserve_stack_slots() ");
4167 fprintf(fp_cpp,"{ return SharedRuntime::out_preserve_stack_slots(); }\n\n");
4168 // varargs C out slots killed
4169 fprintf(fp_cpp,"uint Compile::varargs_C_out_slots_killed() const ");
4170 fprintf(fp_cpp,"{ return %s; }\n\n", _frame->_varargs_C_out_slots_killed);
4171 // Java Argument Position
4172 fprintf(fp_cpp,"void Matcher::calling_convention(BasicType *sig_bt, VMRegPair *regs, uint length, bool is_outgoing) {\n");
4173 fprintf(fp_cpp,"%s\n", _frame->_calling_convention);
4174 fprintf(fp_cpp,"}\n\n");
4175 // Native Argument Position
4176 fprintf(fp_cpp,"void Matcher::c_calling_convention(BasicType *sig_bt, VMRegPair *regs, uint length) {\n");
4177 fprintf(fp_cpp,"%s\n", _frame->_c_calling_convention);
4178 fprintf(fp_cpp,"}\n\n");
4179 // Java Return Value Location
4180 fprintf(fp_cpp,"OptoRegPair Matcher::return_value(int ideal_reg, bool is_outgoing) {\n");
4181 fprintf(fp_cpp,"%s\n", _frame->_return_value);
4182 fprintf(fp_cpp,"}\n\n");
4183 // Native Return Value Location
4184 fprintf(fp_cpp,"OptoRegPair Matcher::c_return_value(int ideal_reg, bool is_outgoing) {\n");
4185 fprintf(fp_cpp,"%s\n", _frame->_c_return_value);
4186 fprintf(fp_cpp,"}\n\n");
4187
4188 // Inline Cache Register, mask definition, and encoding
4189 fprintf(fp_cpp,"OptoReg::Name Matcher::inline_cache_reg() {");
4190 fprintf(fp_cpp," return OptoReg::Name(%s_num); }\n\n",
4191 _frame->_inline_cache_reg);
4192 fprintf(fp_cpp,"int Matcher::inline_cache_reg_encode() {");
4193 fprintf(fp_cpp," return _regEncode[inline_cache_reg()]; }\n\n");
4194
4195 // Interpreter's Method Oop Register, mask definition, and encoding
4196 fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_method_oop_reg() {");
4197 fprintf(fp_cpp," return OptoReg::Name(%s_num); }\n\n",
4198 _frame->_interpreter_method_oop_reg);
4199 fprintf(fp_cpp,"int Matcher::interpreter_method_oop_reg_encode() {");
4200 fprintf(fp_cpp," return _regEncode[interpreter_method_oop_reg()]; }\n\n");
4201
4202 // Interpreter's Frame Pointer Register, mask definition, and encoding
4203 fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_frame_pointer_reg() {");
4204 if (_frame->_interpreter_frame_pointer_reg == NULL)
|
1 /*
2 * Copyright (c) 1998, 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 *
4160 _frame->_return_addr);
4161 }
4162 // Java Stack Slot Preservation
4163 fprintf(fp_cpp,"uint Compile::in_preserve_stack_slots() ");
4164 fprintf(fp_cpp,"{ return %s; }\n\n", _frame->_in_preserve_slots);
4165 // Top Of Stack Slot Preservation, for both Java and C
4166 fprintf(fp_cpp,"uint Compile::out_preserve_stack_slots() ");
4167 fprintf(fp_cpp,"{ return SharedRuntime::out_preserve_stack_slots(); }\n\n");
4168 // varargs C out slots killed
4169 fprintf(fp_cpp,"uint Compile::varargs_C_out_slots_killed() const ");
4170 fprintf(fp_cpp,"{ return %s; }\n\n", _frame->_varargs_C_out_slots_killed);
4171 // Java Argument Position
4172 fprintf(fp_cpp,"void Matcher::calling_convention(BasicType *sig_bt, VMRegPair *regs, uint length, bool is_outgoing) {\n");
4173 fprintf(fp_cpp,"%s\n", _frame->_calling_convention);
4174 fprintf(fp_cpp,"}\n\n");
4175 // Native Argument Position
4176 fprintf(fp_cpp,"void Matcher::c_calling_convention(BasicType *sig_bt, VMRegPair *regs, uint length) {\n");
4177 fprintf(fp_cpp,"%s\n", _frame->_c_calling_convention);
4178 fprintf(fp_cpp,"}\n\n");
4179 // Java Return Value Location
4180 fprintf(fp_cpp,"OptoRegPair Matcher::return_value(uint ideal_reg, bool is_outgoing) {\n");
4181 fprintf(fp_cpp,"%s\n", _frame->_return_value);
4182 fprintf(fp_cpp,"}\n\n");
4183 // Native Return Value Location
4184 fprintf(fp_cpp,"OptoRegPair Matcher::c_return_value(uint ideal_reg, bool is_outgoing) {\n");
4185 fprintf(fp_cpp,"%s\n", _frame->_c_return_value);
4186 fprintf(fp_cpp,"}\n\n");
4187
4188 // Inline Cache Register, mask definition, and encoding
4189 fprintf(fp_cpp,"OptoReg::Name Matcher::inline_cache_reg() {");
4190 fprintf(fp_cpp," return OptoReg::Name(%s_num); }\n\n",
4191 _frame->_inline_cache_reg);
4192 fprintf(fp_cpp,"int Matcher::inline_cache_reg_encode() {");
4193 fprintf(fp_cpp," return _regEncode[inline_cache_reg()]; }\n\n");
4194
4195 // Interpreter's Method Oop Register, mask definition, and encoding
4196 fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_method_oop_reg() {");
4197 fprintf(fp_cpp," return OptoReg::Name(%s_num); }\n\n",
4198 _frame->_interpreter_method_oop_reg);
4199 fprintf(fp_cpp,"int Matcher::interpreter_method_oop_reg_encode() {");
4200 fprintf(fp_cpp," return _regEncode[interpreter_method_oop_reg()]; }\n\n");
4201
4202 // Interpreter's Frame Pointer Register, mask definition, and encoding
4203 fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_frame_pointer_reg() {");
4204 if (_frame->_interpreter_frame_pointer_reg == NULL)
|