src/cpu/x86/vm/register_definitions_x86.cpp

Thu, 08 Sep 2011 10:12:25 +0200

author
bdelsart
date
Thu, 08 Sep 2011 10:12:25 +0200
changeset 3130
5432047c7db7
parent 2314
f95d63e2154a
child 3388
127b3692c168
permissions
-rw-r--r--

7087445: Improve platform independence of JSR292 shared code
Summary: changes necessary for some JSR292 ports
Reviewed-by: jrose, dholmes

     1 /*
     2  * Copyright (c) 2002, 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  */
    25 #include "precompiled.hpp"
    26 #include "asm/assembler.hpp"
    27 #include "asm/register.hpp"
    28 #include "register_x86.hpp"
    29 #ifdef TARGET_ARCH_MODEL_x86_32
    30 # include "interp_masm_x86_32.hpp"
    31 #endif
    32 #ifdef TARGET_ARCH_MODEL_x86_64
    33 # include "interp_masm_x86_64.hpp"
    34 #endif
    36 REGISTER_DEFINITION(Register, noreg);
    37 REGISTER_DEFINITION(Register, rax);
    38 REGISTER_DEFINITION(Register, rcx);
    39 REGISTER_DEFINITION(Register, rdx);
    40 REGISTER_DEFINITION(Register, rbx);
    41 REGISTER_DEFINITION(Register, rsp);
    42 REGISTER_DEFINITION(Register, rbp);
    43 REGISTER_DEFINITION(Register, rsi);
    44 REGISTER_DEFINITION(Register, rdi);
    45 #ifdef AMD64
    46 REGISTER_DEFINITION(Register, r8);
    47 REGISTER_DEFINITION(Register, r9);
    48 REGISTER_DEFINITION(Register, r10);
    49 REGISTER_DEFINITION(Register, r11);
    50 REGISTER_DEFINITION(Register, r12);
    51 REGISTER_DEFINITION(Register, r13);
    52 REGISTER_DEFINITION(Register, r14);
    53 REGISTER_DEFINITION(Register, r15);
    54 #endif // AMD64
    56 REGISTER_DEFINITION(XMMRegister, xmm0 );
    57 REGISTER_DEFINITION(XMMRegister, xmm1 );
    58 REGISTER_DEFINITION(XMMRegister, xmm2 );
    59 REGISTER_DEFINITION(XMMRegister, xmm3 );
    60 REGISTER_DEFINITION(XMMRegister, xmm4 );
    61 REGISTER_DEFINITION(XMMRegister, xmm5 );
    62 REGISTER_DEFINITION(XMMRegister, xmm6 );
    63 REGISTER_DEFINITION(XMMRegister, xmm7 );
    64 #ifdef AMD64
    65 REGISTER_DEFINITION(XMMRegister, xmm8);
    66 REGISTER_DEFINITION(XMMRegister, xmm9);
    67 REGISTER_DEFINITION(XMMRegister, xmm10);
    68 REGISTER_DEFINITION(XMMRegister, xmm11);
    69 REGISTER_DEFINITION(XMMRegister, xmm12);
    70 REGISTER_DEFINITION(XMMRegister, xmm13);
    71 REGISTER_DEFINITION(XMMRegister, xmm14);
    72 REGISTER_DEFINITION(XMMRegister, xmm15);
    74 REGISTER_DEFINITION(Register, c_rarg0);
    75 REGISTER_DEFINITION(Register, c_rarg1);
    76 REGISTER_DEFINITION(Register, c_rarg2);
    77 REGISTER_DEFINITION(Register, c_rarg3);
    79 REGISTER_DEFINITION(XMMRegister, c_farg0);
    80 REGISTER_DEFINITION(XMMRegister, c_farg1);
    81 REGISTER_DEFINITION(XMMRegister, c_farg2);
    82 REGISTER_DEFINITION(XMMRegister, c_farg3);
    84 // Non windows OS's have a few more argument registers
    85 #ifndef _WIN64
    86 REGISTER_DEFINITION(Register, c_rarg4);
    87 REGISTER_DEFINITION(Register, c_rarg5);
    89 REGISTER_DEFINITION(XMMRegister, c_farg4);
    90 REGISTER_DEFINITION(XMMRegister, c_farg5);
    91 REGISTER_DEFINITION(XMMRegister, c_farg6);
    92 REGISTER_DEFINITION(XMMRegister, c_farg7);
    93 #endif /* _WIN64 */
    95 REGISTER_DEFINITION(Register, j_rarg0);
    96 REGISTER_DEFINITION(Register, j_rarg1);
    97 REGISTER_DEFINITION(Register, j_rarg2);
    98 REGISTER_DEFINITION(Register, j_rarg3);
    99 REGISTER_DEFINITION(Register, j_rarg4);
   100 REGISTER_DEFINITION(Register, j_rarg5);
   102 REGISTER_DEFINITION(XMMRegister, j_farg0);
   103 REGISTER_DEFINITION(XMMRegister, j_farg1);
   104 REGISTER_DEFINITION(XMMRegister, j_farg2);
   105 REGISTER_DEFINITION(XMMRegister, j_farg3);
   106 REGISTER_DEFINITION(XMMRegister, j_farg4);
   107 REGISTER_DEFINITION(XMMRegister, j_farg5);
   108 REGISTER_DEFINITION(XMMRegister, j_farg6);
   109 REGISTER_DEFINITION(XMMRegister, j_farg7);
   111 REGISTER_DEFINITION(Register, rscratch1);
   112 REGISTER_DEFINITION(Register, rscratch2);
   114 REGISTER_DEFINITION(Register, r12_heapbase);
   115 REGISTER_DEFINITION(Register, r15_thread);
   116 #endif // AMD64
   118 REGISTER_DEFINITION(MMXRegister, mmx0 );
   119 REGISTER_DEFINITION(MMXRegister, mmx1 );
   120 REGISTER_DEFINITION(MMXRegister, mmx2 );
   121 REGISTER_DEFINITION(MMXRegister, mmx3 );
   122 REGISTER_DEFINITION(MMXRegister, mmx4 );
   123 REGISTER_DEFINITION(MMXRegister, mmx5 );
   124 REGISTER_DEFINITION(MMXRegister, mmx6 );
   125 REGISTER_DEFINITION(MMXRegister, mmx7 );
   127 // JSR 292
   128 REGISTER_DEFINITION(Register, rbp_mh_SP_save);

mercurial