fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This code is free software; you can redistribute it and/or modify it
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * under the terms of the GNU General Public License version 2 only, as
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * published by the Free Software Foundation.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This code is distributed in the hope that it will be useful, but WITHOUT
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * version 2 for more details (a copy is included in the LICENSE file that
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * accompanied this code).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You should have received a copy of the GNU General Public License version
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 2 along with this work; if not, write to the Free Software Foundation,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or visit www.oracle.com if you need additional information or have any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * questions.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "precompiled.hpp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "asm/assembler.hpp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "asm/register.hpp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "register_x86.hpp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef TARGET_ARCH_MODEL_x86_32
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# include "interp_masm_x86_32.hpp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef TARGET_ARCH_MODEL_x86_64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# include "interp_masm_x86_64.hpp"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, noreg);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rax);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rcx);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rdx);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rbx);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rsp);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rbp);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rsi);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rdi);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef AMD64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r8);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r9);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r10);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r11);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r12);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r13);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r14);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r15);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif // AMD64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xnoreg);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm0 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm1 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm2 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm3 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm4 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm5 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm6 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm7 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef AMD64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm8);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm9);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm10);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm11);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm12);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm13);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm14);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, xmm15);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, c_rarg0);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, c_rarg1);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, c_rarg2);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, c_rarg3);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg0);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg1);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg2);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg3);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte// Non windows OS's have a few more argument registers
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _WIN64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, c_rarg4);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, c_rarg5);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg4);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg5);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg6);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, c_farg7);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _WIN64 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, j_rarg0);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, j_rarg1);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, j_rarg2);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, j_rarg3);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, j_rarg4);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, j_rarg5);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg0);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg1);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg2);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg3);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg4);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg5);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg6);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(XMMRegister, j_farg7);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rscratch1);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rscratch2);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r12_heapbase);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, r15_thread);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif // AMD64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mnoreg );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx0 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx1 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx2 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx3 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx4 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx5 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx6 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(MMXRegister, mmx7 );
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte// JSR 292
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteREGISTER_DEFINITION(Register, rbp_mh_SP_save);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte