hotspot/src/cpu/x86/vm/x86.ad
author kvn
Fri, 23 Dec 2011 15:24:36 -0800
changeset 11434 c50976508b6b
parent 11429 e894217a5d94
child 11794 72249bf6ab83
permissions -rw-r--r--
7110832: ctw/.../org_apache_avalon_composition_util_StringHelper crashes the VM Summary: Distance is too large for one short branch in string_indexofC8(). Reviewed-by: iveresov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11429
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     1
//
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     2
// Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     3
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     4
//
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     5
// This code is free software; you can redistribute it and/or modify it
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     6
// under the terms of the GNU General Public License version 2 only, as
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     7
// published by the Free Software Foundation.
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     8
//
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
     9
// This code is distributed in the hope that it will be useful, but WITHOUT
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    10
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    11
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    12
// version 2 for more details (a copy is included in the LICENSE file that
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    13
// accompanied this code).
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    14
//
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    15
// You should have received a copy of the GNU General Public License version
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    16
// 2 along with this work; if not, write to the Free Software Foundation,
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    17
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    18
//
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    19
// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    20
// or visit www.oracle.com if you need additional information or have any
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    21
// questions.
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    22
//
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    23
//
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    24
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    25
// X86 Common Architecture Description File
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    26
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    27
source %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    28
  // Float masks come from different places depending on platform.
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    29
#ifdef _LP64
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    30
  static address float_signmask()  { return StubRoutines::x86::float_sign_mask(); }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    31
  static address float_signflip()  { return StubRoutines::x86::float_sign_flip(); }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    32
  static address double_signmask() { return StubRoutines::x86::double_sign_mask(); }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    33
  static address double_signflip() { return StubRoutines::x86::double_sign_flip(); }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    34
#else
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    35
  static address float_signmask()  { return (address)float_signmask_pool; }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    36
  static address float_signflip()  { return (address)float_signflip_pool; }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    37
  static address double_signmask() { return (address)double_signmask_pool; }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    38
  static address double_signflip() { return (address)double_signflip_pool; }
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    39
#endif
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    40
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    41
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    42
// INSTRUCTIONS -- Platform independent definitions (same for 32- and 64-bit)
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    43
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    44
instruct addF_reg(regF dst, regF src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    45
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    46
  match(Set dst (AddF dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    47
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    48
  format %{ "addss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    49
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    50
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    51
    __ addss($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    52
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    53
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    54
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    55
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    56
instruct addF_mem(regF dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    57
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    58
  match(Set dst (AddF dst (LoadF src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    59
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    60
  format %{ "addss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    61
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    62
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    63
    __ addss($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    64
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    65
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    66
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    67
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    68
instruct addF_imm(regF dst, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    69
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    70
  match(Set dst (AddF dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    71
  format %{ "addss   $dst, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    72
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    73
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    74
    __ addss($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    75
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    76
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    77
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    78
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    79
instruct vaddF_reg(regF dst, regF src1, regF src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    80
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    81
  match(Set dst (AddF src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    82
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    83
  format %{ "vaddss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    84
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    85
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    86
    __ vaddss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    87
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    88
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    89
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    90
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    91
instruct vaddF_mem(regF dst, regF src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    92
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    93
  match(Set dst (AddF src1 (LoadF src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    94
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    95
  format %{ "vaddss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    96
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    97
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    98
    __ vaddss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
    99
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   100
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   101
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   102
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   103
instruct vaddF_imm(regF dst, regF src, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   104
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   105
  match(Set dst (AddF src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   106
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   107
  format %{ "vaddss  $dst, $src, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   108
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   109
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   110
    __ vaddss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   111
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   112
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   113
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   114
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   115
instruct addD_reg(regD dst, regD src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   116
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   117
  match(Set dst (AddD dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   118
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   119
  format %{ "addsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   120
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   121
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   122
    __ addsd($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   123
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   124
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   125
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   126
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   127
instruct addD_mem(regD dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   128
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   129
  match(Set dst (AddD dst (LoadD src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   130
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   131
  format %{ "addsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   132
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   133
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   134
    __ addsd($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   135
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   136
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   137
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   138
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   139
instruct addD_imm(regD dst, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   140
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   141
  match(Set dst (AddD dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   142
  format %{ "addsd   $dst, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   143
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   144
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   145
    __ addsd($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   146
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   147
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   148
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   149
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   150
instruct vaddD_reg(regD dst, regD src1, regD src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   151
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   152
  match(Set dst (AddD src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   153
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   154
  format %{ "vaddsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   155
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   156
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   157
    __ vaddsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   158
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   159
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   160
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   161
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   162
instruct vaddD_mem(regD dst, regD src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   163
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   164
  match(Set dst (AddD src1 (LoadD src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   165
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   166
  format %{ "vaddsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   167
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   168
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   169
    __ vaddsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   170
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   171
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   172
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   173
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   174
instruct vaddD_imm(regD dst, regD src, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   175
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   176
  match(Set dst (AddD src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   177
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   178
  format %{ "vaddsd  $dst, $src, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   179
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   180
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   181
    __ vaddsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   182
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   183
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   184
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   185
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   186
instruct subF_reg(regF dst, regF src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   187
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   188
  match(Set dst (SubF dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   189
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   190
  format %{ "subss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   191
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   192
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   193
    __ subss($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   194
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   195
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   196
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   197
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   198
instruct subF_mem(regF dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   199
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   200
  match(Set dst (SubF dst (LoadF src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   201
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   202
  format %{ "subss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   203
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   204
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   205
    __ subss($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   206
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   207
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   208
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   209
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   210
instruct subF_imm(regF dst, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   211
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   212
  match(Set dst (SubF dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   213
  format %{ "subss   $dst, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   214
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   215
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   216
    __ subss($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   217
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   218
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   219
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   220
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   221
instruct vsubF_reg(regF dst, regF src1, regF src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   222
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   223
  match(Set dst (SubF src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   224
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   225
  format %{ "vsubss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   226
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   227
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   228
    __ vsubss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   229
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   230
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   231
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   232
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   233
instruct vsubF_mem(regF dst, regF src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   234
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   235
  match(Set dst (SubF src1 (LoadF src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   236
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   237
  format %{ "vsubss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   238
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   239
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   240
    __ vsubss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   241
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   242
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   243
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   244
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   245
instruct vsubF_imm(regF dst, regF src, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   246
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   247
  match(Set dst (SubF src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   248
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   249
  format %{ "vsubss  $dst, $src, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   250
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   251
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   252
    __ vsubss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   253
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   254
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   255
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   256
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   257
instruct subD_reg(regD dst, regD src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   258
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   259
  match(Set dst (SubD dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   260
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   261
  format %{ "subsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   262
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   263
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   264
    __ subsd($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   265
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   266
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   267
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   268
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   269
instruct subD_mem(regD dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   270
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   271
  match(Set dst (SubD dst (LoadD src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   272
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   273
  format %{ "subsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   274
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   275
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   276
    __ subsd($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   277
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   278
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   279
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   280
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   281
instruct subD_imm(regD dst, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   282
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   283
  match(Set dst (SubD dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   284
  format %{ "subsd   $dst, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   285
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   286
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   287
    __ subsd($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   288
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   289
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   290
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   291
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   292
instruct vsubD_reg(regD dst, regD src1, regD src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   293
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   294
  match(Set dst (SubD src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   295
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   296
  format %{ "vsubsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   297
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   298
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   299
    __ vsubsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   300
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   301
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   302
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   303
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   304
instruct vsubD_mem(regD dst, regD src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   305
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   306
  match(Set dst (SubD src1 (LoadD src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   307
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   308
  format %{ "vsubsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   309
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   310
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   311
    __ vsubsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   312
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   313
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   314
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   315
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   316
instruct vsubD_imm(regD dst, regD src, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   317
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   318
  match(Set dst (SubD src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   319
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   320
  format %{ "vsubsd  $dst, $src, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   321
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   322
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   323
    __ vsubsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   324
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   325
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   326
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   327
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   328
instruct mulF_reg(regF dst, regF src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   329
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   330
  match(Set dst (MulF dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   331
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   332
  format %{ "mulss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   333
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   334
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   335
    __ mulss($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   336
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   337
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   338
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   339
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   340
instruct mulF_mem(regF dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   341
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   342
  match(Set dst (MulF dst (LoadF src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   343
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   344
  format %{ "mulss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   345
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   346
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   347
    __ mulss($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   348
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   349
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   350
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   351
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   352
instruct mulF_imm(regF dst, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   353
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   354
  match(Set dst (MulF dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   355
  format %{ "mulss   $dst, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   356
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   357
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   358
    __ mulss($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   359
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   360
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   361
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   362
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   363
instruct vmulF_reg(regF dst, regF src1, regF src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   364
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   365
  match(Set dst (MulF src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   366
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   367
  format %{ "vmulss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   368
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   369
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   370
    __ vmulss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   371
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   372
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   373
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   374
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   375
instruct vmulF_mem(regF dst, regF src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   376
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   377
  match(Set dst (MulF src1 (LoadF src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   378
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   379
  format %{ "vmulss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   380
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   381
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   382
    __ vmulss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   383
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   384
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   385
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   386
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   387
instruct vmulF_imm(regF dst, regF src, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   388
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   389
  match(Set dst (MulF src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   390
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   391
  format %{ "vmulss  $dst, $src, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   392
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   393
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   394
    __ vmulss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   395
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   396
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   397
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   398
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   399
instruct mulD_reg(regD dst, regD src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   400
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   401
  match(Set dst (MulD dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   402
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   403
  format %{ "mulsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   404
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   405
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   406
    __ mulsd($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   407
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   408
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   409
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   410
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   411
instruct mulD_mem(regD dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   412
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   413
  match(Set dst (MulD dst (LoadD src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   414
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   415
  format %{ "mulsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   416
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   417
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   418
    __ mulsd($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   419
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   420
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   421
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   422
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   423
instruct mulD_imm(regD dst, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   424
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   425
  match(Set dst (MulD dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   426
  format %{ "mulsd   $dst, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   427
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   428
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   429
    __ mulsd($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   430
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   431
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   432
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   433
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   434
instruct vmulD_reg(regD dst, regD src1, regD src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   435
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   436
  match(Set dst (MulD src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   437
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   438
  format %{ "vmulsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   439
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   440
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   441
    __ vmulsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   442
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   443
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   444
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   445
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   446
instruct vmulD_mem(regD dst, regD src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   447
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   448
  match(Set dst (MulD src1 (LoadD src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   449
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   450
  format %{ "vmulsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   451
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   452
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   453
    __ vmulsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   454
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   455
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   456
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   457
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   458
instruct vmulD_imm(regD dst, regD src, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   459
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   460
  match(Set dst (MulD src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   461
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   462
  format %{ "vmulsd  $dst, $src, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   463
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   464
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   465
    __ vmulsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   466
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   467
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   468
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   469
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   470
instruct divF_reg(regF dst, regF src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   471
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   472
  match(Set dst (DivF dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   473
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   474
  format %{ "divss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   475
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   476
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   477
    __ divss($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   478
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   479
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   480
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   481
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   482
instruct divF_mem(regF dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   483
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   484
  match(Set dst (DivF dst (LoadF src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   485
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   486
  format %{ "divss   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   487
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   488
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   489
    __ divss($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   490
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   491
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   492
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   493
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   494
instruct divF_imm(regF dst, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   495
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   496
  match(Set dst (DivF dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   497
  format %{ "divss   $dst, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   498
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   499
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   500
    __ divss($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   501
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   502
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   503
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   504
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   505
instruct vdivF_reg(regF dst, regF src1, regF src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   506
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   507
  match(Set dst (DivF src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   508
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   509
  format %{ "vdivss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   510
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   511
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   512
    __ vdivss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   513
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   514
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   515
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   516
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   517
instruct vdivF_mem(regF dst, regF src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   518
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   519
  match(Set dst (DivF src1 (LoadF src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   520
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   521
  format %{ "vdivss  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   522
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   523
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   524
    __ vdivss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   525
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   526
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   527
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   528
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   529
instruct vdivF_imm(regF dst, regF src, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   530
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   531
  match(Set dst (DivF src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   532
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   533
  format %{ "vdivss  $dst, $src, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   534
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   535
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   536
    __ vdivss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   537
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   538
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   539
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   540
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   541
instruct divD_reg(regD dst, regD src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   542
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   543
  match(Set dst (DivD dst src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   544
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   545
  format %{ "divsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   546
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   547
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   548
    __ divsd($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   549
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   550
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   551
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   552
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   553
instruct divD_mem(regD dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   554
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   555
  match(Set dst (DivD dst (LoadD src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   556
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   557
  format %{ "divsd   $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   558
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   559
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   560
    __ divsd($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   561
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   562
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   563
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   564
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   565
instruct divD_imm(regD dst, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   566
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   567
  match(Set dst (DivD dst con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   568
  format %{ "divsd   $dst, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   569
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   570
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   571
    __ divsd($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   572
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   573
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   574
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   575
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   576
instruct vdivD_reg(regD dst, regD src1, regD src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   577
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   578
  match(Set dst (DivD src1 src2));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   579
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   580
  format %{ "vdivsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   581
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   582
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   583
    __ vdivsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   584
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   585
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   586
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   587
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   588
instruct vdivD_mem(regD dst, regD src1, memory src2) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   589
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   590
  match(Set dst (DivD src1 (LoadD src2)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   591
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   592
  format %{ "vdivsd  $dst, $src1, $src2" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   593
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   594
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   595
    __ vdivsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   596
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   597
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   598
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   599
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   600
instruct vdivD_imm(regD dst, regD src, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   601
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   602
  match(Set dst (DivD src con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   603
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   604
  format %{ "vdivsd  $dst, $src, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   605
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   606
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   607
    __ vdivsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   608
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   609
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   610
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   611
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   612
instruct absF_reg(regF dst) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   613
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   614
  match(Set dst (AbsF dst));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   615
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   616
  format %{ "andps   $dst, [0x7fffffff]\t# abs float by sign masking" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   617
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   618
    __ andps($dst$$XMMRegister, ExternalAddress(float_signmask()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   619
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   620
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   621
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   622
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   623
instruct vabsF_reg(regF dst, regF src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   624
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   625
  match(Set dst (AbsF src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   626
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   627
  format %{ "vandps  $dst, $src, [0x7fffffff]\t# abs float by sign masking" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   628
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   629
    __ vandps($dst$$XMMRegister, $src$$XMMRegister,
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   630
              ExternalAddress(float_signmask()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   631
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   632
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   633
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   634
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   635
instruct absD_reg(regD dst) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   636
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   637
  match(Set dst (AbsD dst));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   638
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   639
  format %{ "andpd   $dst, [0x7fffffffffffffff]\t"
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   640
            "# abs double by sign masking" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   641
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   642
    __ andpd($dst$$XMMRegister, ExternalAddress(double_signmask()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   643
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   644
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   645
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   646
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   647
instruct vabsD_reg(regD dst, regD src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   648
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   649
  match(Set dst (AbsD src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   650
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   651
  format %{ "vandpd  $dst, $src, [0x7fffffffffffffff]\t"
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   652
            "# abs double by sign masking" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   653
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   654
    __ vandpd($dst$$XMMRegister, $src$$XMMRegister,
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   655
              ExternalAddress(double_signmask()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   656
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   657
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   658
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   659
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   660
instruct negF_reg(regF dst) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   661
  predicate((UseSSE>=1) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   662
  match(Set dst (NegF dst));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   663
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   664
  format %{ "xorps   $dst, [0x80000000]\t# neg float by sign flipping" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   665
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   666
    __ xorps($dst$$XMMRegister, ExternalAddress(float_signflip()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   667
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   668
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   669
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   670
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   671
instruct vnegF_reg(regF dst, regF src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   672
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   673
  match(Set dst (NegF src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   674
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   675
  format %{ "vxorps  $dst, $src, [0x80000000]\t# neg float by sign flipping" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   676
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   677
    __ vxorps($dst$$XMMRegister, $src$$XMMRegister,
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   678
              ExternalAddress(float_signflip()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   679
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   680
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   681
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   682
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   683
instruct negD_reg(regD dst) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   684
  predicate((UseSSE>=2) && (UseAVX == 0));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   685
  match(Set dst (NegD dst));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   686
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   687
  format %{ "xorpd   $dst, [0x8000000000000000]\t"
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   688
            "# neg double by sign flipping" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   689
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   690
    __ xorpd($dst$$XMMRegister, ExternalAddress(double_signflip()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   691
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   692
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   693
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   694
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   695
instruct vnegD_reg(regD dst, regD src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   696
  predicate(UseAVX > 0);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   697
  match(Set dst (NegD src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   698
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   699
  format %{ "vxorpd  $dst, $src, [0x8000000000000000]\t"
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   700
            "# neg double by sign flipping" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   701
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   702
    __ vxorpd($dst$$XMMRegister, $src$$XMMRegister,
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   703
              ExternalAddress(double_signflip()));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   704
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   705
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   706
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   707
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   708
instruct sqrtF_reg(regF dst, regF src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   709
  predicate(UseSSE>=1);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   710
  match(Set dst (ConvD2F (SqrtD (ConvF2D src))));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   711
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   712
  format %{ "sqrtss  $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   713
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   714
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   715
    __ sqrtss($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   716
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   717
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   718
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   719
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   720
instruct sqrtF_mem(regF dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   721
  predicate(UseSSE>=1);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   722
  match(Set dst (ConvD2F (SqrtD (ConvF2D (LoadF src)))));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   723
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   724
  format %{ "sqrtss  $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   725
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   726
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   727
    __ sqrtss($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   728
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   729
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   730
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   731
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   732
instruct sqrtF_imm(regF dst, immF con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   733
  predicate(UseSSE>=1);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   734
  match(Set dst (ConvD2F (SqrtD (ConvF2D con))));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   735
  format %{ "sqrtss  $dst, [$constantaddress]\t# load from constant table: float=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   736
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   737
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   738
    __ sqrtss($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   739
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   740
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   741
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   742
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   743
instruct sqrtD_reg(regD dst, regD src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   744
  predicate(UseSSE>=2);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   745
  match(Set dst (SqrtD src));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   746
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   747
  format %{ "sqrtsd  $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   748
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   749
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   750
    __ sqrtsd($dst$$XMMRegister, $src$$XMMRegister);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   751
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   752
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   753
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   754
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   755
instruct sqrtD_mem(regD dst, memory src) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   756
  predicate(UseSSE>=2);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   757
  match(Set dst (SqrtD (LoadD src)));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   758
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   759
  format %{ "sqrtsd  $dst, $src" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   760
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   761
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   762
    __ sqrtsd($dst$$XMMRegister, $src$$Address);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   763
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   764
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   765
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   766
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   767
instruct sqrtD_imm(regD dst, immD con) %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   768
  predicate(UseSSE>=2);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   769
  match(Set dst (SqrtD con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   770
  format %{ "sqrtsd  $dst, [$constantaddress]\t# load from constant table: double=$con" %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   771
  ins_cost(150);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   772
  ins_encode %{
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   773
    __ sqrtsd($dst$$XMMRegister, $constantaddress($con));
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   774
  %}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   775
  ins_pipe(pipe_slow);
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   776
%}
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
   777