blob: dd036c99392172836978e150aba149c6eb02b93c [file] [log] [blame]
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001// 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
3// found in the LICENSE file.
4
5#ifndef V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
6#define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
7
8#include "src/compiler/machine-operator.h"
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00009#include "src/machine-type.h"
Emily Bernierd0a1eb72015-03-24 16:35:39 -040010#include "testing/gmock/include/gmock/gmock.h"
11
12namespace v8 {
13namespace internal {
14
15// Forward declarations.
16class ExternalReference;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000017template <typename T>
18class Handle;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040019class HeapObject;
Ben Murdoch097c5b22016-05-18 11:27:45 +010020class Type;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000021enum TypeofMode : int;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040022
23namespace compiler {
24
25// Forward declarations.
26class BufferAccess;
27class CallDescriptor;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000028class ContextAccess;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040029struct ElementAccess;
30struct FieldAccess;
31class Node;
32
33
34using ::testing::Matcher;
35
36
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000037Matcher<Node*> IsDead();
38Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher);
39Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
40 const Matcher<Node*>& control1_matcher);
41Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
42 const Matcher<Node*>& control1_matcher,
43 const Matcher<Node*>& control2_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040044Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher,
45 const Matcher<Node*>& control_matcher);
46Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
47 const Matcher<Node*>& control1_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000048Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
49 const Matcher<Node*>& control1_matcher,
50 const Matcher<Node*>& control2_matcher);
51Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher,
52 const Matcher<Node*>& control1_matcher);
53Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher,
54 const Matcher<Node*>& control1_matcher,
55 const Matcher<Node*>& control2_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040056Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher);
57Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000058Matcher<Node*> IsIfSuccess(const Matcher<Node*>& control_matcher);
59Matcher<Node*> IsSwitch(const Matcher<Node*>& value_matcher,
60 const Matcher<Node*>& control_matcher);
61Matcher<Node*> IsIfValue(const Matcher<int32_t>& value_matcher,
62 const Matcher<Node*>& control_matcher);
63Matcher<Node*> IsIfDefault(const Matcher<Node*>& control_matcher);
64Matcher<Node*> IsBeginRegion(const Matcher<Node*>& effect_matcher);
65Matcher<Node*> IsFinishRegion(const Matcher<Node*>& value_matcher,
66 const Matcher<Node*>& effect_matcher);
67Matcher<Node*> IsReturn(const Matcher<Node*>& value_matcher,
68 const Matcher<Node*>& effect_matcher,
69 const Matcher<Node*>& control_matcher);
Ben Murdoch097c5b22016-05-18 11:27:45 +010070Matcher<Node*> IsReturn2(const Matcher<Node*>& value_matcher,
71 const Matcher<Node*>& value2_matcher,
72 const Matcher<Node*>& effect_matcher,
73 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000074Matcher<Node*> IsTerminate(const Matcher<Node*>& effect_matcher,
75 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040076Matcher<Node*> IsExternalConstant(
77 const Matcher<ExternalReference>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000078Matcher<Node*> IsHeapConstant(Handle<HeapObject> value);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040079Matcher<Node*> IsFloat32Constant(const Matcher<float>& value_matcher);
80Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher);
81Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher);
82Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher);
83Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000084Matcher<Node*> IsSelect(const Matcher<MachineRepresentation>& type_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -040085 const Matcher<Node*>& value0_matcher,
86 const Matcher<Node*>& value1_matcher,
87 const Matcher<Node*>& value2_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000088Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -040089 const Matcher<Node*>& value0_matcher,
90 const Matcher<Node*>& value1_matcher,
91 const Matcher<Node*>& merge_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000092Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher,
93 const Matcher<Node*>& value0_matcher,
94 const Matcher<Node*>& value1_matcher,
95 const Matcher<Node*>& value2_matcher,
96 const Matcher<Node*>& merge_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040097Matcher<Node*> IsEffectPhi(const Matcher<Node*>& effect0_matcher,
98 const Matcher<Node*>& effect1_matcher,
99 const Matcher<Node*>& merge_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000100Matcher<Node*> IsEffectSet(const Matcher<Node*>& effect0_matcher,
101 const Matcher<Node*>& effect1_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400102Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher,
103 const Matcher<Node*>& base_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000104Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
105 const Matcher<Node*>& value0_matcher,
106 const Matcher<Node*>& effect_matcher,
107 const Matcher<Node*>& control_matcher);
108Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400109 const Matcher<Node*>& value0_matcher,
110 const Matcher<Node*>& value1_matcher,
111 const Matcher<Node*>& effect_matcher,
112 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000113Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
114 const Matcher<Node*>& value0_matcher,
115 const Matcher<Node*>& value1_matcher,
116 const Matcher<Node*>& value2_matcher,
117 const Matcher<Node*>& effect_matcher,
118 const Matcher<Node*>& control_matcher);
119Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400120 const Matcher<Node*>& value0_matcher,
121 const Matcher<Node*>& value1_matcher,
122 const Matcher<Node*>& value2_matcher,
123 const Matcher<Node*>& value3_matcher,
124 const Matcher<Node*>& effect_matcher,
125 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000126Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
127 const Matcher<Node*>& value0_matcher,
128 const Matcher<Node*>& value1_matcher,
129 const Matcher<Node*>& value2_matcher,
130 const Matcher<Node*>& value3_matcher,
131 const Matcher<Node*>& value4_matcher,
132 const Matcher<Node*>& effect_matcher,
133 const Matcher<Node*>& control_matcher);
134Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
135 const Matcher<Node*>& value0_matcher,
136 const Matcher<Node*>& value1_matcher,
137 const Matcher<Node*>& value2_matcher,
138 const Matcher<Node*>& value3_matcher,
139 const Matcher<Node*>& value4_matcher,
140 const Matcher<Node*>& value5_matcher,
141 const Matcher<Node*>& effect_matcher,
142 const Matcher<Node*>& control_matcher);
143Matcher<Node*> IsCall(
144 const Matcher<const CallDescriptor*>& descriptor_matcher,
145 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
146 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
147 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
148 const Matcher<Node*>& value6_matcher, const Matcher<Node*>& effect_matcher,
149 const Matcher<Node*>& control_matcher);
150Matcher<Node*> IsTailCall(
151 const Matcher<CallDescriptor const*>& descriptor_matcher,
152 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
153 const Matcher<Node*>& effect_matcher,
154 const Matcher<Node*>& control_matcher);
155Matcher<Node*> IsTailCall(
156 const Matcher<CallDescriptor const*>& descriptor_matcher,
157 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
158 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& effect_matcher,
159 const Matcher<Node*>& control_matcher);
160Matcher<Node*> IsTailCall(
161 const Matcher<CallDescriptor const*>& descriptor_matcher,
162 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
163 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
164 const Matcher<Node*>& effect_matcher,
165 const Matcher<Node*>& control_matcher);
166Matcher<Node*> IsTailCall(
167 const Matcher<CallDescriptor const*>& descriptor_matcher,
168 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
169 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
170 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& effect_matcher,
171 const Matcher<Node*>& control_matcher);
172Matcher<Node*> IsTailCall(
173 const Matcher<CallDescriptor const*>& descriptor_matcher,
174 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
175 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
176 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
177 const Matcher<Node*>& effect_matcher,
178 const Matcher<Node*>& control_matcher);
179Matcher<Node*> IsTailCall(
180 const Matcher<CallDescriptor const*>& descriptor_matcher,
181 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
182 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
183 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
184 const Matcher<Node*>& value6_matcher, const Matcher<Node*>& effect_matcher,
185 const Matcher<Node*>& control_matcher);
186Matcher<Node*> IsTailCall(
187 const Matcher<CallDescriptor const*>& descriptor_matcher,
188 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
189 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
190 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
191 const Matcher<Node*>& value6_matcher, const Matcher<Node*>& value7_matcher,
192 const Matcher<Node*>& effect_matcher,
193 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400194
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000195
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400196Matcher<Node*> IsBooleanNot(const Matcher<Node*>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000197Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher,
198 const Matcher<Node*>& lhs_matcher,
199 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400200Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher,
201 const Matcher<Node*>& rhs_matcher);
202Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher,
203 const Matcher<Node*>& rhs_matcher);
204Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher,
205 const Matcher<Node*>& rhs_matcher);
206Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher,
207 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000208Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher,
209 const Matcher<Node*>& rhs_matcher);
210Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher,
211 const Matcher<Node*>& rhs_matcher);
212Matcher<Node*> IsNumberShiftRightLogical(const Matcher<Node*>& lhs_matcher,
213 const Matcher<Node*>& rhs_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100214Matcher<Node*> IsNumberImul(const Matcher<Node*>& lhs_matcher,
215 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000216Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher,
217 const Matcher<Node*>& effect_matcher,
218 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400219Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher,
220 const Matcher<Node*>& base_matcher,
221 const Matcher<Node*>& effect_matcher,
222 const Matcher<Node*>& control_matcher);
223Matcher<Node*> IsStoreField(const Matcher<FieldAccess>& access_matcher,
224 const Matcher<Node*>& base_matcher,
225 const Matcher<Node*>& value_matcher,
226 const Matcher<Node*>& effect_matcher,
227 const Matcher<Node*>& control_matcher);
228Matcher<Node*> IsLoadBuffer(const Matcher<BufferAccess>& access_matcher,
229 const Matcher<Node*>& buffer_matcher,
230 const Matcher<Node*>& offset_matcher,
231 const Matcher<Node*>& length_matcher,
232 const Matcher<Node*>& effect_matcher,
233 const Matcher<Node*>& control_matcher);
234Matcher<Node*> IsStoreBuffer(const Matcher<BufferAccess>& access_matcher,
235 const Matcher<Node*>& buffer_matcher,
236 const Matcher<Node*>& offset_matcher,
237 const Matcher<Node*>& length_matcher,
238 const Matcher<Node*>& value_matcher,
239 const Matcher<Node*>& effect_matcher,
240 const Matcher<Node*>& control_matcher);
241Matcher<Node*> IsLoadElement(const Matcher<ElementAccess>& access_matcher,
242 const Matcher<Node*>& base_matcher,
243 const Matcher<Node*>& index_matcher,
244 const Matcher<Node*>& control_matcher,
245 const Matcher<Node*>& effect_matcher);
246Matcher<Node*> IsStoreElement(const Matcher<ElementAccess>& access_matcher,
247 const Matcher<Node*>& base_matcher,
248 const Matcher<Node*>& index_matcher,
249 const Matcher<Node*>& value_matcher,
250 const Matcher<Node*>& effect_matcher,
251 const Matcher<Node*>& control_matcher);
Ben Murdoch097c5b22016-05-18 11:27:45 +0100252Matcher<Node*> IsObjectIsReceiver(const Matcher<Node*>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000253Matcher<Node*> IsObjectIsSmi(const Matcher<Node*>& value_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400254
255Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher,
256 const Matcher<Node*>& base_matcher,
257 const Matcher<Node*>& index_matcher,
258 const Matcher<Node*>& effect_matcher,
259 const Matcher<Node*>& control_matcher);
260Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher,
261 const Matcher<Node*>& base_matcher,
262 const Matcher<Node*>& index_matcher,
263 const Matcher<Node*>& value_matcher,
264 const Matcher<Node*>& effect_matcher,
265 const Matcher<Node*>& control_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100266Matcher<Node*> IsStackSlot(const Matcher<MachineRepresentation>& rep_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400267Matcher<Node*> IsWord32And(const Matcher<Node*>& lhs_matcher,
268 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000269Matcher<Node*> IsWord32Or(const Matcher<Node*>& lhs_matcher,
270 const Matcher<Node*>& rhs_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100271Matcher<Node*> IsWord32Xor(const Matcher<Node*>& lhs_matcher,
272 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400273Matcher<Node*> IsWord32Sar(const Matcher<Node*>& lhs_matcher,
274 const Matcher<Node*>& rhs_matcher);
275Matcher<Node*> IsWord32Shl(const Matcher<Node*>& lhs_matcher,
276 const Matcher<Node*>& rhs_matcher);
277Matcher<Node*> IsWord32Shr(const Matcher<Node*>& lhs_matcher,
278 const Matcher<Node*>& rhs_matcher);
279Matcher<Node*> IsWord32Ror(const Matcher<Node*>& lhs_matcher,
280 const Matcher<Node*>& rhs_matcher);
281Matcher<Node*> IsWord32Equal(const Matcher<Node*>& lhs_matcher,
282 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000283Matcher<Node*> IsWord32Clz(const Matcher<Node*>& value_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100284Matcher<Node*> IsWord32Ctz(const Matcher<Node*>& value_matcher);
285Matcher<Node*> IsWord32Popcnt(const Matcher<Node*>& value_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400286Matcher<Node*> IsWord64And(const Matcher<Node*>& lhs_matcher,
287 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000288Matcher<Node*> IsWord64Or(const Matcher<Node*>& lhs_matcher,
289 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400290Matcher<Node*> IsWord64Shl(const Matcher<Node*>& lhs_matcher,
291 const Matcher<Node*>& rhs_matcher);
292Matcher<Node*> IsWord64Sar(const Matcher<Node*>& lhs_matcher,
293 const Matcher<Node*>& rhs_matcher);
294Matcher<Node*> IsWord64Equal(const Matcher<Node*>& lhs_matcher,
295 const Matcher<Node*>& rhs_matcher);
296Matcher<Node*> IsInt32AddWithOverflow(const Matcher<Node*>& lhs_matcher,
297 const Matcher<Node*>& rhs_matcher);
298Matcher<Node*> IsInt32Add(const Matcher<Node*>& lhs_matcher,
299 const Matcher<Node*>& rhs_matcher);
300Matcher<Node*> IsInt32Sub(const Matcher<Node*>& lhs_matcher,
301 const Matcher<Node*>& rhs_matcher);
302Matcher<Node*> IsInt32Mul(const Matcher<Node*>& lhs_matcher,
303 const Matcher<Node*>& rhs_matcher);
304Matcher<Node*> IsInt32MulHigh(const Matcher<Node*>& lhs_matcher,
305 const Matcher<Node*>& rhs_matcher);
306Matcher<Node*> IsInt32LessThan(const Matcher<Node*>& lhs_matcher,
307 const Matcher<Node*>& rhs_matcher);
308Matcher<Node*> IsUint32LessThan(const Matcher<Node*>& lhs_matcher,
309 const Matcher<Node*>& rhs_matcher);
310Matcher<Node*> IsUint32LessThanOrEqual(const Matcher<Node*>& lhs_matcher,
311 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000312Matcher<Node*> IsInt64Add(const Matcher<Node*>& lhs_matcher,
313 const Matcher<Node*>& rhs_matcher);
314Matcher<Node*> IsInt64Sub(const Matcher<Node*>& lhs_matcher,
315 const Matcher<Node*>& rhs_matcher);
316Matcher<Node*> IsJSAdd(const Matcher<Node*>& lhs_matcher,
317 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400318Matcher<Node*> IsChangeFloat64ToInt32(const Matcher<Node*>& input_matcher);
319Matcher<Node*> IsChangeFloat64ToUint32(const Matcher<Node*>& input_matcher);
320Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher);
321Matcher<Node*> IsChangeInt32ToInt64(const Matcher<Node*>& input_matcher);
322Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher);
323Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher);
324Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher);
325Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher);
326Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000327Matcher<Node*> IsFloat32Max(const Matcher<Node*>& lhs_matcher,
328 const Matcher<Node*>& rhs_matcher);
329Matcher<Node*> IsFloat32Min(const Matcher<Node*>& lhs_matcher,
330 const Matcher<Node*>& rhs_matcher);
331Matcher<Node*> IsFloat32Abs(const Matcher<Node*>& input_matcher);
332Matcher<Node*> IsFloat32Equal(const Matcher<Node*>& lhs_matcher,
333 const Matcher<Node*>& rhs_matcher);
334Matcher<Node*> IsFloat32LessThan(const Matcher<Node*>& lhs_matcher,
335 const Matcher<Node*>& rhs_matcher);
336Matcher<Node*> IsFloat32LessThanOrEqual(const Matcher<Node*>& lhs_matcher,
337 const Matcher<Node*>& rhs_matcher);
338Matcher<Node*> IsFloat64Max(const Matcher<Node*>& lhs_matcher,
339 const Matcher<Node*>& rhs_matcher);
340Matcher<Node*> IsFloat64Min(const Matcher<Node*>& lhs_matcher,
341 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400342Matcher<Node*> IsFloat64Sub(const Matcher<Node*>& lhs_matcher,
343 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000344Matcher<Node*> IsFloat64Abs(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400345Matcher<Node*> IsFloat64Sqrt(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000346Matcher<Node*> IsFloat64RoundDown(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400347Matcher<Node*> IsFloat64RoundTruncate(const Matcher<Node*>& input_matcher);
348Matcher<Node*> IsFloat64RoundTiesAway(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000349Matcher<Node*> IsFloat64ExtractLowWord32(const Matcher<Node*>& input_matcher);
350Matcher<Node*> IsFloat64ExtractHighWord32(const Matcher<Node*>& input_matcher);
351Matcher<Node*> IsFloat64InsertLowWord32(const Matcher<Node*>& lhs_matcher,
352 const Matcher<Node*>& rhs_matcher);
353Matcher<Node*> IsFloat64InsertHighWord32(const Matcher<Node*>& lhs_matcher,
354 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400355Matcher<Node*> IsToNumber(const Matcher<Node*>& base_matcher,
356 const Matcher<Node*>& context_matcher,
357 const Matcher<Node*>& effect_matcher,
358 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000359Matcher<Node*> IsLoadContext(const Matcher<ContextAccess>& access_matcher,
360 const Matcher<Node*>& context_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400361Matcher<Node*> IsNumberToInt32(const Matcher<Node*>& input_matcher);
362Matcher<Node*> IsNumberToUint32(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000363Matcher<Node*> IsParameter(const Matcher<int> index_matcher);
364Matcher<Node*> IsLoadFramePointer();
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400365
Ben Murdochda12d292016-06-02 14:46:10 +0100366Matcher<Node*> IsInt32PairAdd(const Matcher<Node*>& a_matcher,
367 const Matcher<Node*>& b_matcher,
368 const Matcher<Node*>& c_matcher,
369 const Matcher<Node*>& d_matcher);
370Matcher<Node*> IsInt32PairSub(const Matcher<Node*>& a_matcher,
371 const Matcher<Node*>& b_matcher,
372 const Matcher<Node*>& c_matcher,
373 const Matcher<Node*>& d_matcher);
374Matcher<Node*> IsInt32PairMul(const Matcher<Node*>& a_matcher,
375 const Matcher<Node*>& b_matcher,
376 const Matcher<Node*>& c_matcher,
377 const Matcher<Node*>& d_matcher);
378
379Matcher<Node*> IsWord32PairShl(const Matcher<Node*>& lhs_matcher,
380 const Matcher<Node*>& mid_matcher,
381 const Matcher<Node*>& rhs_matcher);
382Matcher<Node*> IsWord32PairShr(const Matcher<Node*>& lhs_matcher,
383 const Matcher<Node*>& mid_matcher,
384 const Matcher<Node*>& rhs_matcher);
385
386Matcher<Node*> IsWord32PairSar(const Matcher<Node*>& lhs_matcher,
387 const Matcher<Node*>& mid_matcher,
388 const Matcher<Node*>& rhs_matcher);
389
390Matcher<Node*> IsStackSlot();
391Matcher<Node*> IsGuard(const Matcher<Type*>& type_matcher,
392 const Matcher<Node*>& value_matcher,
393 const Matcher<Node*>& control_matcher);
394
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400395} // namespace compiler
396} // namespace internal
397} // namespace v8
398
399#endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_