hotspot/src/cpu/sparc/vm/assembler_sparc.inline.hpp
author neliasso
Tue, 27 Jun 2017 15:34:36 +0200
changeset 46594 697dad96a3df
parent 35090 1f5b6aa795d0
child 46596 a7c9706d25a9
permissions -rw-r--r--
8181853: Remove use of 'v9_only()' Summary: v9 is the only supported ISA Reviewed-by: kvn Contributed-by: phedlin@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
22234
da823d78ad65 8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents: 18097
diff changeset
     2
 * Copyright (c) 1997, 2013, 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
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 7112
diff changeset
    25
#ifndef CPU_SPARC_VM_ASSEMBLER_SPARC_INLINE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 7112
diff changeset
    26
#define CPU_SPARC_VM_ASSEMBLER_SPARC_INLINE_HPP
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: 13886
diff changeset
    28
#include "asm/assembler.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    31
inline void Assembler::insert_nop_after_cbcond() {
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    32
  if (UseCBCond && cbcond_before()) {
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    33
    nop();
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    34
  }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    35
}
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    36
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
inline void Assembler::check_delay() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
# ifdef CHECK_DELAY
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  guarantee( delay_state != at_delay_slot, "must say delayed() when filling delay slot");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  delay_state = no_delay;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
# endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
    44
inline void Assembler::emit_int32(int x) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  check_delay();
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
    46
  AbstractAssembler::emit_int32(x);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    49
inline void Assembler::emit_data(int x) {
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    50
  emit_int32(x);
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    51
}
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    52
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
inline void Assembler::emit_data(int x, relocInfo::relocType rtype) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  relocate(rtype);
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
    55
  emit_int32(x);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
inline void Assembler::emit_data(int x, RelocationHolder const& rspec) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  relocate(rspec);
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
    60
  emit_int32(x);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
    64
inline void Assembler::add(Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | rs2(s2) ); }
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
    65
inline void Assembler::add(Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    67
inline void Assembler::addcc(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(add_op3  | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    68
inline void Assembler::addcc(  Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(add_op3  | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    69
inline void Assembler::addc(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(addc_op3             ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    70
inline void Assembler::addc(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(addc_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    71
inline void Assembler::addccc( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(addc_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    72
inline void Assembler::addccc( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(addc_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    73
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    74
inline void Assembler::aes_eround01(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround01_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    75
inline void Assembler::aes_eround23(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround23_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    76
inline void Assembler::aes_dround01(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround01_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    77
inline void Assembler::aes_dround23(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround23_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    78
inline void Assembler::aes_eround01_l(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround01_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    79
inline void Assembler::aes_eround23_l(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_eround23_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    80
inline void Assembler::aes_dround01_l(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround01_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    81
inline void Assembler::aes_dround23_l(  FloatRegister s1, FloatRegister s2, FloatRegister s3, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | fs3(s3, FloatRegisterImpl::D) | op5(aes_dround23_l_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    82
inline void Assembler::aes_kexpand1(  FloatRegister s1, FloatRegister s2, int imm5a, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes4_op3) | fs1(s1, FloatRegisterImpl::D) | u_field(imm5a, 13, 9) | op5(aes_kexpand1_op5) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    83
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    84
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    85
// 3-operand AES instructions
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    86
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    87
inline void Assembler::aes_kexpand0(  FloatRegister s1, FloatRegister s2, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes3_op3) | fs1(s1, FloatRegisterImpl::D) | opf(aes_kexpand0_opf) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    88
inline void Assembler::aes_kexpand2(  FloatRegister s1, FloatRegister s2, FloatRegister d ) { aes_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(aes3_op3) | fs1(s1, FloatRegisterImpl::D) | opf(aes_kexpand2_opf) | fs2(s2, FloatRegisterImpl::D) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
    89
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
    90
inline void Assembler::bpr( RCondition c, bool a, Predict p, Register s1, address d, relocInfo::relocType rt ) { insert_nop_after_cbcond(); cti(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(bpr_op2) | wdisp16(intptr_t(d), intptr_t(pc())) | predict(p) | rs1(s1), rt);  has_delay_slot(); }
24008
da7059252295 8038297: Avoid placing CTI immediately following cbcond instruction on T4
iveresov
parents: 22234
diff changeset
    91
inline void Assembler::bpr( RCondition c, bool a, Predict p, Register s1, Label& L) { insert_nop_after_cbcond(); bpr( c, a, p, s1, target(L)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
    93
inline void Assembler::fb( Condition c, bool a, address d, relocInfo::relocType rt ) { v9_dep();  insert_nop_after_cbcond(); cti(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(fb_op2) | wdisp(intptr_t(d), intptr_t(pc()), 22), rt);  has_delay_slot(); }
24008
da7059252295 8038297: Avoid placing CTI immediately following cbcond instruction on T4
iveresov
parents: 22234
diff changeset
    94
inline void Assembler::fb( Condition c, bool a, Label& L ) { insert_nop_after_cbcond(); fb(c, a, target(L)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
    96
inline void Assembler::fbp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt ) { insert_nop_after_cbcond(); cti(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(fbp_op2) | branchcc(cc) | predict(p) | wdisp(intptr_t(d), intptr_t(pc()), 19), rt);  has_delay_slot(); }
24008
da7059252295 8038297: Avoid placing CTI immediately following cbcond instruction on T4
iveresov
parents: 22234
diff changeset
    97
inline void Assembler::fbp( Condition c, bool a, CC cc, Predict p, Label& L ) { insert_nop_after_cbcond(); fbp(c, a, cc, p, target(L)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
    99
inline void Assembler::br( Condition c, bool a, address d, relocInfo::relocType rt ) { v9_dep(); insert_nop_after_cbcond(); cti(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(br_op2) | wdisp(intptr_t(d), intptr_t(pc()), 22), rt);  has_delay_slot(); }
24008
da7059252295 8038297: Avoid placing CTI immediately following cbcond instruction on T4
iveresov
parents: 22234
diff changeset
   100
inline void Assembler::br( Condition c, bool a, Label& L ) { insert_nop_after_cbcond(); br(c, a, target(L)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   102
inline void Assembler::bp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt ) { insert_nop_after_cbcond(); cti(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(bp_op2) | branchcc(cc) | predict(p) | wdisp(intptr_t(d), intptr_t(pc()), 19), rt);  has_delay_slot(); }
24008
da7059252295 8038297: Avoid placing CTI immediately following cbcond instruction on T4
iveresov
parents: 22234
diff changeset
   103
inline void Assembler::bp( Condition c, bool a, CC cc, Predict p, Label& L ) { insert_nop_after_cbcond(); bp(c, a, cc, p, target(L)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 9976
diff changeset
   105
// compare and branch
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   106
inline void Assembler::cbcond(Condition c, CC cc, Register s1, Register s2, Label& L) { cti();  no_cbcond_before(); emit_data(op(branch_op) | cond_cbcond(c) | op2(bpr_op2) | branchcc(cc) | wdisp10(intptr_t(target(L)), intptr_t(pc())) | rs1(s1) | rs2(s2)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   107
inline void Assembler::cbcond(Condition c, CC cc, Register s1, int simm5, Label& L)   { cti();  no_cbcond_before(); emit_data(op(branch_op) | cond_cbcond(c) | op2(bpr_op2) | branchcc(cc) | wdisp10(intptr_t(target(L)), intptr_t(pc())) | rs1(s1) | immed(true) | simm(simm5, 5)); }
10252
0981ce1c3eef 7063628: Use cbcond on T4
kvn
parents: 9976
diff changeset
   108
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   109
inline void Assembler::call( address d,  relocInfo::relocType rt ) { insert_nop_after_cbcond(); cti(); emit_data( op(call_op) | wdisp(intptr_t(d), intptr_t(pc()), 30), rt);  has_delay_slot(); assert(rt != relocInfo::virtual_call_type, "must use virtual_call_Relocation::spec"); }
24008
da7059252295 8038297: Avoid placing CTI immediately following cbcond instruction on T4
iveresov
parents: 22234
diff changeset
   110
inline void Assembler::call( Label& L,   relocInfo::relocType rt ) { insert_nop_after_cbcond(); call( target(L), rt); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   112
inline void Assembler::call( address d,  RelocationHolder const& rspec ) { insert_nop_after_cbcond(); cti(); emit_data( op(call_op) | wdisp(intptr_t(d), intptr_t(pc()), 30), rspec);  has_delay_slot(); assert(rspec.type() != relocInfo::virtual_call_type, "must use virtual_call_Relocation::spec"); }
35086
bbf32241d851 8072008: Emit direct call instead of linkTo* for recursive indy/MH.invoke* calls
vlivanov
parents: 24008
diff changeset
   113
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   114
inline void Assembler::casa(  Register s1, Register s2, Register d, int ia ) { emit_int32( op(ldst_op) | rd(d) | op3(casa_op3 ) | rs1(s1) | (ia == -1  ? immed(true) : imm_asi(ia)) | rs2(s2)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   115
inline void Assembler::casxa( Register s1, Register s2, Register d, int ia ) { emit_int32( op(ldst_op) | rd(d) | op3(casxa_op3) | rs1(s1) | (ia == -1  ? immed(true) : imm_asi(ia)) | rs2(s2)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   116
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   117
inline void Assembler::udiv(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(udiv_op3             ) | rs1(s1) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   118
inline void Assembler::udiv(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(udiv_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   119
inline void Assembler::sdiv(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sdiv_op3             ) | rs1(s1) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   120
inline void Assembler::sdiv(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sdiv_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   121
inline void Assembler::udivcc( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(udiv_op3 | cc_bit_op3) | rs1(s1) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   122
inline void Assembler::udivcc( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(udiv_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   123
inline void Assembler::sdivcc( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sdiv_op3 | cc_bit_op3) | rs1(s1) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   124
inline void Assembler::sdivcc( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sdiv_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   125
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   126
inline void Assembler::done()  { cti(); emit_int32( op(arith_op) | fcn(0) | op3(done_op3) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   127
inline void Assembler::retry() { cti(); emit_int32( op(arith_op) | fcn(1) | op3(retry_op3) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   128
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   129
inline void Assembler::fadd( FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | fs1(s1, w) | opf(0x40 + w) | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   130
inline void Assembler::fsub( FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | fs1(s1, w) | opf(0x44 + w) | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   131
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   132
inline void Assembler::fcmp(  FloatRegisterImpl::Width w, CC cc, FloatRegister s1, FloatRegister s2) { emit_int32( op(arith_op) | cmpcc(cc) | op3(fpop2_op3) | fs1(s1, w) | opf(0x50 + w) | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   133
inline void Assembler::fcmpe( FloatRegisterImpl::Width w, CC cc, FloatRegister s1, FloatRegister s2) { emit_int32( op(arith_op) | cmpcc(cc) | op3(fpop2_op3) | fs1(s1, w) | opf(0x54 + w) | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   134
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   135
inline void Assembler::ftox( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(fpop1_op3) | opf(0x80 + w) | fs2(s, w)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   136
inline void Assembler::ftoi( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::S) | op3(fpop1_op3) | opf(0xd0 + w) | fs2(s, w)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   137
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   138
inline void Assembler::ftof( FloatRegisterImpl::Width sw, FloatRegisterImpl::Width dw, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, dw) | op3(fpop1_op3) | opf(0xc0 + sw + dw*4) | fs2(s, sw)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   139
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   140
inline void Assembler::fxtof( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | opf(0x80 + w*4) | fs2(s, FloatRegisterImpl::D)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   141
inline void Assembler::fitof( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | opf(0xc0 + w*4) | fs2(s, FloatRegisterImpl::S)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   142
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   143
inline void Assembler::fmov( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | opf(0x00 + w) | fs2(s, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   144
inline void Assembler::fneg( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | opf(0x04 + w) | fs2(s, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   145
inline void Assembler::fabs( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | opf(0x08 + w) | fs2(s, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   146
inline void Assembler::fmul( FloatRegisterImpl::Width w,                            FloatRegister s1, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w)  | op3(fpop1_op3) | fs1(s1, w)  | opf(0x48 + w)         | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   147
inline void Assembler::fmul( FloatRegisterImpl::Width sw, FloatRegisterImpl::Width dw,  FloatRegister s1, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, dw) | op3(fpop1_op3) | fs1(s1, sw) | opf(0x60 + sw + dw*4) | fs2(s2, sw)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   148
inline void Assembler::fdiv( FloatRegisterImpl::Width w,                            FloatRegister s1, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w)  | op3(fpop1_op3) | fs1(s1, w)  | opf(0x4c + w)         | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   149
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   150
inline void Assembler::fxor( FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister s2, FloatRegister d ) { vis1_only(); emit_int32( op(arith_op) | fd(d, w) | op3(flog3_op3) | fs1(s1, w) | opf(0x6E - w) | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   151
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   152
inline void Assembler::fsqrt( FloatRegisterImpl::Width w, FloatRegister s, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop1_op3) | opf(0x28 + w) | fs2(s, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   153
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   154
inline void Assembler::flush( Register s1, Register s2) { emit_int32( op(arith_op) | op3(flush_op3) | rs1(s1) | rs2(s2)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
inline void Assembler::flush( Register s1, int simm13a) { emit_data( op(arith_op) | op3(flush_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   157
inline void Assembler::flushw() { emit_int32( op(arith_op) | op3(flushw_op3) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   158
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   159
inline void Assembler::illtrap( int const22a) { emit_int32( op(branch_op) | u_field(const22a, 21, 0) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   160
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   161
inline void Assembler::impdep1( int id1, int const19a ) { emit_int32( op(arith_op) | fcn(id1) | op3(impdep1_op3) | u_field(const19a, 18, 0)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   162
inline void Assembler::impdep2( int id1, int const19a ) { emit_int32( op(arith_op) | fcn(id1) | op3(impdep2_op3) | u_field(const19a, 18, 0)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   163
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   164
inline void Assembler::jmpl( Register s1, Register s2, Register d ) { insert_nop_after_cbcond(); cti(); emit_int32( op(arith_op) | rd(d) | op3(jmpl_op3) | rs1(s1) | rs2(s2));  has_delay_slot(); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   165
inline void Assembler::jmpl( Register s1, int simm13a, Register d, RelocationHolder const& rspec ) { insert_nop_after_cbcond(); cti(); emit_data( op(arith_op) | rd(d) | op3(jmpl_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec);  has_delay_slot(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   167
inline void Assembler::ldf(FloatRegisterImpl::Width w, Register s1, Register s2, FloatRegister d) { emit_int32( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | rs2(s2) ); }
2571
d602ad6538bd 6822110: Add AddressLiteral class on SPARC
twisti
parents: 2534
diff changeset
   168
inline void Assembler::ldf(FloatRegisterImpl::Width w, Register s1, int simm13a, FloatRegister d, RelocationHolder const& rspec) { emit_data( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   170
inline void Assembler::ldxfsr( Register s1, Register s2) { emit_int32( op(ldst_op) | rd(G1)    | op3(ldfsr_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   171
inline void Assembler::ldxfsr( Register s1, int simm13a) { emit_data( op(ldst_op) | rd(G1)    | op3(ldfsr_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   173
inline void Assembler::ldfa(  FloatRegisterImpl::Width w, Register s1, Register s2, int ia, FloatRegister d ) { emit_int32( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3 | alt_bit_op3, w) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   174
inline void Assembler::ldfa(  FloatRegisterImpl::Width w, Register s1, int simm13a,         FloatRegister d ) { emit_int32( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3 | alt_bit_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   175
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   176
inline void Assembler::ldsb(  Register s1, Register s2, Register d) { emit_int32( op(ldst_op) | rd(d) | op3(ldsb_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
inline void Assembler::ldsb(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldsb_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   179
inline void Assembler::ldsh(  Register s1, Register s2, Register d) { emit_int32( op(ldst_op) | rd(d) | op3(ldsh_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
inline void Assembler::ldsh(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldsh_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   181
inline void Assembler::ldsw(  Register s1, Register s2, Register d) { emit_int32( op(ldst_op) | rd(d) | op3(ldsw_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
inline void Assembler::ldsw(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldsw_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   183
inline void Assembler::ldub(  Register s1, Register s2, Register d) { emit_int32( op(ldst_op) | rd(d) | op3(ldub_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
inline void Assembler::ldub(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldub_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   185
inline void Assembler::lduh(  Register s1, Register s2, Register d) { emit_int32( op(ldst_op) | rd(d) | op3(lduh_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
inline void Assembler::lduh(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(lduh_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   187
inline void Assembler::lduw(  Register s1, Register s2, Register d) { emit_int32( op(ldst_op) | rd(d) | op3(lduw_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
inline void Assembler::lduw(  Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(lduw_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   190
inline void Assembler::ldx(   Register s1, Register s2, Register d) { emit_int32( op(ldst_op) | rd(d) | op3(ldx_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   191
inline void Assembler::ldx(   Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldx_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   192
inline void Assembler::ldd(   Register s1, Register s2, Register d) { v9_dep(); assert(d->is_even(), "not even"); emit_int32( op(ldst_op) | rd(d) | op3(ldd_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
inline void Assembler::ldd(   Register s1, int simm13a, Register d) { v9_dep(); assert(d->is_even(), "not even"); emit_data( op(ldst_op) | rd(d) | op3(ldd_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   195
inline void Assembler::ldsba(  Register s1, Register s2, int ia, Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldsb_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   196
inline void Assembler::ldsba(  Register s1, int simm13a,         Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldsb_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   197
inline void Assembler::ldsha(  Register s1, Register s2, int ia, Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldsh_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   198
inline void Assembler::ldsha(  Register s1, int simm13a,         Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldsh_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   199
inline void Assembler::ldswa(  Register s1, Register s2, int ia, Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldsw_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   200
inline void Assembler::ldswa(  Register s1, int simm13a,         Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldsw_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   201
inline void Assembler::lduba(  Register s1, Register s2, int ia, Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldub_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   202
inline void Assembler::lduba(  Register s1, int simm13a,         Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldub_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   203
inline void Assembler::lduha(  Register s1, Register s2, int ia, Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(lduh_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   204
inline void Assembler::lduha(  Register s1, int simm13a,         Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(lduh_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   205
inline void Assembler::lduwa(  Register s1, Register s2, int ia, Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(lduw_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   206
inline void Assembler::lduwa(  Register s1, int simm13a,         Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(lduw_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   207
inline void Assembler::ldxa(   Register s1, Register s2, int ia, Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldx_op3  | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   208
inline void Assembler::ldxa(   Register s1, int simm13a,         Register d ) { emit_int32( op(ldst_op) | rd(d) | op3(ldx_op3  | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   209
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   210
inline void Assembler::and3(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(and_op3              ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   211
inline void Assembler::and3(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(and_op3              ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   212
inline void Assembler::andcc(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(and_op3  | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   213
inline void Assembler::andcc(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(and_op3  | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   214
inline void Assembler::andn(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(andn_op3             ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   215
inline void Assembler::andn(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(andn_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   216
inline void Assembler::andncc(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(andn_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   217
inline void Assembler::andncc(  Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(andn_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   218
inline void Assembler::or3(     Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(or_op3               ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   219
inline void Assembler::or3(     Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(or_op3               ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   220
inline void Assembler::orcc(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(or_op3   | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   221
inline void Assembler::orcc(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(or_op3   | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   222
inline void Assembler::orn(     Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(orn_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   223
inline void Assembler::orn(     Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(orn_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   224
inline void Assembler::orncc(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(orn_op3  | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   225
inline void Assembler::orncc(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(orn_op3  | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   226
inline void Assembler::xor3(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xor_op3              ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   227
inline void Assembler::xor3(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xor_op3              ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   228
inline void Assembler::xorcc(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xor_op3  | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   229
inline void Assembler::xorcc(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xor_op3  | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   230
inline void Assembler::xnor(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xnor_op3             ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   231
inline void Assembler::xnor(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xnor_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   232
inline void Assembler::xnorcc(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xnor_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   233
inline void Assembler::xnorcc(  Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(xnor_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   234
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   235
inline void Assembler::membar( Membar_mask_bits const7a ) { emit_int32( op(arith_op) | op3(membar_op3) | rs1(O7) | immed(true) | u_field( int(const7a), 6, 0)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   236
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   237
inline void Assembler::fmov( FloatRegisterImpl::Width w, Condition c,  bool floatCC, CC cca, FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop2_op3) | cond_mov(c) | opf_cc(cca, floatCC) | opf_low6(w) | fs2(s2, w)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   238
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   239
inline void Assembler::fmov( FloatRegisterImpl::Width w, RCondition c, Register s1,  FloatRegister s2, FloatRegister d ) { emit_int32( op(arith_op) | fd(d, w) | op3(fpop2_op3) | rs1(s1) | rcond(c) | opf_low5(4 + w) | fs2(s2, w)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   240
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   241
inline void Assembler::movcc( Condition c, bool floatCC, CC cca, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(movcc_op3) | mov_cc(cca, floatCC) | cond_mov(c) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   242
inline void Assembler::movcc( Condition c, bool floatCC, CC cca, int simm11a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(movcc_op3) | mov_cc(cca, floatCC) | cond_mov(c) | immed(true) | simm(simm11a, 11) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   243
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   244
inline void Assembler::movr( RCondition c, Register s1, Register s2,  Register d ) { emit_int32( op(arith_op) | rd(d) | op3(movr_op3) | rs1(s1) | rcond(c) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   245
inline void Assembler::movr( RCondition c, Register s1, int simm10a,  Register d ) { emit_int32( op(arith_op) | rd(d) | op3(movr_op3) | rs1(s1) | rcond(c) | immed(true) | simm(simm10a, 10) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   246
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   247
inline void Assembler::mulx(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(mulx_op3 ) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   248
inline void Assembler::mulx(  Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(mulx_op3 ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   249
inline void Assembler::sdivx( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sdivx_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   250
inline void Assembler::sdivx( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sdivx_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   251
inline void Assembler::udivx( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(udivx_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   252
inline void Assembler::udivx( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(udivx_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   253
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   254
inline void Assembler::umul(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(umul_op3             ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   255
inline void Assembler::umul(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(umul_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   256
inline void Assembler::smul(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(smul_op3             ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   257
inline void Assembler::smul(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(smul_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   258
inline void Assembler::umulcc( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(umul_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   259
inline void Assembler::umulcc( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(umul_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   260
inline void Assembler::smulcc( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(smul_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   261
inline void Assembler::smulcc( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(smul_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   262
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   263
inline void Assembler::nop() { emit_int32( op(branch_op) | op2(sethi_op2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   264
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   265
inline void Assembler::sw_count() { emit_int32( op(branch_op) | op2(sethi_op2) | 0x3f0 ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   266
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   267
inline void Assembler::popc( Register s,  Register d) { emit_int32( op(arith_op) | rd(d) | op3(popc_op3) | rs2(s)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   268
inline void Assembler::popc( int simm13a, Register d) { emit_int32( op(arith_op) | rd(d) | op3(popc_op3) | immed(true) | simm(simm13a, 13)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   269
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   270
inline void Assembler::prefetch(   Register s1, Register s2, PrefetchFcn f) { emit_int32( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   271
inline void Assembler::prefetch(   Register s1, int simm13a, PrefetchFcn f) { emit_data( op(ldst_op) | fcn(f) | op3(prefetch_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   272
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   273
inline void Assembler::prefetcha(  Register s1, Register s2, int ia, PrefetchFcn f ) { emit_int32( op(ldst_op) | fcn(f) | op3(prefetch_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   274
inline void Assembler::prefetcha(  Register s1, int simm13a,         PrefetchFcn f ) { emit_int32( op(ldst_op) | fcn(f) | op3(prefetch_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   275
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   276
inline void Assembler::rdy(    Register d) { v9_dep(); emit_int32( op(arith_op) | rd(d) | op3(rdreg_op3) | u_field(0, 18, 14)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   277
inline void Assembler::rdccr(  Register d) { emit_int32( op(arith_op) | rd(d) | op3(rdreg_op3) | u_field(2, 18, 14)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   278
inline void Assembler::rdasi(  Register d) { emit_int32( op(arith_op) | rd(d) | op3(rdreg_op3) | u_field(3, 18, 14)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   279
inline void Assembler::rdtick( Register d) { emit_int32( op(arith_op) | rd(d) | op3(rdreg_op3) | u_field(4, 18, 14)); } // Spoon!
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   280
inline void Assembler::rdpc(   Register d) { emit_int32( op(arith_op) | rd(d) | op3(rdreg_op3) | u_field(5, 18, 14)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   281
inline void Assembler::rdfprs( Register d) { emit_int32( op(arith_op) | rd(d) | op3(rdreg_op3) | u_field(6, 18, 14)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   282
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   283
inline void Assembler::rett( Register s1, Register s2                         ) { cti(); emit_int32( op(arith_op) | op3(rett_op3) | rs1(s1) | rs2(s2));  has_delay_slot(); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   284
inline void Assembler::rett( Register s1, int simm13a, relocInfo::relocType rt) { cti(); emit_data( op(arith_op) | op3(rett_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rt);  has_delay_slot(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   286
inline void Assembler::save(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(save_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   287
inline void Assembler::save(    Register s1, int simm13a, Register d ) {
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   288
  // make sure frame is at least large enough for the register save area
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   289
  assert(-simm13a >= 16 * wordSize, "frame too small");
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   290
  emit_int32( op(arith_op) | rd(d) | op3(save_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) );
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   291
}
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   292
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   293
inline void Assembler::restore( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(restore_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   294
inline void Assembler::restore( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(restore_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   295
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   296
// pp 216
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   297
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   298
inline void Assembler::saved()    { emit_int32( op(arith_op) | fcn(0) | op3(saved_op3)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   299
inline void Assembler::restored() { emit_int32( op(arith_op) | fcn(1) | op3(saved_op3)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   300
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
inline void Assembler::sethi( int imm22a, Register d, RelocationHolder const& rspec ) { emit_data( op(branch_op) | rd(d) | op2(sethi_op2) | hi22(imm22a), rspec); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   303
inline void Assembler::sll(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sll_op3) | rs1(s1) | sx(0) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   304
inline void Assembler::sll(  Register s1, int imm5a,   Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sll_op3) | rs1(s1) | sx(0) | immed(true) | u_field(imm5a, 4, 0) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   305
inline void Assembler::srl(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(srl_op3) | rs1(s1) | sx(0) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   306
inline void Assembler::srl(  Register s1, int imm5a,   Register d ) { emit_int32( op(arith_op) | rd(d) | op3(srl_op3) | rs1(s1) | sx(0) | immed(true) | u_field(imm5a, 4, 0) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   307
inline void Assembler::sra(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sra_op3) | rs1(s1) | sx(0) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   308
inline void Assembler::sra(  Register s1, int imm5a,   Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sra_op3) | rs1(s1) | sx(0) | immed(true) | u_field(imm5a, 4, 0) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   309
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   310
inline void Assembler::sllx( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sll_op3) | rs1(s1) | sx(1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   311
inline void Assembler::sllx( Register s1, int imm6a,   Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sll_op3) | rs1(s1) | sx(1) | immed(true) | u_field(imm6a, 5, 0) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   312
inline void Assembler::srlx( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(srl_op3) | rs1(s1) | sx(1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   313
inline void Assembler::srlx( Register s1, int imm6a,   Register d ) { emit_int32( op(arith_op) | rd(d) | op3(srl_op3) | rs1(s1) | sx(1) | immed(true) | u_field(imm6a, 5, 0) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   314
inline void Assembler::srax( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sra_op3) | rs1(s1) | sx(1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   315
inline void Assembler::srax( Register s1, int imm6a,   Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sra_op3) | rs1(s1) | sx(1) | immed(true) | u_field(imm6a, 5, 0) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   316
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   317
inline void Assembler::sir( int simm13a ) { emit_int32( op(arith_op) | fcn(15) | op3(sir_op3) | immed(true) | simm(simm13a, 13)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   318
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   319
  // pp 221
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   320
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   321
inline void Assembler::stbar() { emit_int32( op(arith_op) | op3(membar_op3) | u_field(15, 18, 14)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   322
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
  // pp 222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   325
inline void Assembler::stf(    FloatRegisterImpl::Width w, FloatRegister d, Register s1, Register s2) { emit_int32( op(ldst_op) | fd(d, w) | alt_op3(stf_op3, w) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
inline void Assembler::stf(    FloatRegisterImpl::Width w, FloatRegister d, Register s1, int simm13a) { emit_data( op(ldst_op) | fd(d, w) | alt_op3(stf_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   328
inline void Assembler::stxfsr( Register s1, Register s2) { emit_int32( op(ldst_op) | rd(G1)    | op3(stfsr_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   329
inline void Assembler::stxfsr( Register s1, int simm13a) { emit_data( op(ldst_op) | rd(G1)    | op3(stfsr_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   331
inline void Assembler::stfa(  FloatRegisterImpl::Width w, FloatRegister d, Register s1, Register s2, int ia ) { emit_int32( op(ldst_op) | fd(d, w) | alt_op3(stf_op3 | alt_bit_op3, w) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   332
inline void Assembler::stfa(  FloatRegisterImpl::Width w, FloatRegister d, Register s1, int simm13a         ) { emit_int32( op(ldst_op) | fd(d, w) | alt_op3(stf_op3 | alt_bit_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   333
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
  // p 226
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   336
inline void Assembler::stb(  Register d, Register s1, Register s2) { emit_int32( op(ldst_op) | rd(d) | op3(stb_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
inline void Assembler::stb(  Register d, Register s1, int simm13a) { emit_data( op(ldst_op) | rd(d) | op3(stb_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   338
inline void Assembler::sth(  Register d, Register s1, Register s2) { emit_int32( op(ldst_op) | rd(d) | op3(sth_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
inline void Assembler::sth(  Register d, Register s1, int simm13a) { emit_data( op(ldst_op) | rd(d) | op3(sth_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   340
inline void Assembler::stw(  Register d, Register s1, Register s2) { emit_int32( op(ldst_op) | rd(d) | op3(stw_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
inline void Assembler::stw(  Register d, Register s1, int simm13a) { emit_data( op(ldst_op) | rd(d) | op3(stw_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   344
inline void Assembler::stx(  Register d, Register s1, Register s2) { emit_int32( op(ldst_op) | rd(d) | op3(stx_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   345
inline void Assembler::stx(  Register d, Register s1, int simm13a) { emit_data( op(ldst_op) | rd(d) | op3(stx_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
15116
af423dcb739c 8004537: replace AbstractAssembler emit_long with emit_int32
twisti
parents: 14631
diff changeset
   346
inline void Assembler::std(  Register d, Register s1, Register s2) { v9_dep(); assert(d->is_even(), "not even"); emit_int32( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | rs2(s2) ); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
inline void Assembler::std(  Register d, Register s1, int simm13a) { v9_dep(); assert(d->is_even(), "not even"); emit_data( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   349
inline void Assembler::stba(  Register d, Register s1, Register s2, int ia ) { emit_int32( op(ldst_op) | rd(d) | op3(stb_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   350
inline void Assembler::stba(  Register d, Register s1, int simm13a         ) { emit_int32( op(ldst_op) | rd(d) | op3(stb_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   351
inline void Assembler::stha(  Register d, Register s1, Register s2, int ia ) { emit_int32( op(ldst_op) | rd(d) | op3(sth_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   352
inline void Assembler::stha(  Register d, Register s1, int simm13a         ) { emit_int32( op(ldst_op) | rd(d) | op3(sth_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   353
inline void Assembler::stwa(  Register d, Register s1, Register s2, int ia ) { emit_int32( op(ldst_op) | rd(d) | op3(stw_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   354
inline void Assembler::stwa(  Register d, Register s1, int simm13a         ) { emit_int32( op(ldst_op) | rd(d) | op3(stw_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   355
inline void Assembler::stxa(  Register d, Register s1, Register s2, int ia ) { emit_int32( op(ldst_op) | rd(d) | op3(stx_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   356
inline void Assembler::stxa(  Register d, Register s1, int simm13a         ) { emit_int32( op(ldst_op) | rd(d) | op3(stx_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   357
inline void Assembler::stda(  Register d, Register s1, Register s2, int ia ) { emit_int32( op(ldst_op) | rd(d) | op3(std_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   358
inline void Assembler::stda(  Register d, Register s1, int simm13a         ) { emit_int32( op(ldst_op) | rd(d) | op3(std_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   359
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   360
// pp 230
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   361
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   362
inline void Assembler::sub(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sub_op3              ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   363
inline void Assembler::sub(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sub_op3              ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   364
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   365
inline void Assembler::subcc(  Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sub_op3 | cc_bit_op3 ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   366
inline void Assembler::subcc(  Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(sub_op3 | cc_bit_op3 ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   367
inline void Assembler::subc(   Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(subc_op3             ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   368
inline void Assembler::subc(   Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(subc_op3             ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   369
inline void Assembler::subccc( Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(subc_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   370
inline void Assembler::subccc( Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(subc_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   371
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
// pp 231
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   374
inline void Assembler::swap(    Register s1, Register s2, Register d) { v9_dep(); emit_int32( op(ldst_op) | rd(d) | op3(swap_op3) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   375
inline void Assembler::swap(    Register s1, int simm13a, Register d) { v9_dep(); emit_data( op(ldst_op) | rd(d) | op3(swap_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   377
inline void Assembler::swapa(   Register s1, Register s2, int ia, Register d ) { v9_dep(); emit_int32( op(ldst_op) | rd(d) | op3(swap_op3 | alt_bit_op3) | rs1(s1) | imm_asi(ia) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   378
inline void Assembler::swapa(   Register s1, int simm13a,         Register d ) { v9_dep(); emit_int32( op(ldst_op) | rd(d) | op3(swap_op3 | alt_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   379
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   380
// pp 234, note op in book is wrong, see pp 268
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   381
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   382
inline void Assembler::taddcc(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(taddcc_op3  ) | rs1(s1) | rs2(s2) ); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   383
inline void Assembler::taddcc(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(taddcc_op3  ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   384
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   385
// pp 235
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   386
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   387
inline void Assembler::tsubcc(    Register s1, Register s2, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(tsubcc_op3  ) | rs1(s1) | rs2(s2) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   388
inline void Assembler::tsubcc(    Register s1, int simm13a, Register d ) { emit_int32( op(arith_op) | rd(d) | op3(tsubcc_op3  ) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   389
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   390
// pp 237
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   391
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   392
inline void Assembler::trap( Condition c, CC cc, Register s1, Register s2 ) { emit_int32( op(arith_op) | cond(c) | op3(trap_op3) | rs1(s1) | trapcc(cc) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   393
inline void Assembler::trap( Condition c, CC cc, Register s1, int trapa   ) { emit_int32( op(arith_op) | cond(c) | op3(trap_op3) | rs1(s1) | trapcc(cc) | immed(true) | u_field(trapa, 6, 0)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   394
// simple uncond. trap
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   395
inline void Assembler::trap( int trapa ) { trap( always, icc, G0, trapa ); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   396
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   397
inline void Assembler::wry(Register d) { v9_dep(); emit_int32(op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(0, 29, 25)); }
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   398
inline void Assembler::wrccr(Register s) { emit_int32(op(arith_op) | rs1(s) | op3(wrreg_op3) | u_field(2, 29, 25)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   399
inline void Assembler::wrccr(Register s, int simm13a) { emit_int32(op(arith_op) | rs1(s) | op3(wrreg_op3) | u_field(2, 29, 25) | immed(true) | simm(simm13a, 13)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   400
inline void Assembler::wrasi(Register d) { emit_int32(op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(3, 29, 25)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   401
// wrasi(d, imm) stores (d xor imm) to asi
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   402
inline void Assembler::wrasi(Register d, int simm13a) { emit_int32(op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(3, 29, 25) | immed(true) | simm(simm13a, 13)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   403
inline void Assembler::wrfprs(Register d) { emit_int32(op(arith_op) | rs1(d) | op3(wrreg_op3) | u_field(6, 29, 25)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   404
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   405
inline void Assembler::alignaddr( Register s1, Register s2, Register d ) { vis1_only(); emit_int32( op(arith_op) | rd(d) | op3(alignaddr_op3) | rs1(s1) | opf(alignaddr_opf) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   406
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   407
inline void Assembler::faligndata( FloatRegister s1, FloatRegister s2, FloatRegister d ) { vis1_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(faligndata_op3) | fs1(s1, FloatRegisterImpl::D) | opf(faligndata_opf) | fs2(s2, FloatRegisterImpl::D)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   408
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   409
inline void Assembler::fzero( FloatRegisterImpl::Width w, FloatRegister d ) { vis1_only(); emit_int32( op(arith_op) | fd(d, w) | op3(fzero_op3) | opf(0x62 - w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   410
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   411
inline void Assembler::fsrc2( FloatRegisterImpl::Width w, FloatRegister s2, FloatRegister d ) { vis1_only(); emit_int32( op(arith_op) | fd(d, w) | op3(fsrc_op3) | opf(0x7A - w) | fs2(s2, w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   412
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   413
inline void Assembler::fnot1( FloatRegisterImpl::Width w, FloatRegister s1, FloatRegister d ) { vis1_only(); emit_int32( op(arith_op) | fd(d, w) | op3(fnot_op3) | fs1(s1, w) | opf(0x6C - w)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   414
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   415
inline void Assembler::fpmerge( FloatRegister s1, FloatRegister s2, FloatRegister d ) { vis1_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(0x36) | fs1(s1, FloatRegisterImpl::S) | opf(0x4b) | fs2(s2, FloatRegisterImpl::S)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   416
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   417
inline void Assembler::stpartialf( Register s1, Register s2, FloatRegister d, int ia ) { vis1_only(); emit_int32( op(ldst_op) | fd(d, FloatRegisterImpl::D) | op3(stpartialf_op3) | rs1(s1) | imm_asi(ia) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   418
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   419
//  VIS2 instructions
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   420
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   421
inline void Assembler::edge8n( Register s1, Register s2, Register d ) { vis2_only(); emit_int32( op(arith_op) | rd(d) | op3(edge_op3) | rs1(s1) | opf(edge8n_opf) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   422
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   423
inline void Assembler::bmask( Register s1, Register s2, Register d ) { vis2_only(); emit_int32( op(arith_op) | rd(d) | op3(bmask_op3) | rs1(s1) | opf(bmask_opf) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   424
inline void Assembler::bshuffle( FloatRegister s1, FloatRegister s2, FloatRegister d ) { vis2_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(bshuffle_op3) | fs1(s1, FloatRegisterImpl::D) | opf(bshuffle_opf) | fs2(s2, FloatRegisterImpl::D)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   425
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   426
// VIS3 instructions
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   427
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   428
inline void Assembler::movstosw( FloatRegister s, Register d ) { vis3_only(); emit_int32( op(arith_op) | rd(d) | op3(mftoi_op3) | opf(mstosw_opf) | fs2(s, FloatRegisterImpl::S)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   429
inline void Assembler::movstouw( FloatRegister s, Register d ) { vis3_only(); emit_int32( op(arith_op) | rd(d) | op3(mftoi_op3) | opf(mstouw_opf) | fs2(s, FloatRegisterImpl::S)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   430
inline void Assembler::movdtox(  FloatRegister s, Register d ) { vis3_only(); emit_int32( op(arith_op) | rd(d) | op3(mftoi_op3) | opf(mdtox_opf) | fs2(s, FloatRegisterImpl::D)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   431
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   432
inline void Assembler::movwtos( Register s, FloatRegister d ) { vis3_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::S) | op3(mftoi_op3) | opf(mwtos_opf) | rs2(s)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   433
inline void Assembler::movxtod( Register s, FloatRegister d ) { vis3_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(mftoi_op3) | opf(mxtod_opf) | rs2(s)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   434
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   435
inline void Assembler::xmulx(Register s1, Register s2, Register d) { vis3_only(); emit_int32( op(arith_op) | rd(d) | op3(xmulx_op3) | rs1(s1) | opf(xmulx_opf) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   436
inline void Assembler::xmulxhi(Register s1, Register s2, Register d) { vis3_only(); emit_int32( op(arith_op) | rd(d) | op3(xmulx_op3) | rs1(s1) | opf(xmulxhi_opf) | rs2(s2)); }
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   437
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   438
// Crypto SHA instructions
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   439
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   440
inline void Assembler::sha1()   { sha1_only();   emit_int32( op(arith_op) | op3(sha_op3) | opf(sha1_opf)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   441
inline void Assembler::sha256() { sha256_only(); emit_int32( op(arith_op) | op3(sha_op3) | opf(sha256_opf)); }
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   442
inline void Assembler::sha512() { sha512_only(); emit_int32( op(arith_op) | op3(sha_op3) | opf(sha512_opf)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   443
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   444
// CRC32C instruction
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   445
46594
697dad96a3df 8181853: Remove use of 'v9_only()'
neliasso
parents: 35090
diff changeset
   446
inline void Assembler::crc32c( FloatRegister s1, FloatRegister s2, FloatRegister d ) { crc32c_only(); emit_int32( op(arith_op) | fd(d, FloatRegisterImpl::D) | op3(crc32c_op3) | fs1(s1, FloatRegisterImpl::D) | opf(crc32c_opf) | fs2(s2, FloatRegisterImpl::D)); }
35090
1f5b6aa795d0 8144748: Move assembler/macroAssembler inline function definitions to corresponding inline.hpp files
mikael
parents: 35086
diff changeset
   447
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 7112
diff changeset
   448
#endif // CPU_SPARC_VM_ASSEMBLER_SPARC_INLINE_HPP