1 /*
2 * Copyright (c) 1998, 2005, 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 *
23 */
24
25 // native method calls
26
27 class SignatureHandlerGenerator: public NativeSignatureIterator {
28 private:
29 MacroAssembler* _masm;
30 #ifdef AMD64
31 #ifdef _WIN64
32 unsigned int _num_args;
33 #else
34 unsigned int _num_fp_args;
35 unsigned int _num_int_args;
36 #endif // _WIN64
37 int _stack_offset;
38 #else
39 void move(int from_offset, int to_offset);
40 void box(int from_offset, int to_offset);
41 #endif // AMD64
42
43 void pass_int();
44 void pass_long();
55 #ifdef AMD64
56 #ifdef _WIN64
57 _num_args = (method->is_static() ? 1 : 0);
58 _stack_offset = (Argument::n_int_register_parameters_c+1)* wordSize; // don't overwrite return address
59 #else
60 _num_int_args = (method->is_static() ? 1 : 0);
61 _num_fp_args = 0;
62 _stack_offset = wordSize; // don't overwrite return address
63 #endif // _WIN64
64 #endif // AMD64
65 }
66
67 // Code generation
68 void generate(uint64_t fingerprint);
69
70 // Code generation support
71 static Register from();
72 static Register to();
73 static Register temp();
74 };
|
1 /*
2 * Copyright (c) 1998, 2010, 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 *
23 */
24
25 #ifndef CPU_X86_VM_INTERPRETERRT_X86_HPP
26 #define CPU_X86_VM_INTERPRETERRT_X86_HPP
27
28 #include "memory/allocation.hpp"
29
30 // native method calls
31
32 class SignatureHandlerGenerator: public NativeSignatureIterator {
33 private:
34 MacroAssembler* _masm;
35 #ifdef AMD64
36 #ifdef _WIN64
37 unsigned int _num_args;
38 #else
39 unsigned int _num_fp_args;
40 unsigned int _num_int_args;
41 #endif // _WIN64
42 int _stack_offset;
43 #else
44 void move(int from_offset, int to_offset);
45 void box(int from_offset, int to_offset);
46 #endif // AMD64
47
48 void pass_int();
49 void pass_long();
60 #ifdef AMD64
61 #ifdef _WIN64
62 _num_args = (method->is_static() ? 1 : 0);
63 _stack_offset = (Argument::n_int_register_parameters_c+1)* wordSize; // don't overwrite return address
64 #else
65 _num_int_args = (method->is_static() ? 1 : 0);
66 _num_fp_args = 0;
67 _stack_offset = wordSize; // don't overwrite return address
68 #endif // _WIN64
69 #endif // AMD64
70 }
71
72 // Code generation
73 void generate(uint64_t fingerprint);
74
75 // Code generation support
76 static Register from();
77 static Register to();
78 static Register temp();
79 };
80
81 #endif // CPU_X86_VM_INTERPRETERRT_X86_HPP
|