annotate src/cpu/x86/vm/x86.ad @ 4950:9b8ce46870df

7145346: VerifyStackAtCalls is broken Summary: Replace call_epilog() encoding with macroassembler use. Moved duplicated code to x86.ad. Fixed return_addr() definition. Reviewed-by: never
author kvn
date Thu, 16 Feb 2012 17:12:49 -0800
parents 65149e74c706
children 8c92982cbbc4
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 //
4950
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
2 // Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4761
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
4950
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
40
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
41 #ifndef PRODUCT
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
42 void MachNopNode::format(PhaseRegAlloc*, outputStream* st) const {
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
43 st->print("nop \t# %d bytes pad for loops and calls", _count);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
44 }
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
45 #endif
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
46
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
47 void MachNopNode::emit(CodeBuffer &cbuf, PhaseRegAlloc*) const {
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
48 MacroAssembler _masm(&cbuf);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
49 __ nop(_count);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
50 }
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
51
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
52 uint MachNopNode::size(PhaseRegAlloc*) const {
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
53 return _count;
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
54 }
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
55
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
56 #ifndef PRODUCT
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
57 void MachBreakpointNode::format(PhaseRegAlloc*, outputStream* st) const {
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
58 st->print("# breakpoint");
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
59 }
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
60 #endif
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
61
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
62 void MachBreakpointNode::emit(CodeBuffer &cbuf, PhaseRegAlloc* ra_) const {
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
63 MacroAssembler _masm(&cbuf);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
64 __ int3();
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
65 }
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
66
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
67 uint MachBreakpointNode::size(PhaseRegAlloc* ra_) const {
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
68 return MachNode::size(ra_);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
69 }
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
70
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
71 %}
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
72
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
73 encode %{
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
74
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
75 enc_class preserve_SP %{
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
76 debug_only(int off0 = cbuf.insts_size());
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
77 MacroAssembler _masm(&cbuf);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
78 // RBP is preserved across all calls, even compiled calls.
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
79 // Use it to preserve RSP in places where the callee might change the SP.
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
80 __ movptr(rbp_mh_SP_save, rsp);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
81 debug_only(int off1 = cbuf.insts_size());
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
82 assert(off1 - off0 == preserve_SP_size(), "correct size prediction");
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
83 %}
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
84
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
85 enc_class restore_SP %{
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
86 MacroAssembler _masm(&cbuf);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
87 __ movptr(rsp, rbp_mh_SP_save);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
88 %}
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
89
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
90 enc_class call_epilog %{
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
91 if (VerifyStackAtCalls) {
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
92 // Check that stack depth is unchanged: find majik cookie on stack
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
93 int framesize = ra_->reg2offset_unchecked(OptoReg::add(ra_->_matcher._old_SP, -3*VMRegImpl::slots_per_word));
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
94 MacroAssembler _masm(&cbuf);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
95 Label L;
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
96 __ cmpptr(Address(rsp, framesize), (int32_t)0xbadb100d);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
97 __ jccb(Assembler::equal, L);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
98 // Die if stack mismatch
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
99 __ int3();
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
100 __ bind(L);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
101 }
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
102 %}
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
103
4761
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
104 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
105
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
106 // 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
107
4950
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
108 // ============================================================================
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
109
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
110 instruct ShouldNotReachHere() %{
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
111 match(Halt);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
112 format %{ "int3\t# ShouldNotReachHere" %}
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
113 ins_encode %{
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
114 __ int3();
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
115 %}
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
116 ins_pipe(pipe_slow);
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
117 %}
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
118
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
119 // ============================================================================
9b8ce46870df 7145346: VerifyStackAtCalls is broken
kvn
parents: 4761
diff changeset
120
4761
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
121 instruct addF_reg(regF dst, regF src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
122 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
123 match(Set dst (AddF dst src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
124
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
125 format %{ "addss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
126 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
127 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
128 __ addss($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
129 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
130 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
131 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
132
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
133 instruct addF_mem(regF dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
134 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
135 match(Set dst (AddF dst (LoadF src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
136
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
137 format %{ "addss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
138 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
139 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
140 __ addss($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
141 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
142 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
143 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
144
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
145 instruct addF_imm(regF dst, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
146 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
147 match(Set dst (AddF dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
148 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
149 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
150 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
151 __ addss($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
152 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
153 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
154 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
155
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
156 instruct vaddF_reg(regF dst, regF src1, regF src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
157 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
158 match(Set dst (AddF src1 src2));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
159
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
160 format %{ "vaddss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
161 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
162 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
163 __ vaddss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
164 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
165 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
166 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
167
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
168 instruct vaddF_mem(regF dst, regF src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
169 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
170 match(Set dst (AddF src1 (LoadF src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
171
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
172 format %{ "vaddss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
173 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
174 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
175 __ vaddss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
176 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
177 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
178 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
179
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
180 instruct vaddF_imm(regF dst, regF src, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
181 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
182 match(Set dst (AddF src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
183
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
184 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
185 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
186 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
187 __ vaddss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
188 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
189 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
190 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
191
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
192 instruct addD_reg(regD dst, regD src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
193 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
194 match(Set dst (AddD dst src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
195
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
196 format %{ "addsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
197 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
198 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
199 __ addsd($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
200 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
201 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
202 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
203
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
204 instruct addD_mem(regD dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
205 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
206 match(Set dst (AddD dst (LoadD src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
207
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
208 format %{ "addsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
209 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
210 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
211 __ addsd($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
212 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
213 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
214 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
215
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
216 instruct addD_imm(regD dst, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
217 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
218 match(Set dst (AddD dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
219 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
220 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
221 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
222 __ addsd($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
223 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
224 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
225 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
226
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
227 instruct vaddD_reg(regD dst, regD src1, regD src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
228 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
229 match(Set dst (AddD src1 src2));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
230
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
231 format %{ "vaddsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
232 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
233 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
234 __ vaddsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
235 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
236 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
237 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
238
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
239 instruct vaddD_mem(regD dst, regD src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
240 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
241 match(Set dst (AddD src1 (LoadD src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
242
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
243 format %{ "vaddsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
244 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
245 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
246 __ vaddsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
247 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
248 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
249 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
250
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
251 instruct vaddD_imm(regD dst, regD src, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
252 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
253 match(Set dst (AddD src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
254
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
255 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
256 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
257 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
258 __ vaddsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
259 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
260 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
261 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
262
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
263 instruct subF_reg(regF dst, regF src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
264 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
265 match(Set dst (SubF dst src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
266
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
267 format %{ "subss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
268 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
269 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
270 __ subss($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
271 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
272 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
273 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
274
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
275 instruct subF_mem(regF dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
276 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
277 match(Set dst (SubF dst (LoadF src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
278
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
279 format %{ "subss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
280 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
281 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
282 __ subss($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
283 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
284 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
285 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
286
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
287 instruct subF_imm(regF dst, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
288 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
289 match(Set dst (SubF dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
290 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
291 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
292 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
293 __ subss($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
294 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
295 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
296 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
297
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
298 instruct vsubF_reg(regF dst, regF src1, regF src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
299 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
300 match(Set dst (SubF src1 src2));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
301
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
302 format %{ "vsubss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
303 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
304 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
305 __ vsubss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
306 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
307 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
308 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
309
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
310 instruct vsubF_mem(regF dst, regF src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
311 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
312 match(Set dst (SubF src1 (LoadF src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
313
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
314 format %{ "vsubss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
315 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
316 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
317 __ vsubss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
318 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
319 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
320 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
321
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
322 instruct vsubF_imm(regF dst, regF src, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
323 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
324 match(Set dst (SubF src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
325
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
326 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
327 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
328 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
329 __ vsubss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
330 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
331 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
332 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
333
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
334 instruct subD_reg(regD dst, regD src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
335 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
336 match(Set dst (SubD dst src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
337
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
338 format %{ "subsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
339 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
340 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
341 __ subsd($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
342 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
343 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
344 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
345
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
346 instruct subD_mem(regD dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
347 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
348 match(Set dst (SubD dst (LoadD src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
349
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
350 format %{ "subsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
351 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
352 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
353 __ subsd($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
354 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
355 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
356 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
357
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
358 instruct subD_imm(regD dst, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
359 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
360 match(Set dst (SubD dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
361 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
362 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
363 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
364 __ subsd($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
365 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
366 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
367 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
368
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
369 instruct vsubD_reg(regD dst, regD src1, regD src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
370 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
371 match(Set dst (SubD src1 src2));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
372
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
373 format %{ "vsubsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
374 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
375 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
376 __ vsubsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
377 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
378 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
379 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
380
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
381 instruct vsubD_mem(regD dst, regD src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
382 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
383 match(Set dst (SubD src1 (LoadD src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
384
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
385 format %{ "vsubsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
386 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
387 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
388 __ vsubsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
389 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
390 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
391 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
392
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
393 instruct vsubD_imm(regD dst, regD src, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
394 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
395 match(Set dst (SubD src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
396
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
397 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
398 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
399 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
400 __ vsubsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
401 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
402 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
403 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
404
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
405 instruct mulF_reg(regF dst, regF src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
406 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
407 match(Set dst (MulF dst src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
408
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
409 format %{ "mulss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
410 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
411 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
412 __ mulss($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
413 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
414 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
415 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
416
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
417 instruct mulF_mem(regF dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
418 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
419 match(Set dst (MulF dst (LoadF src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
420
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
421 format %{ "mulss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
422 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
423 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
424 __ mulss($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
425 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
426 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
427 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
428
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
429 instruct mulF_imm(regF dst, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
430 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
431 match(Set dst (MulF dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
432 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
433 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
434 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
435 __ mulss($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
436 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
437 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
438 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
439
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
440 instruct vmulF_reg(regF dst, regF src1, regF src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
441 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
442 match(Set dst (MulF src1 src2));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
443
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
444 format %{ "vmulss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
445 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
446 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
447 __ vmulss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
448 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
449 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
450 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
451
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
452 instruct vmulF_mem(regF dst, regF src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
453 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
454 match(Set dst (MulF src1 (LoadF src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
455
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
456 format %{ "vmulss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
457 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
458 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
459 __ vmulss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
460 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
461 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
462 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
463
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
464 instruct vmulF_imm(regF dst, regF src, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
465 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
466 match(Set dst (MulF src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
467
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
468 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
469 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
470 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
471 __ vmulss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
472 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
473 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
474 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
475
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
476 instruct mulD_reg(regD dst, regD src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
477 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
478 match(Set dst (MulD dst src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
479
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
480 format %{ "mulsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
481 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
482 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
483 __ mulsd($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
484 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
485 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
486 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
487
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
488 instruct mulD_mem(regD dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
489 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
490 match(Set dst (MulD dst (LoadD src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
491
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
492 format %{ "mulsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
493 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
494 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
495 __ mulsd($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
496 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
497 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
498 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
499
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
500 instruct mulD_imm(regD dst, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
501 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
502 match(Set dst (MulD dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
503 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
504 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
505 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
506 __ mulsd($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
507 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
508 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
509 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
510
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
511 instruct vmulD_reg(regD dst, regD src1, regD src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
512 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
513 match(Set dst (MulD src1 src2));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
514
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
515 format %{ "vmulsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
516 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
517 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
518 __ vmulsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
519 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
520 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
521 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
522
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
523 instruct vmulD_mem(regD dst, regD src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
524 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
525 match(Set dst (MulD src1 (LoadD src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
526
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
527 format %{ "vmulsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
528 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
529 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
530 __ vmulsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
531 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
532 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
533 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
534
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
535 instruct vmulD_imm(regD dst, regD src, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
536 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
537 match(Set dst (MulD src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
538
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
539 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
540 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
541 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
542 __ vmulsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
543 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
544 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
545 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
546
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
547 instruct divF_reg(regF dst, regF src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
548 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
549 match(Set dst (DivF dst src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
550
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
551 format %{ "divss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
552 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
553 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
554 __ divss($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
555 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
556 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
557 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
558
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
559 instruct divF_mem(regF dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
560 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
561 match(Set dst (DivF dst (LoadF src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
562
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
563 format %{ "divss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
564 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
565 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
566 __ divss($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
567 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
568 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
569 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
570
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
571 instruct divF_imm(regF dst, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
572 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
573 match(Set dst (DivF dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
574 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
575 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
576 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
577 __ divss($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
578 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
579 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
580 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
581
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
582 instruct vdivF_reg(regF dst, regF src1, regF src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
583 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
584 match(Set dst (DivF src1 src2));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
585
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
586 format %{ "vdivss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
587 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
588 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
589 __ vdivss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
590 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
591 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
592 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
593
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
594 instruct vdivF_mem(regF dst, regF src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
595 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
596 match(Set dst (DivF src1 (LoadF src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
597
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
598 format %{ "vdivss $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
599 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
600 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
601 __ vdivss($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
602 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
603 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
604 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
605
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
606 instruct vdivF_imm(regF dst, regF src, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
607 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
608 match(Set dst (DivF src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
609
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
610 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
611 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
612 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
613 __ vdivss($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
614 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
615 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
616 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
617
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
618 instruct divD_reg(regD dst, regD src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
619 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
620 match(Set dst (DivD dst src));
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 format %{ "divsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
623 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
624 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
625 __ divsd($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
626 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
627 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
628 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
629
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
630 instruct divD_mem(regD dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
631 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
632 match(Set dst (DivD dst (LoadD src)));
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 format %{ "divsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
635 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
636 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
637 __ divsd($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
638 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
639 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
640 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
641
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
642 instruct divD_imm(regD dst, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
643 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
644 match(Set dst (DivD dst con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
645 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
646 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
647 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
648 __ divsd($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
649 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
650 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
651 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
652
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
653 instruct vdivD_reg(regD dst, regD src1, regD src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
654 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
655 match(Set dst (DivD src1 src2));
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 format %{ "vdivsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
658 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
659 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
660 __ vdivsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
661 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
662 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
663 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
664
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
665 instruct vdivD_mem(regD dst, regD src1, memory src2) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
666 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
667 match(Set dst (DivD src1 (LoadD src2)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
668
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
669 format %{ "vdivsd $dst, $src1, $src2" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
670 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
671 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
672 __ vdivsd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
673 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
674 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
675 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
676
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
677 instruct vdivD_imm(regD dst, regD src, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
678 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
679 match(Set dst (DivD src con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
680
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
681 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
682 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
683 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
684 __ vdivsd($dst$$XMMRegister, $src$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
685 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
686 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
687 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
688
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
689 instruct absF_reg(regF dst) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
690 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
691 match(Set dst (AbsF dst));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
692 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
693 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
694 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
695 __ andps($dst$$XMMRegister, ExternalAddress(float_signmask()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
696 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
697 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
698 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
699
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
700 instruct vabsF_reg(regF dst, regF src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
701 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
702 match(Set dst (AbsF src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
703 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
704 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
705 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
706 __ vandps($dst$$XMMRegister, $src$$XMMRegister,
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
707 ExternalAddress(float_signmask()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
708 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
709 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
710 %}
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 instruct absD_reg(regD dst) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
713 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
714 match(Set dst (AbsD dst));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
715 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
716 format %{ "andpd $dst, [0x7fffffffffffffff]\t"
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
717 "# abs double by sign masking" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
718 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
719 __ andpd($dst$$XMMRegister, ExternalAddress(double_signmask()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
720 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
721 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
722 %}
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 instruct vabsD_reg(regD dst, regD src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
725 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
726 match(Set dst (AbsD src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
727 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
728 format %{ "vandpd $dst, $src, [0x7fffffffffffffff]\t"
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
729 "# abs double by sign masking" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
730 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
731 __ vandpd($dst$$XMMRegister, $src$$XMMRegister,
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
732 ExternalAddress(double_signmask()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
733 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
734 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
735 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
736
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
737 instruct negF_reg(regF dst) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
738 predicate((UseSSE>=1) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
739 match(Set dst (NegF dst));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
740 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
741 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
742 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
743 __ xorps($dst$$XMMRegister, ExternalAddress(float_signflip()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
744 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
745 ins_pipe(pipe_slow);
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
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
748 instruct vnegF_reg(regF dst, regF src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
749 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
750 match(Set dst (NegF src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
751 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
752 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
753 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
754 __ vxorps($dst$$XMMRegister, $src$$XMMRegister,
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
755 ExternalAddress(float_signflip()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
756 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
757 ins_pipe(pipe_slow);
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
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
760 instruct negD_reg(regD dst) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
761 predicate((UseSSE>=2) && (UseAVX == 0));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
762 match(Set dst (NegD dst));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
763 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
764 format %{ "xorpd $dst, [0x8000000000000000]\t"
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
765 "# neg double by sign flipping" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
766 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
767 __ xorpd($dst$$XMMRegister, ExternalAddress(double_signflip()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
768 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
769 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
770 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
771
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
772 instruct vnegD_reg(regD dst, regD src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
773 predicate(UseAVX > 0);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
774 match(Set dst (NegD src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
775 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
776 format %{ "vxorpd $dst, $src, [0x8000000000000000]\t"
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
777 "# neg double by sign flipping" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
778 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
779 __ vxorpd($dst$$XMMRegister, $src$$XMMRegister,
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
780 ExternalAddress(double_signflip()));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
781 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
782 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
783 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
784
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
785 instruct sqrtF_reg(regF dst, regF src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
786 predicate(UseSSE>=1);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
787 match(Set dst (ConvD2F (SqrtD (ConvF2D src))));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
788
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
789 format %{ "sqrtss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
790 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
791 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
792 __ sqrtss($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
793 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
794 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
795 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
796
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
797 instruct sqrtF_mem(regF dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
798 predicate(UseSSE>=1);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
799 match(Set dst (ConvD2F (SqrtD (ConvF2D (LoadF src)))));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
800
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
801 format %{ "sqrtss $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
802 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
803 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
804 __ sqrtss($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
805 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
806 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
807 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
808
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
809 instruct sqrtF_imm(regF dst, immF con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
810 predicate(UseSSE>=1);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
811 match(Set dst (ConvD2F (SqrtD (ConvF2D con))));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
812 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
813 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
814 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
815 __ sqrtss($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
816 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
817 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
818 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
819
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
820 instruct sqrtD_reg(regD dst, regD src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
821 predicate(UseSSE>=2);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
822 match(Set dst (SqrtD src));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
823
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
824 format %{ "sqrtsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
825 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
826 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
827 __ sqrtsd($dst$$XMMRegister, $src$$XMMRegister);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
828 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
829 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
830 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
831
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
832 instruct sqrtD_mem(regD dst, memory src) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
833 predicate(UseSSE>=2);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
834 match(Set dst (SqrtD (LoadD src)));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
835
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
836 format %{ "sqrtsd $dst, $src" %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
837 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
838 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
839 __ sqrtsd($dst$$XMMRegister, $src$$Address);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
840 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
841 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
842 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
843
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
844 instruct sqrtD_imm(regD dst, immD con) %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
845 predicate(UseSSE>=2);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
846 match(Set dst (SqrtD con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
847 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
848 ins_cost(150);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
849 ins_encode %{
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
850 __ sqrtsd($dst$$XMMRegister, $constantaddress($con));
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
851 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
852 ins_pipe(pipe_slow);
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
853 %}
65149e74c706 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents:
diff changeset
854