src/hotspot/cpu/sparc/assembler_sparc.hpp
author coleenp
Thu, 10 Jan 2019 15:13:51 -0500
changeset 53244 9807daeb47c4
parent 50306 ed7605e8675f
child 54960 e46fe26d7f77
permissions -rw-r--r--
8216167: Update include guards to reflect correct directories Summary: Use script and some manual fixup to fix directores names in include guards. Reviewed-by: lfoltan, eosterlund, kbarrett
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50306
diff changeset
     2
 * Copyright (c) 1997, 2019, 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: 5542
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5542
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: 5542
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
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50306
diff changeset
    25
#ifndef CPU_SPARC_ASSEMBLER_SPARC_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50306
diff changeset
    26
#define CPU_SPARC_ASSEMBLER_SPARC_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 7112
diff changeset
    27
14631
526804361522 8003250: SPARC: move MacroAssembler into separate file
twisti
parents: 13969
diff changeset
    28
#include "asm/register.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
// The SPARC Assembler: Pure assembler doing NO optimizations on the instruction
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
    31
// level; i.e., what you write is what you get. The Assembler is generating code
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
    32
// into a CodeBuffer.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
    34
class Assembler : public AbstractAssembler {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
  friend class AbstractAssembler;
2571
d602ad6538bd 6822110: Add AddressLiteral class on SPARC
twisti
parents: 2534
diff changeset
    36
  friend class AddressLiteral;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  // code patchers need various routines like inv_wdisp()
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  friend class NativeInstruction;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  friend class NativeGeneralJump;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  friend class Relocation;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  friend class Label;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  // op carries format info; see page 62 & 267
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  enum ops {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
    call_op   = 1, // fmt 1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
    branch_op = 0, // also sethi (fmt2)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
    arith_op  = 2, // fmt 3, arith & misc
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
    ldst_op   = 3  // fmt 3, load/store
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  enum op2s {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
    bpr_op2   = 3,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
    fb_op2    = 6,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    fbp_op2   = 5,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
    br_op2    = 2,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
    bp_op2    = 1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    sethi_op2 = 4
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  enum op3s {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    // selected op3s
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    add_op3      = 0x00,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
    and_op3      = 0x01,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    or_op3       = 0x02,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
    xor_op3      = 0x03,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
    sub_op3      = 0x04,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
    andn_op3     = 0x05,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
    orn_op3      = 0x06,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
    xnor_op3     = 0x07,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
    addc_op3     = 0x08,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
    mulx_op3     = 0x09,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    umul_op3     = 0x0a,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
    smul_op3     = 0x0b,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    subc_op3     = 0x0c,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
    udivx_op3    = 0x0d,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
    udiv_op3     = 0x0e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    sdiv_op3     = 0x0f,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
    addcc_op3    = 0x10,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
    andcc_op3    = 0x11,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
    orcc_op3     = 0x12,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    xorcc_op3    = 0x13,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    subcc_op3    = 0x14,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
    andncc_op3   = 0x15,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
    orncc_op3    = 0x16,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
    xnorcc_op3   = 0x17,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
    addccc_op3   = 0x18,
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
    91
    aes4_op3     = 0x19,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    umulcc_op3   = 0x1a,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    smulcc_op3   = 0x1b,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
    subccc_op3   = 0x1c,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
    udivcc_op3   = 0x1e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
    sdivcc_op3   = 0x1f,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
    taddcc_op3   = 0x20,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
    tsubcc_op3   = 0x21,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
    taddcctv_op3 = 0x22,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
    tsubcctv_op3 = 0x23,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
    mulscc_op3   = 0x24,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
    sll_op3      = 0x25,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    sllx_op3     = 0x25,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    srl_op3      = 0x26,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    srlx_op3     = 0x26,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    sra_op3      = 0x27,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
    srax_op3     = 0x27,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
    rdreg_op3    = 0x28,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    membar_op3   = 0x28,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    flushw_op3   = 0x2b,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    movcc_op3    = 0x2c,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    sdivx_op3    = 0x2d,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
    popc_op3     = 0x2e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    movr_op3     = 0x2f,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
    sir_op3      = 0x30,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
    wrreg_op3    = 0x30,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
    saved_op3    = 0x31,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
    fpop1_op3    = 0x34,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
    fpop2_op3    = 0x35,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
    impdep1_op3  = 0x36,
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   125
    addx_op3     = 0x36,
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   126
    aes3_op3     = 0x36,
24953
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
   127
    sha_op3      = 0x36,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33105
diff changeset
   128
    bmask_op3    = 0x36,
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33105
diff changeset
   129
    bshuffle_op3   = 0x36,
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   130
    alignaddr_op3  = 0x36,
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   131
    faligndata_op3 = 0x36,
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   132
    flog3_op3    = 0x36,
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   133
    edge_op3     = 0x36,
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   134
    fzero_op3    = 0x36,
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   135
    fsrc_op3     = 0x36,
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   136
    fnot_op3     = 0x36,
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   137
    mpmul_op3    = 0x36,
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   138
    umulx_op3    = 0x36,
31404
63e8fcd70bfc 8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents: 24953
diff changeset
   139
    xmulx_op3    = 0x36,
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   140
    crc32c_op3   = 0x36,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    impdep2_op3  = 0x37,
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   142
    stpartialf_op3 = 0x37,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
    jmpl_op3     = 0x38,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
    rett_op3     = 0x39,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
    trap_op3     = 0x3a,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
    flush_op3    = 0x3b,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
    save_op3     = 0x3c,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
    restore_op3  = 0x3d,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
    done_op3     = 0x3e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
    retry_op3    = 0x3e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    lduw_op3     = 0x00,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
    ldub_op3     = 0x01,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
    lduh_op3     = 0x02,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
    ldd_op3      = 0x03,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
    stw_op3      = 0x04,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
    stb_op3      = 0x05,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
    sth_op3      = 0x06,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
    std_op3      = 0x07,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
    ldsw_op3     = 0x08,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
    ldsb_op3     = 0x09,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
    ldsh_op3     = 0x0a,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
    ldx_op3      = 0x0b,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
    stx_op3      = 0x0e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
    swap_op3     = 0x0f,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
    stwa_op3     = 0x14,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
    stxa_op3     = 0x1e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
    ldf_op3      = 0x20,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    ldfsr_op3    = 0x21,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    ldqf_op3     = 0x22,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    lddf_op3     = 0x23,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
    stf_op3      = 0x24,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
    stfsr_op3    = 0x25,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
    stqf_op3     = 0x26,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
    stdf_op3     = 0x27,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
    prefetch_op3 = 0x2d,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
    casa_op3     = 0x3c,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
    casxa_op3    = 0x3e,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
10027
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
   185
    mftoi_op3    = 0x36,
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
   186
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
    alt_bit_op3  = 0x10,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
     cc_bit_op3  = 0x10
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  enum opfs {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
    // selected opfs
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   193
    edge8n_opf         = 0x01,
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   194
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   195
    fmovs_opf          = 0x01,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   196
    fmovd_opf          = 0x02,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   198
    fnegs_opf          = 0x05,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   199
    fnegd_opf          = 0x06,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   201
    addxc_opf          = 0x11,
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   202
    addxccc_opf        = 0x13,
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   203
    umulxhi_opf        = 0x16,
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   204
    alignaddr_opf      = 0x18,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33105
diff changeset
   205
    bmask_opf          = 0x19,
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   206
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   207
    fadds_opf          = 0x41,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   208
    faddd_opf          = 0x42,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   209
    fsubs_opf          = 0x45,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   210
    fsubd_opf          = 0x46,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   212
    faligndata_opf     = 0x48,
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   213
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   214
    fmuls_opf          = 0x49,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   215
    fmuld_opf          = 0x4a,
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33105
diff changeset
   216
    bshuffle_opf       = 0x4c,
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   217
    fdivs_opf          = 0x4d,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   218
    fdivd_opf          = 0x4e,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   219
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   220
    fcmps_opf          = 0x51,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   221
    fcmpd_opf          = 0x52,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   223
    fstox_opf          = 0x81,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   224
    fdtox_opf          = 0x82,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   225
    fxtos_opf          = 0x84,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   226
    fxtod_opf          = 0x88,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   227
    fitos_opf          = 0xc4,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   228
    fdtos_opf          = 0xc6,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   229
    fitod_opf          = 0xc8,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   230
    fstod_opf          = 0xc9,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   231
    fstoi_opf          = 0xd1,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   232
    fdtoi_opf          = 0xd2,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   234
    mdtox_opf          = 0x110,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   235
    mstouw_opf         = 0x111,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   236
    mstosw_opf         = 0x113,
31404
63e8fcd70bfc 8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents: 24953
diff changeset
   237
    xmulx_opf          = 0x115,
63e8fcd70bfc 8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents: 24953
diff changeset
   238
    xmulxhi_opf        = 0x116,
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   239
    mxtod_opf          = 0x118,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   240
    mwtos_opf          = 0x119,
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   241
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   242
    aes_kexpand0_opf   = 0x130,
24953
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
   243
    aes_kexpand2_opf   = 0x131,
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
   244
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
   245
    sha1_opf           = 0x141,
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
   246
    sha256_opf         = 0x142,
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   247
    sha512_opf         = 0x143,
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   248
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   249
    crc32c_opf         = 0x147,
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   250
    mpmul_opf          = 0x148
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   251
  };
10027
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
   252
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   253
  enum op5s {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   254
    aes_eround01_op5   = 0x00,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   255
    aes_eround23_op5   = 0x01,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   256
    aes_dround01_op5   = 0x02,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   257
    aes_dround23_op5   = 0x03,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   258
    aes_eround01_l_op5 = 0x04,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   259
    aes_eround23_l_op5 = 0x05,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   260
    aes_dround01_l_op5 = 0x06,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   261
    aes_dround23_l_op5 = 0x07,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   262
    aes_kexpand1_op5   = 0x08
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   265
  enum RCondition { rc_z = 1, rc_lez = 2, rc_lz = 3, rc_nz = 5, rc_gz = 6, rc_gez = 7, rc_last = rc_gez };
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
  enum Condition {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
     // for FBfcc & FBPfcc instruction
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
    f_never                     = 0,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
    f_notEqual                  = 1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
    f_notZero                   = 1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
    f_lessOrGreater             = 2,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
    f_unorderedOrLess           = 3,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
    f_less                      = 4,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
    f_unorderedOrGreater        = 5,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
    f_greater                   = 6,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
    f_unordered                 = 7,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
    f_always                    = 8,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
    f_equal                     = 9,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
    f_zero                      = 9,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
    f_unorderedOrEqual          = 10,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
    f_greaterOrEqual            = 11,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
    f_unorderedOrGreaterOrEqual = 12,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
    f_lessOrEqual               = 13,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
    f_unorderedOrLessOrEqual    = 14,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
    f_ordered                   = 15,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
    // for integers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   290
    never                = 0,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   291
    equal                = 1,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   292
    zero                 = 1,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   293
    lessEqual            = 2,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   294
    less                 = 3,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   295
    lessEqualUnsigned    = 4,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   296
    lessUnsigned         = 5,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   297
    carrySet             = 5,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   298
    negative             = 6,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   299
    overflowSet          = 7,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   300
    always               = 8,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   301
    notEqual             = 9,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   302
    notZero              = 9,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   303
    greater              = 10,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   304
    greaterEqual         = 11,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   305
    greaterUnsigned      = 12,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   306
    greaterEqualUnsigned = 13,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   307
    carryClear           = 13,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   308
    positive             = 14,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   309
    overflowClear        = 15
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
  enum CC {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
    // ptr_cc is the correct condition code for a pointer or intptr_t:
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   314
    icc  = 0, xcc  = 2, ptr_cc = xcc,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   315
    fcc0 = 0, fcc1 = 1, fcc2 = 2, fcc3 = 3
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
  enum PrefetchFcn {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   319
    severalReads = 0, oneRead = 1, severalWritesAndPossiblyReads = 2, oneWrite = 3, page = 4
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
  // Helper functions for groups of instructions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  enum Predict { pt = 1, pn = 0 }; // pt = predict taken
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
  enum Membar_mask_bits { // page 184, v9
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
    StoreStore = 1 << 3,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
    LoadStore  = 1 << 2,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
    StoreLoad  = 1 << 1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
    LoadLoad   = 1 << 0,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
    Sync       = 1 << 6,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
    MemIssue   = 1 << 5,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
    Lookaside  = 1 << 4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
7892
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   338
  static bool is_in_wdisp_range(address a, address b, int nbits) {
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   339
    intptr_t d = intptr_t(b) - intptr_t(a);
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   340
    return is_simm(d, nbits + 2);
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   341
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   343
  address target_distance(Label &L) {
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   344
    // Assembler::target(L) should be called only when
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   345
    // a branch instruction is emitted since non-bound
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   346
    // labels record current pc() as a branch address.
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   347
    if (L.is_bound()) return target(L);
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   348
    // Return current address for non-bound labels.
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   349
    return pc();
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   350
  }
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   351
6774
a224d6a24120 6991512: G1 barriers fail with 64bit C1
iveresov
parents: 6772
diff changeset
   352
  // test if label is in simm16 range in words (wdisp16).
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   353
  bool is_in_wdisp16_range(Label &L) {
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   354
    return is_in_wdisp_range(target_distance(L), pc(), 16);
7892
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   355
  }
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   356
  // test if the distance between two addresses fits in simm30 range in words
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   357
  static bool is_in_wdisp30_range(address a, address b) {
ff4948f95c49 7011627: C1: call_RT must support targets that don't fit in wdisp30
iveresov
parents: 7700
diff changeset
   358
    return is_in_wdisp_range(a, b, 30);
6774
a224d6a24120 6991512: G1 barriers fail with 64bit C1
iveresov
parents: 6772
diff changeset
   359
  }
a224d6a24120 6991512: G1 barriers fail with 64bit C1
iveresov
parents: 6772
diff changeset
   360
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
  enum ASIs { // page 72, v9
10501
5bce84af0883 7059037: Use BIS for zeroing on T4
kvn
parents: 10267
diff changeset
   362
    ASI_PRIMARY            = 0x80,
5bce84af0883 7059037: Use BIS for zeroing on T4
kvn
parents: 10267
diff changeset
   363
    ASI_PRIMARY_NOFAULT    = 0x82,
5bce84af0883 7059037: Use BIS for zeroing on T4
kvn
parents: 10267
diff changeset
   364
    ASI_PRIMARY_LITTLE     = 0x88,
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   365
    // 8x8-bit partial store
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   366
    ASI_PST8_PRIMARY       = 0xC0,
10267
8bdeec886dc4 7079329: Adjust allocation prefetching for T4
kvn
parents: 10264
diff changeset
   367
    // Block initializing store
8bdeec886dc4 7079329: Adjust allocation prefetching for T4
kvn
parents: 10264
diff changeset
   368
    ASI_ST_BLKINIT_PRIMARY = 0xE2,
8bdeec886dc4 7079329: Adjust allocation prefetching for T4
kvn
parents: 10264
diff changeset
   369
    // Most-Recently-Used (MRU) BIS variant
8bdeec886dc4 7079329: Adjust allocation prefetching for T4
kvn
parents: 10264
diff changeset
   370
    ASI_ST_BLKINIT_MRU_PRIMARY = 0xF2
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
    // add more from book as needed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
  // helpers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
  // x is supposed to fit in a field "nbits" wide
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
  // and be sign-extended. Check the range.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
  static void assert_signed_range(intptr_t x, int nbits) {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   381
    assert(nbits == 32 || (-(1 << nbits-1) <= x && x < (1 << nbits-1)),
33105
294e48b4f704 8080775: Better argument formatting for assert() and friends
david
parents: 31515
diff changeset
   382
           "value out of range: x=" INTPTR_FORMAT ", nbits=%d", x, nbits);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
  static void assert_signed_word_disp_range(intptr_t x, int nbits) {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   386
    assert((x & 3) == 0, "not word aligned");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
    assert_signed_range(x, nbits + 2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   390
  static void assert_unsigned_range(int x, int nbits) {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   391
    assert(juint(x) < juint(1 << nbits), "unsigned constant out of range");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   394
  // fields: note bits numbered from LSB = 0, fields known by inclusive bit range
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
  static int fmask(juint hi_bit, juint lo_bit) {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   397
    assert(hi_bit >= lo_bit && 0 <= lo_bit && hi_bit < 32, "bad bits");
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   398
    return (1 << (hi_bit-lo_bit + 1)) - 1;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
  // inverse of u_field
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
  static int inv_u_field(int x, int hi_bit, int lo_bit) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
    juint r = juint(x) >> lo_bit;
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   405
    r &= fmask(hi_bit, lo_bit);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
    return int(r);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
  // signed version: extract from field and sign-extend
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
  static int inv_s_field(int x, int hi_bit, int lo_bit) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
    int sign_shift = 31 - hi_bit;
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   413
    return inv_u_field(((x << sign_shift) >> sign_shift), hi_bit, lo_bit);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
  // given a field that ranges from hi_bit to lo_bit (inclusive,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
  // LSB = 0), and an unsigned value for the field,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
  // shift it into the field
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
#ifdef ASSERT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
  static int u_field(int x, int hi_bit, int lo_bit) {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   422
    assert((x & ~fmask(hi_bit, lo_bit)) == 0,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
            "value out of range");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
    int r = x << lo_bit;
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   425
    assert(inv_u_field(r, hi_bit, lo_bit) == x, "just checking");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
    return r;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
  // make sure this is inlined as it will reduce code size significantly
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   430
  #define u_field(x, hi_bit, lo_bit) ((x) << (lo_bit))
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   433
  static int inv_op(int x)   { return inv_u_field(x, 31, 30); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   434
  static int inv_op2(int x)  { return inv_u_field(x, 24, 22); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   435
  static int inv_op3(int x)  { return inv_u_field(x, 24, 19); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   436
  static int inv_cond(int x) { return inv_u_field(x, 28, 25); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   438
  static bool inv_immed(int x)   { return (x & Assembler::immed(true)) != 0; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   440
  static Register inv_rd(int x)  { return as_Register(inv_u_field(x, 29, 25)); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   441
  static Register inv_rs1(int x) { return as_Register(inv_u_field(x, 18, 14)); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   442
  static Register inv_rs2(int x) { return as_Register(inv_u_field(x,  4,  0)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   444
  static int op(int x)           { return u_field(x,             31, 30); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   445
  static int rd(Register r)      { return u_field(r->encoding(), 29, 25); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   446
  static int fcn(int x)          { return u_field(x,             29, 25); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   447
  static int op3(int x)          { return u_field(x,             24, 19); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   448
  static int rs1(Register r)     { return u_field(r->encoding(), 18, 14); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   449
  static int rs2(Register r)     { return u_field(r->encoding(),  4,  0); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   450
  static int annul(bool a)       { return u_field(a ? 1 : 0,     29, 29); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   451
  static int cond(int x)         { return u_field(x,             28, 25); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   452
  static int cond_mov(int x)     { return u_field(x,             17, 14); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   453
  static int rcond(RCondition x) { return u_field(x,             12, 10); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   454
  static int op2(int x)          { return u_field(x,             24, 22); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   455
  static int predict(bool p)     { return u_field(p ? 1 : 0,     19, 19); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   456
  static int branchcc(CC fcca)   { return u_field(fcca,          21, 20); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   457
  static int cmpcc(CC fcca)      { return u_field(fcca,          26, 25); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   458
  static int imm_asi(int x)      { return u_field(x,             12,  5); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   459
  static int immed(bool i)       { return u_field(i ? 1 : 0,     13, 13); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   460
  static int opf_low6(int w)     { return u_field(w,             10,  5); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   461
  static int opf_low5(int w)     { return u_field(w,              9,  5); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   462
  static int op5(int x)          { return u_field(x,              8,  5); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   463
  static int trapcc(CC cc)       { return u_field(cc,            12, 11); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   464
  static int sx(int i)           { return u_field(i,             12, 12); } // shift x=1 means 64-bit
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   465
  static int opf(int x)          { return u_field(x,             13,  5); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   467
  static bool is_cbcond(int x) {
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   468
    return (VM_Version::has_cbcond() && (inv_cond(x) > rc_last) &&
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   469
            inv_op(x) == branch_op && inv_op2(x) == bpr_op2);
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   470
  }
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   471
  static bool is_cxb(int x) {
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   472
    assert(is_cbcond(x), "wrong instruction");
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   473
    return (x & (1 << 21)) != 0;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   474
  }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   475
  static bool is_branch(int x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   476
    if (inv_op(x) != Assembler::branch_op) return false;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   477
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   478
    bool is_bpr = inv_op2(x) == Assembler::bpr_op2;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   479
    bool is_bp  = inv_op2(x) == Assembler::bp_op2;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   480
    bool is_br  = inv_op2(x) == Assembler::br_op2;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   481
    bool is_fp  = inv_op2(x) == Assembler::fb_op2;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   482
    bool is_fbp = inv_op2(x) == Assembler::fbp_op2;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   483
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   484
    return is_bpr || is_bp || is_br || is_fp || is_fbp;
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   485
  }
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   486
  static bool is_call(int x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   487
    return inv_op(x) == Assembler::call_op;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   488
  }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   489
  static bool is_jump(int x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   490
    if (inv_op(x) != Assembler::arith_op) return false;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   491
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   492
    bool is_jmpl = inv_op3(x) == Assembler::jmpl_op3;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   493
    bool is_rett = inv_op3(x) == Assembler::rett_op3;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   494
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   495
    return is_jmpl || is_rett;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   496
  }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   497
  static bool is_rdpc(int x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   498
    return (inv_op(x) == Assembler::arith_op && inv_op3(x) == Assembler::rdreg_op3 &&
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   499
            inv_u_field(x, 18, 14) == 5);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   500
  }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   501
  static bool is_cti(int x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   502
      return is_branch(x) || is_call(x) || is_jump(x); // Ignoring done/retry
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   503
  }
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   504
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   505
  static int cond_cbcond(int x) { return  u_field((((x & 8) << 1) + 8 + (x & 7)), 29, 25); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   506
  static int inv_cond_cbcond(int x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   507
    assert(is_cbcond(x), "wrong instruction");
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   508
    return inv_u_field(x, 27, 25) | (inv_u_field(x, 29, 29) << 3);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   509
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   511
  static int opf_cc(CC c, bool useFloat) { return u_field((useFloat ? 0 : 4) + c, 13, 11); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   512
  static int mov_cc(CC c, bool useFloat) { return u_field(useFloat ? 0 : 1, 18, 18) | u_field(c, 12, 11); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   513
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   514
  static int fd(FloatRegister r, FloatRegisterImpl::Width fwa)  { return u_field(r->encoding(fwa), 29, 25); };
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   515
  static int fs1(FloatRegister r, FloatRegisterImpl::Width fwa) { return u_field(r->encoding(fwa), 18, 14); };
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   516
  static int fs2(FloatRegister r, FloatRegisterImpl::Width fwa) { return u_field(r->encoding(fwa),  4,  0); };
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   517
  static int fs3(FloatRegister r, FloatRegisterImpl::Width fwa) { return u_field(r->encoding(fwa), 13,  9); };
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
  // some float instructions use this encoding on the op3 field
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
  static int alt_op3(int op, FloatRegisterImpl::Width w) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
    int r;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
    switch(w) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
     case FloatRegisterImpl::S: r = op + 0;  break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
     case FloatRegisterImpl::D: r = op + 3;  break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
     case FloatRegisterImpl::Q: r = op + 2;  break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
     default: ShouldNotReachHere(); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
    return op3(r);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
  // compute inverse of simm
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
  static int inv_simm(int x, int nbits) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
    return (int)(x << (32 - nbits)) >> (32 - nbits);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   536
  static int inv_simm13(int x) { return inv_simm(x, 13); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
  // signed immediate, in low bits, nbits long
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
  static int simm(int x, int nbits) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
    assert_signed_range(x, nbits);
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   541
    return x & ((1 << nbits) - 1);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   544
  // unsigned immediate, in low bits, at most nbits long.
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   545
  static int uimm(int x, int nbits) {
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   546
    assert_unsigned_range(x, nbits);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   547
    return x & ((1 << nbits) - 1);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   548
  }
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   549
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   550
  // compute inverse of wdisp16
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
  static intptr_t inv_wdisp16(int x, intptr_t pos) {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   552
    int lo = x & ((1 << 14) - 1);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
    int hi = (x >> 20) & 3;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
    if (hi >= 2) hi |= ~1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
    return (((hi << 14) | lo) << 2) + pos;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
  // word offset, 14 bits at LSend, 2 bits at B21, B20
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
  static int wdisp16(intptr_t x, intptr_t off) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
    intptr_t xx = x - off;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   561
    assert_signed_word_disp_range(xx, 16);
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   562
    int r = (xx >> 2) & ((1 << 14) - 1) | (((xx >> (2+14)) & 3) << 20);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   563
    assert(inv_wdisp16(r, off) == x, "inverse is not inverse");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
    return r;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   567
  // compute inverse of wdisp10
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   568
  static intptr_t inv_wdisp10(int x, intptr_t pos) {
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   569
    assert(is_cbcond(x), "wrong instruction");
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   570
    int lo = inv_u_field(x, 12, 5);
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   571
    int hi = (x >> 19) & 3;
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   572
    if (hi >= 2) hi |= ~1;
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   573
    return (((hi << 8) | lo) << 2) + pos;
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   574
  }
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   575
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   576
  // word offset for cbcond, 8 bits at [B12,B5], 2 bits at [B20,B19]
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   577
  static int wdisp10(intptr_t x, intptr_t off) {
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   578
    assert(VM_Version::has_cbcond(), "This CPU does not have CBCOND instruction");
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   579
    intptr_t xx = x - off;
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   580
    assert_signed_word_disp_range(xx, 10);
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   581
    int r = (((xx >> 2) & ((1 << 8) - 1)) << 5) | (((xx >> (2+8)) & 3) << 19);
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   582
    // Have to fake cbcond instruction to pass assert in inv_wdisp10()
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   583
    assert(inv_wdisp10((r | op(branch_op) | cond_cbcond(rc_last+1) | op2(bpr_op2)), off) == x, "inverse is not inverse");
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   584
    return r;
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   585
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   586
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
  // word displacement in low-order nbits bits
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   589
  static intptr_t inv_wdisp(int x, intptr_t pos, int nbits) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   590
    int pre_sign_extend = x & ((1 << nbits) - 1);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   591
    int r = (pre_sign_extend >= (1 << (nbits - 1)) ?
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   592
             pre_sign_extend | ~((1 << nbits) - 1) : pre_sign_extend);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   593
    return (r << 2) + pos;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   594
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   596
  static int wdisp(intptr_t x, intptr_t off, int nbits) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
    intptr_t xx = x - off;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
    assert_signed_word_disp_range(xx, nbits);
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   599
    int r = (xx >> 2) & ((1 << nbits) - 1);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   600
    assert(inv_wdisp(r, off, nbits) == x, "inverse not inverse");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   601
    return r;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   602
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
489c9b5090e2 Initial load
duke
parents:
diff changeset
   604
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
  // Extract the top 32 bits in a 64 bit word
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   606
  static int32_t hi32(int64_t x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   607
    int32_t r = int32_t((uint64_t)x >> 32);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
    return r;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   609
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
  // given a sethi instruction, extract the constant, left-justified
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   612
  static int inv_hi22(int x) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
    return x << 10;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   614
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   615
489c9b5090e2 Initial load
duke
parents:
diff changeset
   616
  // create an imm22 field, given a 32-bit left-justified constant
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   617
  static int hi22(int x) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   618
    int r = int(juint(x) >> 10);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   619
    assert((r & ~((1 << 22) - 1)) == 0, "just checkin'");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   620
    return r;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   621
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   622
489c9b5090e2 Initial load
duke
parents:
diff changeset
   623
  // create a low10 __value__ (not a field) for a given a 32-bit constant
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   624
  static int low10(int x) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   625
    return x & ((1 << 10) - 1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   626
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   627
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   628
  // create a low12 __value__ (not a field) for a given a 32-bit constant
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   629
  static int low12(int x) {
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   630
    return x & ((1 << 12) - 1);
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   631
  }
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   632
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   633
  // AES crypto instructions supported only on certain processors
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   634
  static void aes_only() { assert(VM_Version::has_aes(), "This instruction only works on SPARC with AES instructions support"); }
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   635
24953
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
   636
  // SHA crypto instructions supported only on certain processors
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   637
  static void sha1_only()   { assert(VM_Version::has_sha1(),   "This instruction only works on SPARC with SHA1"); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   638
  static void sha256_only() { assert(VM_Version::has_sha256(), "This instruction only works on SPARC with SHA256"); }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   639
  static void sha512_only() { assert(VM_Version::has_sha512(), "This instruction only works on SPARC with SHA512"); }
24953
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
   640
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   641
  // CRC32C instruction supported only on certain processors
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   642
  static void crc32c_only() { assert(VM_Version::has_crc32c(), "This instruction only works on SPARC with CRC32C"); }
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
   643
46597
d669fb842ae3 8164888: Intrinsify fused mac operations on SPARC
neliasso
parents: 46596
diff changeset
   644
  // FMAf instructions supported only on certain processors
d669fb842ae3 8164888: Intrinsify fused mac operations on SPARC
neliasso
parents: 46596
diff changeset
   645
  static void fmaf_only() { assert(VM_Version::has_fmaf(), "This instruction only works on SPARC with FMAf"); }
d669fb842ae3 8164888: Intrinsify fused mac operations on SPARC
neliasso
parents: 46596
diff changeset
   646
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   647
  // MPMUL instruction supported only on certain processors
47563
bbd116ac5ef3 8188031: Complement fused mac operations on SPARC
neliasso
parents: 47561
diff changeset
   648
  static void mpmul_only() { assert(VM_Version::has_mpmul(), "This instruction only works on SPARC with MPMUL"); }
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   649
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   650
  // instruction only in VIS1
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   651
  static void vis1_only() { assert(VM_Version::has_vis1(), "This instruction only works on SPARC with VIS1"); }
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   652
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   653
  // instruction only in VIS2
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   654
  static void vis2_only() { assert(VM_Version::has_vis2(), "This instruction only works on SPARC with VIS2"); }
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
   655
10027
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
   656
  // instruction only in VIS3
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   657
  static void vis3_only() { assert(VM_Version::has_vis3(), "This instruction only works on SPARC with VIS3"); }
10027
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
   658
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   659
  // instruction deprecated in v9
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   660
  static void v9_dep() { } // do nothing for now
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   661
489c9b5090e2 Initial load
duke
parents:
diff changeset
   662
 protected:
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   663
#ifdef ASSERT
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   664
#define VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   665
#endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   666
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   667
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   668
  // A simple delay-slot scheme:
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   669
  // In order to check the programmer, the assembler keeps track of delay-slots.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   670
  // It forbids CTIs in delay-slots (conservative, but should be OK). Also, when
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   671
  // emitting an instruction into a delay-slot, you must do so using delayed(),
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   672
  // e.g. asm->delayed()->add(...), in order to check that you do not omit the
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   673
  // delay-slot instruction. To implement this, we use a simple FSA.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   674
  enum { NoDelay, AtDelay, FillDelay } _delay_state;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   675
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   676
  // A simple hazard scheme:
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   677
  // In order to avoid pipeline stalls, due to single cycle pipeline hazards, we
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   678
  // adopt a simplistic state tracking mechanism that will enforce an additional
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   679
  // 'nop' instruction to be inserted prior to emitting an instruction that can
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   680
  // expose a given hazard (currently, PC-related hazards only).
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   681
  enum { NoHazard, PcHazard } _hazard_state;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   682
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   683
489c9b5090e2 Initial load
duke
parents:
diff changeset
   684
 public:
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   685
  // Tell the assembler that the next instruction must NOT be in delay-slot.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   686
  // Use at start of multi-instruction macros.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   687
  void assert_not_delayed() {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   688
    // This is a separate entry to avoid the creation of string constants in
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   689
    // non-asserted code, with some compilers this pollutes the object code.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   690
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   691
    assert_no_delay("Next instruction should not be in a delay-slot.");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   692
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   694
489c9b5090e2 Initial load
duke
parents:
diff changeset
   695
 protected:
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   696
  void assert_no_delay(const char* msg) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   697
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   698
    assert(_delay_state == NoDelay, msg);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   699
#endif
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   700
  }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   701
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   702
  void assert_no_hazard() {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   703
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   704
    assert(_hazard_state == NoHazard, "Unsolicited pipeline hazard.");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   705
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   708
 private:
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   709
  inline int32_t prev_insn() {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   710
    assert(offset() > 0, "Interface violation.");
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   711
    int32_t* addr = (int32_t*)pc() - 1;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   712
    return *addr;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   713
  }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   714
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   715
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   716
  void validate_no_pipeline_hazards();
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   717
#endif
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   718
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   719
 protected:
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   720
  // Avoid possible pipeline stall by inserting an additional 'nop' instruction,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   721
  // if the previous instruction is a 'cbcond' or a 'rdpc'.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   722
  inline void avoid_pipeline_stall();
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   723
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   724
  // A call to cti() is made before emitting a control-transfer instruction (CTI)
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   725
  // in order to assert a CTI is not emitted right after a 'cbcond', nor in the
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   726
  // delay-slot of another CTI. Only effective when assertions are enabled.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   727
  void cti() {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   728
    // A 'cbcond' or 'rdpc' instruction immediately followed by a CTI introduces
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   729
    // a pipeline stall, which we make sure to prohibit.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   730
    assert_no_cbcond_before();
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   731
    assert_no_rdpc_before();
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   732
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   733
    assert_no_hazard();
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   734
    assert_no_delay("CTI in delay-slot.");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   735
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   736
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   738
  // Called when emitting CTI with a delay-slot, AFTER emitting.
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   739
  inline void induce_delay_slot() {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   740
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   741
    assert_no_delay("Already in delay-slot.");
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   742
    _delay_state = AtDelay;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   743
#endif
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   744
  }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   745
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   746
  inline void induce_pc_hazard() {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   747
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   748
    assert_no_hazard();
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   749
    _hazard_state = PcHazard;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   750
#endif
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   751
  }
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   752
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   753
  bool is_cbcond_before() { return offset() > 0 ? is_cbcond(prev_insn()) : false; }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   754
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   755
  bool is_rdpc_before() { return offset() > 0 ? is_rdpc(prev_insn()) : false; }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   756
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   757
  void assert_no_cbcond_before() {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   758
    assert(offset() == 0 || !is_cbcond_before(), "CBCOND should not be followed by CTI.");
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   759
  }
10264
6879f93d268d 7063629: use cbcond in C2 generated code on T4
kvn
parents: 10252
diff changeset
   760
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   761
  void assert_no_rdpc_before() {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   762
    assert(offset() == 0 || !is_rdpc_before(), "RDPC should not be followed by CTI.");
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   763
  }
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   764
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   765
 public:
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   766
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   767
  bool use_cbcond(Label &L) {
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   768
    if (!UseCBCond || is_cbcond_before()) return false;
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   769
    intptr_t x = intptr_t(target_distance(L)) - intptr_t(pc());
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   770
    assert((x & 3) == 0, "not word aligned");
11190
d561d41f241a 7003454: order constants in constant table by number of references in code
twisti
parents: 10519
diff changeset
   771
    return is_simm12(x);
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   772
  }
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   773
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   774
  // Tells assembler you know that next instruction is delayed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
  Assembler* delayed() {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   776
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   777
    assert(_delay_state == AtDelay, "Delayed instruction not in delay-slot.");
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   778
    _delay_state = FillDelay;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   779
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   780
    return this;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   782
489c9b5090e2 Initial load
duke
parents:
diff changeset
   783
  void flush() {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   784
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   785
    assert(_delay_state == NoDelay, "Ending code with a delay-slot.");
50306
ed7605e8675f 8200288: [SPARC] "assert(!(is_cti(prev) && is_cti(insn))) failed: CTI-CTI not allowed"
phedlin
parents: 47563
diff changeset
   786
#ifdef COMPILER2
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   787
    validate_no_pipeline_hazards();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   788
#endif
50306
ed7605e8675f 8200288: [SPARC] "assert(!(is_cti(prev) && is_cti(insn))) failed: CTI-CTI not allowed"
phedlin
parents: 47563
diff changeset
   789
#endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
    AbstractAssembler::flush();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   792
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   793
  inline void emit_int32(int32_t);  // shadows AbstractAssembler::emit_int32
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   794
  inline void emit_data(int32_t);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   795
  inline void emit_data(int32_t, RelocationHolder const&);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   796
  inline void emit_data(int32_t, relocInfo::relocType rtype);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   797
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   798
  // Helper for the above functions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   799
  inline void check_delay();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   800
489c9b5090e2 Initial load
duke
parents:
diff changeset
   801
489c9b5090e2 Initial load
duke
parents:
diff changeset
   802
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   803
  // instructions, refer to page numbers in the SPARC Architecture Manual, V9
489c9b5090e2 Initial load
duke
parents:
diff changeset
   804
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   805
  // pp 135
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   806
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   807
  inline void add(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   808
  inline void add(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   809
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   810
  inline void addcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   811
  inline void addcc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   812
  inline void addc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   813
  inline void addc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   814
  inline void addccc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   815
  inline void addccc(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   816
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   817
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   818
  // 4-operand AES instructions
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   819
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   820
  inline void aes_eround01(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   821
  inline void aes_eround23(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   822
  inline void aes_dround01(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   823
  inline void aes_dround23(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   824
  inline void aes_eround01_l(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   825
  inline void aes_eround23_l(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   826
  inline void aes_dround01_l(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   827
  inline void aes_dround23_l(FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   828
  inline void aes_kexpand1(FloatRegister s1, FloatRegister s2, int imm5a, FloatRegister d);
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   829
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   830
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   831
  // 3-operand AES instructions
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   832
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   833
  inline void aes_kexpand0(FloatRegister s1, FloatRegister s2, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   834
  inline void aes_kexpand2(FloatRegister s1, FloatRegister s2, FloatRegister d);
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   835
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   836
  // pp 136
489c9b5090e2 Initial load
duke
parents:
diff changeset
   837
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   838
  inline void bpr(RCondition c, bool a, Predict p, Register s1, address d, relocInfo::relocType rt = relocInfo::none);
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   839
  inline void bpr(RCondition c, bool a, Predict p, Register s1, Label &L);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   840
10264
6879f93d268d 7063629: use cbcond in C2 generated code on T4
kvn
parents: 10252
diff changeset
   841
  // compare and branch
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   842
  inline void cbcond(Condition c, CC cc, Register s1, Register s2, Label &L);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   843
  inline void cbcond(Condition c, CC cc, Register s1, int simm5, Label &L);
10264
6879f93d268d 7063629: use cbcond in C2 generated code on T4
kvn
parents: 10252
diff changeset
   844
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   845
 protected: // use MacroAssembler::br instead
489c9b5090e2 Initial load
duke
parents:
diff changeset
   846
489c9b5090e2 Initial load
duke
parents:
diff changeset
   847
  // pp 138
489c9b5090e2 Initial load
duke
parents:
diff changeset
   848
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   849
  inline void fb(Condition c, bool a, address d, relocInfo::relocType rt = relocInfo::none);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   850
  inline void fb(Condition c, bool a, Label &L);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   851
489c9b5090e2 Initial load
duke
parents:
diff changeset
   852
  // pp 141
489c9b5090e2 Initial load
duke
parents:
diff changeset
   853
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   854
  inline void fbp(Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt = relocInfo::none);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   855
  inline void fbp(Condition c, bool a, CC cc, Predict p, Label &L);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   856
489c9b5090e2 Initial load
duke
parents:
diff changeset
   857
  // pp 144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   858
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   859
  inline void br(Condition c, bool a, address d, relocInfo::relocType rt = relocInfo::none);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   860
  inline void br(Condition c, bool a, Label &L);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   861
489c9b5090e2 Initial load
duke
parents:
diff changeset
   862
  // pp 146
489c9b5090e2 Initial load
duke
parents:
diff changeset
   863
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   864
  inline void bp(Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt = relocInfo::none);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   865
  inline void bp(Condition c, bool a, CC cc, Predict p, Label &L);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   866
489c9b5090e2 Initial load
duke
parents:
diff changeset
   867
  // pp 149
489c9b5090e2 Initial load
duke
parents:
diff changeset
   868
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   869
  inline void call(address d, relocInfo::relocType rt = relocInfo::runtime_call_type);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   870
  inline void call(Label &L,  relocInfo::relocType rt = relocInfo::runtime_call_type);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   871
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   872
  inline void call(address d, RelocationHolder const &rspec);
35086
bbf32241d851 8072008: Emit direct call instead of linkTo* for recursive indy/MH.invoke* calls
vlivanov
parents: 33628
diff changeset
   873
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   874
 public:
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 10027
diff changeset
   875
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   876
  // pp 150
489c9b5090e2 Initial load
duke
parents:
diff changeset
   877
489c9b5090e2 Initial load
duke
parents:
diff changeset
   878
  // These instructions compare the contents of s2 with the contents of
489c9b5090e2 Initial load
duke
parents:
diff changeset
   879
  // memory at address in s1. If the values are equal, the contents of memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   880
  // at address s1 is swapped with the data in d. If the values are not equal,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   881
  // the the contents of memory at s1 is loaded into d, without the swap.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   882
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   883
  inline void casa(Register s1, Register s2, Register d, int ia = -1);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   884
  inline void casxa(Register s1, Register s2, Register d, int ia = -1);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   885
489c9b5090e2 Initial load
duke
parents:
diff changeset
   886
  // pp 152
489c9b5090e2 Initial load
duke
parents:
diff changeset
   887
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   888
  inline void udiv(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   889
  inline void udiv(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   890
  inline void sdiv(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   891
  inline void sdiv(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   892
  inline void udivcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   893
  inline void udivcc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   894
  inline void sdivcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   895
  inline void sdivcc(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   896
489c9b5090e2 Initial load
duke
parents:
diff changeset
   897
  // pp 155
489c9b5090e2 Initial load
duke
parents:
diff changeset
   898
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   899
  inline void done();
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   900
  inline void retry();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   901
489c9b5090e2 Initial load
duke
parents:
diff changeset
   902
  // pp 156
489c9b5090e2 Initial load
duke
parents:
diff changeset
   903
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   904
  inline void fadd(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   905
  inline void fsub(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   906
489c9b5090e2 Initial load
duke
parents:
diff changeset
   907
  // pp 157
489c9b5090e2 Initial load
duke
parents:
diff changeset
   908
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   909
  inline void fcmp(FloatRegisterImpl::Width w, CC cc, FloatRegister s1, FloatRegister s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   910
  inline void fcmpe(FloatRegisterImpl::Width w, CC cc, FloatRegister s1, FloatRegister s2);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   911
489c9b5090e2 Initial load
duke
parents:
diff changeset
   912
  // pp 159
489c9b5090e2 Initial load
duke
parents:
diff changeset
   913
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   914
  inline void ftox(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   915
  inline void ftoi(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   916
489c9b5090e2 Initial load
duke
parents:
diff changeset
   917
  // pp 160
489c9b5090e2 Initial load
duke
parents:
diff changeset
   918
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   919
  inline void ftof(FloatRegisterImpl::Width sw, FloatRegisterImpl::Width dw, FloatRegister s, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   920
489c9b5090e2 Initial load
duke
parents:
diff changeset
   921
  // pp 161
489c9b5090e2 Initial load
duke
parents:
diff changeset
   922
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   923
  inline void fxtof(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   924
  inline void fitof(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   925
489c9b5090e2 Initial load
duke
parents:
diff changeset
   926
  // pp 162
489c9b5090e2 Initial load
duke
parents:
diff changeset
   927
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   928
  inline void fmov(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   929
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   930
  inline void fneg(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   931
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   932
  inline void fabs(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   933
489c9b5090e2 Initial load
duke
parents:
diff changeset
   934
  // pp 163
489c9b5090e2 Initial load
duke
parents:
diff changeset
   935
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   936
  inline void fmul(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   937
  inline void fmul(FloatRegisterImpl::Width sw, FloatRegisterImpl::Width dw, FloatRegister s1, FloatRegister s2, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   938
  inline void fdiv(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   939
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   940
  // FXORs/FXORd instructions
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   941
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   942
  inline void fxor(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d);
22505
4523090c9674 8002074: Support for AES on SPARC
kvn
parents: 22234
diff changeset
   943
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   944
  // pp 164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   945
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   946
  inline void fsqrt(FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   947
46597
d669fb842ae3 8164888: Intrinsify fused mac operations on SPARC
neliasso
parents: 46596
diff changeset
   948
  // fmaf instructions.
d669fb842ae3 8164888: Intrinsify fused mac operations on SPARC
neliasso
parents: 46596
diff changeset
   949
d669fb842ae3 8164888: Intrinsify fused mac operations on SPARC
neliasso
parents: 46596
diff changeset
   950
  inline void fmadd(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
47563
bbd116ac5ef3 8188031: Complement fused mac operations on SPARC
neliasso
parents: 47561
diff changeset
   951
  inline void fmsub(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
bbd116ac5ef3 8188031: Complement fused mac operations on SPARC
neliasso
parents: 47561
diff changeset
   952
bbd116ac5ef3 8188031: Complement fused mac operations on SPARC
neliasso
parents: 47561
diff changeset
   953
  inline void fnmadd(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
bbd116ac5ef3 8188031: Complement fused mac operations on SPARC
neliasso
parents: 47561
diff changeset
   954
  inline void fnmsub(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d);
46597
d669fb842ae3 8164888: Intrinsify fused mac operations on SPARC
neliasso
parents: 46596
diff changeset
   955
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   956
  // pp 165
489c9b5090e2 Initial load
duke
parents:
diff changeset
   957
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   958
  inline void flush(Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   959
  inline void flush(Register s1, int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   960
489c9b5090e2 Initial load
duke
parents:
diff changeset
   961
  // pp 167
489c9b5090e2 Initial load
duke
parents:
diff changeset
   962
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   963
  void flushw();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   964
489c9b5090e2 Initial load
duke
parents:
diff changeset
   965
  // pp 168
489c9b5090e2 Initial load
duke
parents:
diff changeset
   966
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   967
  void illtrap(int const22a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   968
489c9b5090e2 Initial load
duke
parents:
diff changeset
   969
  // pp 169
489c9b5090e2 Initial load
duke
parents:
diff changeset
   970
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   971
  void impdep1(int id1, int const19a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   972
  void impdep2(int id1, int const19a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   973
489c9b5090e2 Initial load
duke
parents:
diff changeset
   974
  // pp 170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   975
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   976
  void jmpl(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   977
  void jmpl(Register s1, int simm13a, Register d,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   978
            RelocationHolder const &rspec = RelocationHolder());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   979
489c9b5090e2 Initial load
duke
parents:
diff changeset
   980
  // 171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   981
2571
d602ad6538bd 6822110: Add AddressLiteral class on SPARC
twisti
parents: 2534
diff changeset
   982
  inline void ldf(FloatRegisterImpl::Width w, Register s1, Register s2, FloatRegister d);
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   983
  inline void ldf(FloatRegisterImpl::Width w, Register s1, int simm13a, FloatRegister d,
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   984
                  RelocationHolder const &rspec = RelocationHolder());
2571
d602ad6538bd 6822110: Add AddressLiteral class on SPARC
twisti
parents: 2534
diff changeset
   985
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   986
  inline void ldd(Register s1, Register s2, FloatRegister d);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
   987
  inline void ldd(Register s1, int simm13a, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   988
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   989
  inline void ldfsr(Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   990
  inline void ldfsr(Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   991
  inline void ldxfsr(Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   992
  inline void ldxfsr(Register s1, int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   993
489c9b5090e2 Initial load
duke
parents:
diff changeset
   994
  // 173
489c9b5090e2 Initial load
duke
parents:
diff changeset
   995
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   996
  inline void ldfa(FloatRegisterImpl::Width w, Register s1, Register s2, int ia, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   997
  inline void ldfa(FloatRegisterImpl::Width w, Register s1, int simm13a,         FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   998
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
   999
  // pp 175
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1000
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1001
  inline void ldsb(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1002
  inline void ldsb(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1003
  inline void ldsh(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1004
  inline void ldsh(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1005
  inline void ldsw(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1006
  inline void ldsw(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1007
  inline void ldub(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1008
  inline void ldub(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1009
  inline void lduh(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1010
  inline void lduh(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1011
  inline void lduw(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1012
  inline void lduw(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1013
  inline void ldx(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1014
  inline void ldx(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1015
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1016
  // pp 177
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1017
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1018
  inline void ldsba(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1019
  inline void ldsba(Register s1, int simm13a,         Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1020
  inline void ldsha(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1021
  inline void ldsha(Register s1, int simm13a,         Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1022
  inline void ldswa(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1023
  inline void ldswa(Register s1, int simm13a,         Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1024
  inline void lduba(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1025
  inline void lduba(Register s1, int simm13a,         Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1026
  inline void lduha(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1027
  inline void lduha(Register s1, int simm13a,         Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1028
  inline void lduwa(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1029
  inline void lduwa(Register s1, int simm13a,         Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1030
  inline void ldxa(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1031
  inline void ldxa(Register s1, int simm13a,         Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1032
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1033
  // pp 181
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1034
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1035
  inline void and3(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1036
  inline void and3(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1037
  inline void andcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1038
  inline void andcc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1039
  inline void andn(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1040
  inline void andn(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1041
  inline void andncc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1042
  inline void andncc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1043
  inline void or3(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1044
  inline void or3(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1045
  inline void orcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1046
  inline void orcc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1047
  inline void orn(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1048
  inline void orn(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1049
  inline void orncc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1050
  inline void orncc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1051
  inline void xor3(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1052
  inline void xor3(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1053
  inline void xorcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1054
  inline void xorcc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1055
  inline void xnor(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1056
  inline void xnor(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1057
  inline void xnorcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1058
  inline void xnorcc(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1059
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1060
  // pp 183
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1061
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1062
  inline void membar(Membar_mask_bits const7a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1063
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1064
  // pp 185
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1065
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1066
  inline void fmov(FloatRegisterImpl::Width w, Condition c,  bool floatCC, CC cca, FloatRegister s2, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1067
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1068
  // pp 189
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1069
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1070
  inline void fmov(FloatRegisterImpl::Width w, RCondition c, Register s1,  FloatRegister s2, FloatRegister d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1071
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1072
  // pp 191
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1073
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1074
  inline void movcc(Condition c, bool floatCC, CC cca, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1075
  inline void movcc(Condition c, bool floatCC, CC cca, int simm11a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1076
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1077
  // pp 195
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1078
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1079
  inline void movr(RCondition c, Register s1, Register s2,  Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1080
  inline void movr(RCondition c, Register s1, int simm10a,  Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1081
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1082
  // pp 196
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1083
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1084
  inline void mulx(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1085
  inline void mulx(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1086
  inline void sdivx(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1087
  inline void sdivx(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1088
  inline void udivx(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1089
  inline void udivx(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1090
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1091
  // pp 197
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1092
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1093
  inline void umul(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1094
  inline void umul(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1095
  inline void smul(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1096
  inline void smul(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1097
  inline void umulcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1098
  inline void umulcc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1099
  inline void smulcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1100
  inline void smulcc(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1101
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1102
  // pp 201
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1103
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1104
  inline void nop();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1105
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1106
  inline void sw_count();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1107
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1108
  // pp 202
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1109
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1110
  inline void popc(Register s,  Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1111
  inline void popc(int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1112
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1113
  // pp 203
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1114
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1115
  inline void prefetch(Register s1, Register s2, PrefetchFcn f);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1116
  inline void prefetch(Register s1, int simm13a, PrefetchFcn f);
14631
526804361522 8003250: SPARC: move MacroAssembler into separate file
twisti
parents: 13969
diff changeset
  1117
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1118
  inline void prefetcha(Register s1, Register s2, int ia, PrefetchFcn f);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1119
  inline void prefetcha(Register s1, int simm13a,         PrefetchFcn f);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1120
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1121
  // pp 208
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1122
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1123
  // not implementing read privileged register
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1124
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1125
  inline void rdy(Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1126
  inline void rdccr(Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1127
  inline void rdasi(Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1128
  inline void rdtick(Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1129
  inline void rdpc(Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1130
  inline void rdfprs(Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1131
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1132
  // pp 213
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1133
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1134
  inline void rett(Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1135
  inline void rett(Register s1, int simm13a, relocInfo::relocType rt = relocInfo::none);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1136
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1137
  // pp 214
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1138
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1139
  inline void save(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1140
  inline void save(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1141
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1142
  inline void restore(Register s1 = G0, Register s2 = G0, Register d = G0);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1143
  inline void restore(Register s1,      int simm13a,      Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1144
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1145
  // pp 216
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1146
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1147
  inline void saved();
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1148
  inline void restored();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1149
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1150
  // pp 217
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1151
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1152
  inline void sethi(int imm22a, Register d, RelocationHolder const &rspec = RelocationHolder());
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1153
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1154
  // pp 218
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1155
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1156
  inline void sll(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1157
  inline void sll(Register s1, int imm5a,   Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1158
  inline void srl(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1159
  inline void srl(Register s1, int imm5a,   Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1160
  inline void sra(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1161
  inline void sra(Register s1, int imm5a,   Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1162
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1163
  inline void sllx(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1164
  inline void sllx(Register s1, int imm6a,   Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1165
  inline void srlx(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1166
  inline void srlx(Register s1, int imm6a,   Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1167
  inline void srax(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1168
  inline void srax(Register s1, int imm6a,   Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1169
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1170
  // pp 220
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1171
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1172
  inline void sir(int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1173
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1174
  // pp 221
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1175
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1176
  inline void stbar();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1177
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1178
  // pp 222
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1179
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1180
  inline void stf(FloatRegisterImpl::Width w, FloatRegister d, Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1181
  inline void stf(FloatRegisterImpl::Width w, FloatRegister d, Register s1, int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1182
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1183
  inline void std(FloatRegister d, Register s1, Register s2);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1184
  inline void std(FloatRegister d, Register s1, int simm13a);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1185
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1186
  inline void stfsr(Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1187
  inline void stfsr(Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1188
  inline void stxfsr(Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1189
  inline void stxfsr(Register s1, int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1190
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1191
  // pp 224
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1192
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1193
  inline void stfa(FloatRegisterImpl::Width w, FloatRegister d, Register s1, Register s2, int ia);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1194
  inline void stfa(FloatRegisterImpl::Width w, FloatRegister d, Register s1, int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1195
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1196
  // pp 226
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1197
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1198
  inline void stb(Register d, Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1199
  inline void stb(Register d, Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1200
  inline void sth(Register d, Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1201
  inline void sth(Register d, Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1202
  inline void stw(Register d, Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1203
  inline void stw(Register d, Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1204
  inline void stx(Register d, Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1205
  inline void stx(Register d, Register s1, int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1206
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1207
  // pp 177
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1208
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1209
  inline void stba(Register d, Register s1, Register s2, int ia);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1210
  inline void stba(Register d, Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1211
  inline void stha(Register d, Register s1, Register s2, int ia);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1212
  inline void stha(Register d, Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1213
  inline void stwa(Register d, Register s1, Register s2, int ia);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1214
  inline void stwa(Register d, Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1215
  inline void stxa(Register d, Register s1, Register s2, int ia);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1216
  inline void stxa(Register d, Register s1, int simm13a);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1217
  inline void stda(Register d, Register s1, Register s2, int ia);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1218
  inline void stda(Register d, Register s1, int simm13a);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1219
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1220
  // pp 230
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1221
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1222
  inline void sub(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1223
  inline void sub(Register s1, int simm13a, Register d);
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7427
diff changeset
  1224
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1225
  inline void subcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1226
  inline void subcc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1227
  inline void subc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1228
  inline void subc(Register s1, int simm13a, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1229
  inline void subccc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1230
  inline void subccc(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1231
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1232
  // pp 231
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1233
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1234
  inline void swap(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1235
  inline void swap(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1236
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1237
  // pp 232
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1238
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1239
  inline void swapa(Register s1, Register s2, int ia, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1240
  inline void swapa(Register s1, int simm13a,         Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1241
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1242
  // pp 234, note op in book is wrong, see pp 268
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1243
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1244
  inline void taddcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1245
  inline void taddcc(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1246
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1247
  // pp 235
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1248
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1249
  inline void tsubcc(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1250
  inline void tsubcc(Register s1, int simm13a, Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1251
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1252
  // pp 237
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1253
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1254
  inline void trap(Condition c, CC cc, Register s1, Register s2);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1255
  inline void trap(Condition c, CC cc, Register s1, int trapa);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1256
  // simple uncond. trap
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1257
  inline void trap(int trapa);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1258
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1259
  // pp 239 omit write priv register for now
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1260
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1261
  inline void wry(Register d);
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1262
  inline void wrccr(Register s);
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1263
  inline void wrccr(Register s, int simm13a);
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1264
  inline void wrasi(Register d);
10501
5bce84af0883 7059037: Use BIS for zeroing on T4
kvn
parents: 10267
diff changeset
  1265
  // wrasi(d, imm) stores (d xor imm) to asi
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1266
  inline void wrasi(Register d, int simm13a);
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1267
  inline void wrfprs(Register d);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1268
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1269
  // VIS1 instructions
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
  1270
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1271
  inline void alignaddr(Register s1, Register s2, Register d);
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
  1272
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1273
  inline void faligndata(FloatRegister s1, FloatRegister s2, FloatRegister d);
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
  1274
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1275
  inline void fzero(FloatRegisterImpl::Width w, FloatRegister d);
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
  1276
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1277
  inline void fsrc2(FloatRegisterImpl::Width w, FloatRegister s2, FloatRegister d);
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
  1278
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1279
  inline void fnot1(FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister d);
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
  1280
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1281
  inline void fpmerge(FloatRegister s1, FloatRegister s2, FloatRegister d);
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
  1282
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1283
  inline void stpartialf(Register s1, Register s2, FloatRegister d, int ia = -1);
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
  1284
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1285
  // VIS2 instructions
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
  1286
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1287
  inline void edge8n(Register s1, Register s2, Register d);
24328
bddefb356fba 8035936: SIGBUS in StubRoutines::aesencryptBlock, solaris-sparc
kvn
parents: 24008
diff changeset
  1288
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1289
  inline void bmask(Register s1, Register s2, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1290
  inline void bshuffle(FloatRegister s1, FloatRegister s2, FloatRegister d);
33628
09241459a8b8 8141132: JEP 254: Compact Strings
thartmann
parents: 33105
diff changeset
  1291
10027
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
  1292
  // VIS3 instructions
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
  1293
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1294
  inline void addxc(Register s1, Register s2, Register d);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1295
  inline void addxccc(Register s1, Register s2, Register d);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1296
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1297
  inline void movstosw(FloatRegister s, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1298
  inline void movstouw(FloatRegister s, Register d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1299
  inline void movdtox(FloatRegister s, Register d);
10027
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
  1300
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1301
  inline void movwtos(Register s, FloatRegister d);
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1302
  inline void movxtod(Register s, FloatRegister d);
10027
20cd71f29262 7059034: Use movxtod/movdtox on T4
kvn
parents: 9976
diff changeset
  1303
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1304
  inline void xmulx(Register s1, Register s2, Register d);
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1305
  inline void xmulxhi(Register s1, Register s2, Register d);
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1306
  inline void umulxhi(Register s1, Register s2, Register d);
31404
63e8fcd70bfc 8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents: 24953
diff changeset
  1307
24953
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
  1308
  // Crypto SHA instructions
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
  1309
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1310
  inline void sha1();
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1311
  inline void sha256();
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
  1312
  inline void sha512();
24953
9680119572be 8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC
kvn
parents: 24328
diff changeset
  1313
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
  1314
  // CRC32C instruction
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
  1315
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1316
  inline void crc32c(FloatRegister s1, FloatRegister s2, FloatRegister d);
31515
6aed85dadbe6 8073583: C2 support for CRC32C on SPARC
kvn
parents: 31404
diff changeset
  1317
47561
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1318
  // MPMUL instruction
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1319
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1320
  inline void mpmul(int uimm5);
f59f0e51ef8a 8167199: Add C2 SPARC intrinsic for BigInteger::multiplyToLen() method.
neliasso
parents: 47216
diff changeset
  1321
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1322
  // Creation
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1323
  Assembler(CodeBuffer* code) : AbstractAssembler(code) {
46596
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1324
#ifdef VALIDATE_PIPELINE
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1325
    _delay_state  = NoDelay;
a7c9706d25a9 8144448: Avoid placing CTI immediately following or preceding RDPC instruction
neliasso
parents: 46594
diff changeset
  1326
    _hazard_state = NoHazard;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1327
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1328
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1329
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1330
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50306
diff changeset
  1331
#endif // CPU_SPARC_ASSEMBLER_SPARC_HPP