comparison src/cpu/sparc/vm/sharedRuntime_sparc.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents d8041d695d19
children 4062efea018b
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
1111 } 1111 }
1112 1112
1113 1113
1114 int SharedRuntime::c_calling_convention(const BasicType *sig_bt, 1114 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
1115 VMRegPair *regs, 1115 VMRegPair *regs,
1116 VMRegPair *regs2,
1117 int total_args_passed) { 1116 int total_args_passed) {
1118 assert(regs2 == NULL, "not needed on sparc");
1119 1117
1120 // Return the number of VMReg stack_slots needed for the args. 1118 // Return the number of VMReg stack_slots needed for the args.
1121 // This value does not include an abi space (like register window 1119 // This value does not include an abi space (like register window
1122 // save area). 1120 // save area).
1123 1121
2116 // Now figure out where the args must be stored and how much stack space 2114 // Now figure out where the args must be stored and how much stack space
2117 // they require (neglecting out_preserve_stack_slots but space for storing 2115 // they require (neglecting out_preserve_stack_slots but space for storing
2118 // the 1st six register arguments). It's weird see int_stk_helper. 2116 // the 1st six register arguments). It's weird see int_stk_helper.
2119 // 2117 //
2120 int out_arg_slots; 2118 int out_arg_slots;
2121 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args); 2119 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args);
2122 2120
2123 if (is_critical_native) { 2121 if (is_critical_native) {
2124 // Critical natives may have to call out so they need a save area 2122 // Critical natives may have to call out so they need a save area
2125 // for register arguments. 2123 // for register arguments.
2126 int double_slots = 0; 2124 int double_slots = 0;
2863 // Now figure out where the args must be stored and how much stack space 2861 // Now figure out where the args must be stored and how much stack space
2864 // they require (neglecting out_preserve_stack_slots but space for storing 2862 // they require (neglecting out_preserve_stack_slots but space for storing
2865 // the 1st six register arguments). It's weird see int_stk_helper. 2863 // the 1st six register arguments). It's weird see int_stk_helper.
2866 // 2864 //
2867 int out_arg_slots; 2865 int out_arg_slots;
2868 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args); 2866 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args);
2869 2867
2870 // Calculate the total number of stack slots we will need. 2868 // Calculate the total number of stack slots we will need.
2871 2869
2872 // First count the abi requirement plus all of the outgoing args 2870 // First count the abi requirement plus all of the outgoing args
2873 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots; 2871 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots;