OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 | 10 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 Int32BinopMatcher m(node); | 166 Int32BinopMatcher m(node); |
167 InstructionOperand inputs[4]; | 167 InstructionOperand inputs[4]; |
168 size_t input_count = 0; | 168 size_t input_count = 0; |
169 InstructionOperand outputs[2]; | 169 InstructionOperand outputs[2]; |
170 size_t output_count = 0; | 170 size_t output_count = 0; |
171 | 171 |
172 if (TryMatchImmediate(selector, &opcode, m.right().node(), &input_count, | 172 if (TryMatchImmediate(selector, &opcode, m.right().node(), &input_count, |
173 &inputs[1])) { | 173 &inputs[1])) { |
174 inputs[0] = g.UseRegister(m.left().node()); | 174 inputs[0] = g.UseRegister(m.left().node()); |
175 input_count++; | 175 input_count++; |
176 } | 176 } else if (has_reverse_opcode && |
177 if (has_reverse_opcode && | 177 TryMatchImmediate(selector, &reverse_opcode, m.left().node(), |
178 TryMatchImmediate(selector, &reverse_opcode, m.left().node(), | 178 &input_count, &inputs[1])) { |
179 &input_count, &inputs[1])) { | |
180 inputs[0] = g.UseRegister(m.right().node()); | 179 inputs[0] = g.UseRegister(m.right().node()); |
181 opcode = reverse_opcode; | 180 opcode = reverse_opcode; |
182 input_count++; | 181 input_count++; |
183 } else { | 182 } else { |
184 inputs[input_count++] = g.UseRegister(m.left().node()); | 183 inputs[input_count++] = g.UseRegister(m.left().node()); |
185 inputs[input_count++] = g.UseOperand(m.right().node(), opcode); | 184 inputs[input_count++] = g.UseOperand(m.right().node(), opcode); |
186 } | 185 } |
187 | 186 |
188 if (cont->IsBranch()) { | 187 if (cont->IsBranch()) { |
189 inputs[input_count++] = g.Label(cont->true_block()); | 188 inputs[input_count++] = g.Label(cont->true_block()); |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1900 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || | 1899 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || |
1901 IsMipsArchVariant(kMips32r2)); | 1900 IsMipsArchVariant(kMips32r2)); |
1902 return MachineOperatorBuilder::AlignmentRequirements:: | 1901 return MachineOperatorBuilder::AlignmentRequirements:: |
1903 NoUnalignedAccessSupport(); | 1902 NoUnalignedAccessSupport(); |
1904 } | 1903 } |
1905 } | 1904 } |
1906 | 1905 |
1907 } // namespace compiler | 1906 } // namespace compiler |
1908 } // namespace internal | 1907 } // namespace internal |
1909 } // namespace v8 | 1908 } // namespace v8 |
OLD | NEW |