interpreterRT_x86_64.cpp revision 1426
/*
* Copyright 2003-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
#include "incls/_precompiled.incl"
#include "incls/_interpreterRT_x86_64.cpp.incl"
// Implementation of SignatureHandlerGenerator
#ifdef _WIN64
switch (_num_args) {
case 0:
_num_args++;
break;
case 1:
_num_args++;
break;
case 2:
_num_args++;
break;
default:
break;
}
#else
switch (_num_int_args) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
}
#endif
}
#ifdef _WIN64
switch (_num_args) {
case 0:
_num_args++;
break;
case 1:
_num_args++;
break;
case 2:
_num_args++;
break;
case 3:
default:
break;
}
#else
switch (_num_int_args) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
}
#endif
}
#ifdef _WIN64
} else {
}
#else
} else {
}
#endif
}
#ifdef _WIN64
} else {
}
#else
} else {
}
#endif
}
#ifdef _WIN64
switch (_num_args) {
case 0:
_num_args++;
break;
case 1:
_num_args++;
break;
case 2:
_num_args++;
break;
default:
break;
}
#else
switch (_num_int_args) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
}
#endif
}
// generate code to handle arguments
// return result handler
}
// Implementation of SignatureHandlerLibrary
#ifdef _WIN64
class SlowSignatureHandler
: public NativeSignatureIterator {
private:
unsigned int _num_args;
virtual void pass_int()
{
_num_args++;
} else {
}
}
virtual void pass_long()
{
_num_args++;
} else {
}
}
virtual void pass_object()
{
_num_args++;
} else {
}
}
virtual void pass_float()
{
_num_args++;
} else {
}
}
virtual void pass_double()
{
_num_args++;
} else {
}
}
public:
{
*(int*) _fp_identifiers = 0;
}
};
#else
class SlowSignatureHandler
: public NativeSignatureIterator {
private:
unsigned int _num_int_args;
unsigned int _num_fp_args;
virtual void pass_int()
{
} else {
}
}
virtual void pass_long()
{
} else {
}
}
virtual void pass_object()
{
} else {
}
}
virtual void pass_float()
{
_num_fp_args++;
} else {
}
}
virtual void pass_double()
{
_num_fp_args++;
} else {
}
}
public:
{
*(int*) _fp_identifiers = 0;
_num_fp_args = 0;
}
};
#endif
// handle arguments
// return result handler