Mercurial > hg > truffle
comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | 7ad529321294 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. |
901 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); | 901 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); |
902 } | 902 } |
903 | 903 |
904 int SharedRuntime::c_calling_convention(const BasicType *sig_bt, | 904 int SharedRuntime::c_calling_convention(const BasicType *sig_bt, |
905 VMRegPair *regs, | 905 VMRegPair *regs, |
906 VMRegPair *regs2, | |
906 int total_args_passed) { | 907 int total_args_passed) { |
908 assert(regs2 == NULL, "not needed on x86"); | |
907 // We return the amount of VMRegImpl stack slots we need to reserve for all | 909 // We return the amount of VMRegImpl stack slots we need to reserve for all |
908 // the arguments NOT counting out_preserve_stack_slots. | 910 // the arguments NOT counting out_preserve_stack_slots. |
909 | 911 |
910 // NOTE: These arrays will have to change when c1 is ported | 912 // NOTE: These arrays will have to change when c1 is ported |
911 #ifdef _WIN64 | 913 #ifdef _WIN64 |
1893 } | 1895 } |
1894 | 1896 |
1895 // Now figure out where the args must be stored and how much stack space | 1897 // Now figure out where the args must be stored and how much stack space |
1896 // they require. | 1898 // they require. |
1897 int out_arg_slots; | 1899 int out_arg_slots; |
1898 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args); | 1900 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args); |
1899 | 1901 |
1900 // Compute framesize for the wrapper. We need to handlize all oops in | 1902 // Compute framesize for the wrapper. We need to handlize all oops in |
1901 // incoming registers | 1903 // incoming registers |
1902 | 1904 |
1903 // Calculate the total number of stack slots we will need. | 1905 // Calculate the total number of stack slots we will need. |
2797 // Now figure out where the args must be stored and how much stack space | 2799 // Now figure out where the args must be stored and how much stack space |
2798 // they require (neglecting out_preserve_stack_slots but space for storing | 2800 // they require (neglecting out_preserve_stack_slots but space for storing |
2799 // the 1st six register arguments). It's weird see int_stk_helper. | 2801 // the 1st six register arguments). It's weird see int_stk_helper. |
2800 | 2802 |
2801 int out_arg_slots; | 2803 int out_arg_slots; |
2802 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args); | 2804 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args); |
2803 | 2805 |
2804 // Calculate the total number of stack slots we will need. | 2806 // Calculate the total number of stack slots we will need. |
2805 | 2807 |
2806 // First count the abi requirement plus all of the outgoing args | 2808 // First count the abi requirement plus all of the outgoing args |
2807 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots; | 2809 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots; |