Mercurial > hg > truffle
comparison src/cpu/sparc/vm/sharedRuntime_sparc.cpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | f6c04e69cf75 abec000618bf |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14141:f97c5ec83832 | 14518:d8041d695d19 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 2013, 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, | |
1116 int total_args_passed) { | 1117 int total_args_passed) { |
1118 assert(regs2 == NULL, "not needed on sparc"); | |
1117 | 1119 |
1118 // Return the number of VMReg stack_slots needed for the args. | 1120 // Return the number of VMReg stack_slots needed for the args. |
1119 // This value does not include an abi space (like register window | 1121 // This value does not include an abi space (like register window |
1120 // save area). | 1122 // save area). |
1121 | 1123 |
2114 // Now figure out where the args must be stored and how much stack space | 2116 // Now figure out where the args must be stored and how much stack space |
2115 // they require (neglecting out_preserve_stack_slots but space for storing | 2117 // they require (neglecting out_preserve_stack_slots but space for storing |
2116 // the 1st six register arguments). It's weird see int_stk_helper. | 2118 // the 1st six register arguments). It's weird see int_stk_helper. |
2117 // | 2119 // |
2118 int out_arg_slots; | 2120 int out_arg_slots; |
2119 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args); | 2121 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args); |
2120 | 2122 |
2121 if (is_critical_native) { | 2123 if (is_critical_native) { |
2122 // Critical natives may have to call out so they need a save area | 2124 // Critical natives may have to call out so they need a save area |
2123 // for register arguments. | 2125 // for register arguments. |
2124 int double_slots = 0; | 2126 int double_slots = 0; |
2861 // Now figure out where the args must be stored and how much stack space | 2863 // Now figure out where the args must be stored and how much stack space |
2862 // they require (neglecting out_preserve_stack_slots but space for storing | 2864 // they require (neglecting out_preserve_stack_slots but space for storing |
2863 // the 1st six register arguments). It's weird see int_stk_helper. | 2865 // the 1st six register arguments). It's weird see int_stk_helper. |
2864 // | 2866 // |
2865 int out_arg_slots; | 2867 int out_arg_slots; |
2866 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args); | 2868 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args); |
2867 | 2869 |
2868 // Calculate the total number of stack slots we will need. | 2870 // Calculate the total number of stack slots we will need. |
2869 | 2871 |
2870 // First count the abi requirement plus all of the outgoing args | 2872 // First count the abi requirement plus all of the outgoing args |
2871 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots; | 2873 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots; |