hotspot/src/cpu/x86/vm/register_definitions_x86.cpp
author kvn
Wed, 24 Oct 2012 14:33:22 -0700
changeset 14132 3c1437abcefd
parent 11427 bf248009cbbe
child 21095 1a04f7b3946e
permissions -rw-r--r--
7184394: add intrinsics to use AES instructions Summary: Use new x86 AES instructions for AESCrypt. Reviewed-by: twisti, kvn, roland Contributed-by: tom.deneau@amd.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
5702
jrose
parents: 5547 5687
diff changeset
     2
 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1546
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1546
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1546
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    25
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    26
#include "asm/assembler.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    27
#include "asm/register.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    28
#include "register_x86.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    29
#ifdef TARGET_ARCH_MODEL_x86_32
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    30
# include "interp_masm_x86_32.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    31
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    32
#ifdef TARGET_ARCH_MODEL_x86_64
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    33
# include "interp_masm_x86_64.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5702
diff changeset
    34
#endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
REGISTER_DEFINITION(Register, noreg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
REGISTER_DEFINITION(Register, rax);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
REGISTER_DEFINITION(Register, rcx);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
REGISTER_DEFINITION(Register, rdx);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
REGISTER_DEFINITION(Register, rbx);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
REGISTER_DEFINITION(Register, rsp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
REGISTER_DEFINITION(Register, rbp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
REGISTER_DEFINITION(Register, rsi);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
REGISTER_DEFINITION(Register, rdi);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
#ifdef AMD64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
REGISTER_DEFINITION(Register, r8);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
REGISTER_DEFINITION(Register, r9);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
REGISTER_DEFINITION(Register, r10);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
REGISTER_DEFINITION(Register, r11);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
REGISTER_DEFINITION(Register, r12);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
REGISTER_DEFINITION(Register, r13);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
REGISTER_DEFINITION(Register, r14);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
REGISTER_DEFINITION(Register, r15);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
#endif // AMD64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
11427
bf248009cbbe 7116452: Add support for AVX instructions
kvn
parents: 7397
diff changeset
    56
REGISTER_DEFINITION(XMMRegister, xnoreg);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
REGISTER_DEFINITION(XMMRegister, xmm0 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
REGISTER_DEFINITION(XMMRegister, xmm1 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
REGISTER_DEFINITION(XMMRegister, xmm2 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
REGISTER_DEFINITION(XMMRegister, xmm3 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
REGISTER_DEFINITION(XMMRegister, xmm4 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
REGISTER_DEFINITION(XMMRegister, xmm5 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
REGISTER_DEFINITION(XMMRegister, xmm6 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
REGISTER_DEFINITION(XMMRegister, xmm7 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
#ifdef AMD64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
REGISTER_DEFINITION(XMMRegister, xmm8);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
REGISTER_DEFINITION(XMMRegister, xmm9);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
REGISTER_DEFINITION(XMMRegister, xmm10);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
REGISTER_DEFINITION(XMMRegister, xmm11);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
REGISTER_DEFINITION(XMMRegister, xmm12);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
REGISTER_DEFINITION(XMMRegister, xmm13);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
REGISTER_DEFINITION(XMMRegister, xmm14);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
REGISTER_DEFINITION(XMMRegister, xmm15);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
REGISTER_DEFINITION(Register, c_rarg0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
REGISTER_DEFINITION(Register, c_rarg1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
REGISTER_DEFINITION(Register, c_rarg2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
REGISTER_DEFINITION(Register, c_rarg3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
REGISTER_DEFINITION(XMMRegister, c_farg0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
REGISTER_DEFINITION(XMMRegister, c_farg1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
REGISTER_DEFINITION(XMMRegister, c_farg2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
REGISTER_DEFINITION(XMMRegister, c_farg3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
// Non windows OS's have a few more argument registers
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
#ifndef _WIN64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
REGISTER_DEFINITION(Register, c_rarg4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
REGISTER_DEFINITION(Register, c_rarg5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
REGISTER_DEFINITION(XMMRegister, c_farg4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
REGISTER_DEFINITION(XMMRegister, c_farg5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
REGISTER_DEFINITION(XMMRegister, c_farg6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
REGISTER_DEFINITION(XMMRegister, c_farg7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
#endif /* _WIN64 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
REGISTER_DEFINITION(Register, j_rarg0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
REGISTER_DEFINITION(Register, j_rarg1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
REGISTER_DEFINITION(Register, j_rarg2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
REGISTER_DEFINITION(Register, j_rarg3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
REGISTER_DEFINITION(Register, j_rarg4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
REGISTER_DEFINITION(Register, j_rarg5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
REGISTER_DEFINITION(XMMRegister, j_farg0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
REGISTER_DEFINITION(XMMRegister, j_farg1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
REGISTER_DEFINITION(XMMRegister, j_farg2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
REGISTER_DEFINITION(XMMRegister, j_farg3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
REGISTER_DEFINITION(XMMRegister, j_farg4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
REGISTER_DEFINITION(XMMRegister, j_farg5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
REGISTER_DEFINITION(XMMRegister, j_farg6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
REGISTER_DEFINITION(XMMRegister, j_farg7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
REGISTER_DEFINITION(Register, rscratch1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
REGISTER_DEFINITION(Register, rscratch2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   115
REGISTER_DEFINITION(Register, r12_heapbase);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
REGISTER_DEFINITION(Register, r15_thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
#endif // AMD64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
11427
bf248009cbbe 7116452: Add support for AVX instructions
kvn
parents: 7397
diff changeset
   119
REGISTER_DEFINITION(MMXRegister, mnoreg );
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
REGISTER_DEFINITION(MMXRegister, mmx0 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
REGISTER_DEFINITION(MMXRegister, mmx1 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
REGISTER_DEFINITION(MMXRegister, mmx2 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
REGISTER_DEFINITION(MMXRegister, mmx3 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
REGISTER_DEFINITION(MMXRegister, mmx4 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
REGISTER_DEFINITION(MMXRegister, mmx5 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
REGISTER_DEFINITION(MMXRegister, mmx6 );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
REGISTER_DEFINITION(MMXRegister, mmx7 );
5687
b862d1f189bd 6930772: JSR 292 needs to support SPARC C1
twisti
parents: 1546
diff changeset
   128
b862d1f189bd 6930772: JSR 292 needs to support SPARC C1
twisti
parents: 1546
diff changeset
   129
// JSR 292
b862d1f189bd 6930772: JSR 292 needs to support SPARC C1
twisti
parents: 1546
diff changeset
   130
REGISTER_DEFINITION(Register, rbp_mh_SP_save);