annotate src/cpu/x86/vm/x86.ad @ 4761:65149e74c706

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