0N/A/*
1879N/A * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#ifndef CPU_X86_VM_INTERPRETERRT_X86_HPP
1879N/A#define CPU_X86_VM_INTERPRETERRT_X86_HPP
1879N/A
1879N/A#include "memory/allocation.hpp"
1879N/A
0N/A// native method calls
0N/A
0N/Aclass SignatureHandlerGenerator: public NativeSignatureIterator {
0N/A private:
0N/A MacroAssembler* _masm;
0N/A#ifdef AMD64
0N/A#ifdef _WIN64
0N/A unsigned int _num_args;
0N/A#else
0N/A unsigned int _num_fp_args;
0N/A unsigned int _num_int_args;
0N/A#endif // _WIN64
0N/A int _stack_offset;
0N/A#else
0N/A void move(int from_offset, int to_offset);
0N/A void box(int from_offset, int to_offset);
0N/A#endif // AMD64
0N/A
0N/A void pass_int();
0N/A void pass_long();
0N/A void pass_float();
0N/A#ifdef AMD64
0N/A void pass_double();
0N/A#endif // AMD64
0N/A void pass_object();
0N/A
0N/A public:
0N/A // Creation
0N/A SignatureHandlerGenerator(methodHandle method, CodeBuffer* buffer) : NativeSignatureIterator(method) {
0N/A _masm = new MacroAssembler(buffer);
0N/A#ifdef AMD64
0N/A#ifdef _WIN64
0N/A _num_args = (method->is_static() ? 1 : 0);
0N/A _stack_offset = (Argument::n_int_register_parameters_c+1)* wordSize; // don't overwrite return address
0N/A#else
0N/A _num_int_args = (method->is_static() ? 1 : 0);
0N/A _num_fp_args = 0;
0N/A _stack_offset = wordSize; // don't overwrite return address
0N/A#endif // _WIN64
0N/A#endif // AMD64
0N/A }
0N/A
0N/A // Code generation
0N/A void generate(uint64_t fingerprint);
0N/A
0N/A // Code generation support
0N/A static Register from();
0N/A static Register to();
0N/A static Register temp();
0N/A};
1879N/A
1879N/A#endif // CPU_X86_VM_INTERPRETERRT_X86_HPP