Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: test/unittests/compiler/machine-operator-unittest.cc

Issue 1021183002: [turbofan] Turn Math.clz32 into an inlinable builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/compiler/machine-operator.h" 5 #include "src/compiler/machine-operator.h"
6 #include "src/compiler/opcodes.h" 6 #include "src/compiler/opcodes.h"
7 #include "src/compiler/operator.h" 7 #include "src/compiler/operator.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 #include "test/unittests/test-utils.h" 9 #include "test/unittests/test-utils.h"
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 const PureOperator kPureOperators[] = { 174 const PureOperator kPureOperators[] = {
175 #define PURE(Name, value_input_count, control_input_count, value_output_count) \ 175 #define PURE(Name, value_input_count, control_input_count, value_output_count) \
176 { \ 176 { \
177 &MachineOperatorBuilder::Name, IrOpcode::k##Name, value_input_count, \ 177 &MachineOperatorBuilder::Name, IrOpcode::k##Name, value_input_count, \
178 control_input_count, value_output_count \ 178 control_input_count, value_output_count \
179 } 179 }
180 PURE(Word32And, 2, 0, 1), PURE(Word32Or, 2, 0, 1), PURE(Word32Xor, 2, 0, 1), 180 PURE(Word32And, 2, 0, 1), PURE(Word32Or, 2, 0, 1), PURE(Word32Xor, 2, 0, 1),
181 PURE(Word32Shl, 2, 0, 1), PURE(Word32Shr, 2, 0, 1), 181 PURE(Word32Shl, 2, 0, 1), PURE(Word32Shr, 2, 0, 1),
182 PURE(Word32Sar, 2, 0, 1), PURE(Word32Ror, 2, 0, 1), 182 PURE(Word32Sar, 2, 0, 1), PURE(Word32Ror, 2, 0, 1),
183 PURE(Word32Equal, 2, 0, 1), PURE(Word64And, 2, 0, 1), 183 PURE(Word32Equal, 2, 0, 1), PURE(Word32Clz, 1, 0, 1),
184 PURE(Word64Or, 2, 0, 1), PURE(Word64Xor, 2, 0, 1), PURE(Word64Shl, 2, 0, 1), 184 PURE(Word64And, 2, 0, 1), PURE(Word64Or, 2, 0, 1), PURE(Word64Xor, 2, 0, 1),
185 PURE(Word64Shr, 2, 0, 1), PURE(Word64Sar, 2, 0, 1), 185 PURE(Word64Shl, 2, 0, 1), PURE(Word64Shr, 2, 0, 1),
186 PURE(Word64Ror, 2, 0, 1), PURE(Word64Equal, 2, 0, 1), 186 PURE(Word64Sar, 2, 0, 1), PURE(Word64Ror, 2, 0, 1),
187 PURE(Int32Add, 2, 0, 1), PURE(Int32AddWithOverflow, 2, 0, 2), 187 PURE(Word64Equal, 2, 0, 1), PURE(Int32Add, 2, 0, 1),
188 PURE(Int32Sub, 2, 0, 1), PURE(Int32SubWithOverflow, 2, 0, 2), 188 PURE(Int32AddWithOverflow, 2, 0, 2), PURE(Int32Sub, 2, 0, 1),
189 PURE(Int32Mul, 2, 0, 1), PURE(Int32MulHigh, 2, 0, 1), 189 PURE(Int32SubWithOverflow, 2, 0, 2), PURE(Int32Mul, 2, 0, 1),
190 PURE(Int32Div, 2, 1, 1), PURE(Uint32Div, 2, 1, 1), PURE(Int32Mod, 2, 1, 1), 190 PURE(Int32MulHigh, 2, 0, 1), PURE(Int32Div, 2, 1, 1),
191 PURE(Uint32Mod, 2, 1, 1), PURE(Int32LessThan, 2, 0, 1), 191 PURE(Uint32Div, 2, 1, 1), PURE(Int32Mod, 2, 1, 1), PURE(Uint32Mod, 2, 1, 1),
192 PURE(Int32LessThanOrEqual, 2, 0, 1), PURE(Uint32LessThan, 2, 0, 1), 192 PURE(Int32LessThan, 2, 0, 1), PURE(Int32LessThanOrEqual, 2, 0, 1),
193 PURE(Uint32LessThanOrEqual, 2, 0, 1), PURE(Int64Add, 2, 0, 1), 193 PURE(Uint32LessThan, 2, 0, 1), PURE(Uint32LessThanOrEqual, 2, 0, 1),
194 PURE(Int64Sub, 2, 0, 1), PURE(Int64Mul, 2, 0, 1), PURE(Int64Div, 2, 0, 1), 194 PURE(Int64Add, 2, 0, 1), PURE(Int64Sub, 2, 0, 1), PURE(Int64Mul, 2, 0, 1),
195 PURE(Uint64Div, 2, 0, 1), PURE(Int64Mod, 2, 0, 1), PURE(Uint64Mod, 2, 0, 1), 195 PURE(Int64Div, 2, 0, 1), PURE(Uint64Div, 2, 0, 1), PURE(Int64Mod, 2, 0, 1),
196 PURE(Int64LessThan, 2, 0, 1), PURE(Int64LessThanOrEqual, 2, 0, 1), 196 PURE(Uint64Mod, 2, 0, 1), PURE(Int64LessThan, 2, 0, 1),
197 PURE(Uint64LessThan, 2, 0, 1), PURE(ChangeFloat32ToFloat64, 1, 0, 1), 197 PURE(Int64LessThanOrEqual, 2, 0, 1), PURE(Uint64LessThan, 2, 0, 1),
198 PURE(ChangeFloat64ToInt32, 1, 0, 1), PURE(ChangeFloat64ToUint32, 1, 0, 1), 198 PURE(ChangeFloat32ToFloat64, 1, 0, 1), PURE(ChangeFloat64ToInt32, 1, 0, 1),
199 PURE(ChangeInt32ToInt64, 1, 0, 1), PURE(ChangeUint32ToFloat64, 1, 0, 1), 199 PURE(ChangeFloat64ToUint32, 1, 0, 1), PURE(ChangeInt32ToInt64, 1, 0, 1),
200 PURE(ChangeUint32ToUint64, 1, 0, 1), 200 PURE(ChangeUint32ToFloat64, 1, 0, 1), PURE(ChangeUint32ToUint64, 1, 0, 1),
201 PURE(TruncateFloat64ToFloat32, 1, 0, 1), 201 PURE(TruncateFloat64ToFloat32, 1, 0, 1),
202 PURE(TruncateFloat64ToInt32, 1, 0, 1), PURE(TruncateInt64ToInt32, 1, 0, 1), 202 PURE(TruncateFloat64ToInt32, 1, 0, 1), PURE(TruncateInt64ToInt32, 1, 0, 1),
203 PURE(Float64Add, 2, 0, 1), PURE(Float64Sub, 2, 0, 1), 203 PURE(Float64Add, 2, 0, 1), PURE(Float64Sub, 2, 0, 1),
204 PURE(Float64Mul, 2, 0, 1), PURE(Float64Div, 2, 0, 1), 204 PURE(Float64Mul, 2, 0, 1), PURE(Float64Div, 2, 0, 1),
205 PURE(Float64Mod, 2, 0, 1), PURE(Float64Sqrt, 1, 0, 1), 205 PURE(Float64Mod, 2, 0, 1), PURE(Float64Sqrt, 1, 0, 1),
206 PURE(Float64Equal, 2, 0, 1), PURE(Float64LessThan, 2, 0, 1), 206 PURE(Float64Equal, 2, 0, 1), PURE(Float64LessThan, 2, 0, 1),
207 PURE(Float64LessThanOrEqual, 2, 0, 1), PURE(LoadStackPointer, 0, 0, 1), 207 PURE(Float64LessThanOrEqual, 2, 0, 1), PURE(LoadStackPointer, 0, 0, 1),
208 PURE(Float64RoundDown, 1, 0, 1), PURE(Float64RoundTruncate, 1, 0, 1), 208 PURE(Float64RoundDown, 1, 0, 1), PURE(Float64RoundTruncate, 1, 0, 1),
209 PURE(Float64RoundTiesAway, 1, 0, 1), PURE(Float64ExtractLowWord32, 1, 0, 1), 209 PURE(Float64RoundTiesAway, 1, 0, 1), PURE(Float64ExtractLowWord32, 1, 0, 1),
210 PURE(Float64ExtractHighWord32, 1, 0, 1), 210 PURE(Float64ExtractHighWord32, 1, 0, 1),
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 EXPECT_EQ(machine.Uint64Div(), machine.UintDiv()); 319 EXPECT_EQ(machine.Uint64Div(), machine.UintDiv());
320 EXPECT_EQ(machine.Int64Mod(), machine.IntMod()); 320 EXPECT_EQ(machine.Int64Mod(), machine.IntMod());
321 EXPECT_EQ(machine.Uint64Mod(), machine.UintMod()); 321 EXPECT_EQ(machine.Uint64Mod(), machine.UintMod());
322 EXPECT_EQ(machine.Int64LessThan(), machine.IntLessThan()); 322 EXPECT_EQ(machine.Int64LessThan(), machine.IntLessThan());
323 EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual()); 323 EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual());
324 } 324 }
325 325
326 } // namespace compiler 326 } // namespace compiler
327 } // namespace internal 327 } // namespace internal
328 } // namespace v8 328 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-intrinsic-lowering-unittest.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698