Lines Matching refs:m

27   RawMachineAssemblerTester<int32_t> m;  in TEST()  local
28 Node* add = m.Int32Add(m.Int32Constant(0), m.Int32Constant(1)); in TEST()
29 m.Return(add); in TEST()
30 CHECK_EQ(1, m.Call()); in TEST()
34 static Node* Int32Input(RawMachineAssemblerTester<int32_t>* m, int index) { in Int32Input() argument
37 return m->Parameter(0); in Int32Input()
39 return m->Parameter(1); in Int32Input()
41 return m->Int32Constant(0); in Int32Input()
43 return m->Int32Constant(1); in Int32Input()
45 return m->Int32Constant(-1); in Int32Input()
47 return m->Int32Constant(0xff); in Int32Input()
49 return m->Int32Constant(0x01234567); in Int32Input()
51 return m->Load(kMachInt32, m->PointerConstant(NULL)); in Int32Input()
59 RawMachineAssemblerTester<void> m; in TEST() local
62 m.machine()->Word32And(), m.machine()->Word32Or(), in TEST()
63 m.machine()->Word32Xor(), m.machine()->Word32Shl(), in TEST()
64 m.machine()->Word32Shr(), m.machine()->Word32Sar(), in TEST()
65 m.machine()->Word32Equal(), m.machine()->Int32Add(), in TEST()
66 m.machine()->Int32Sub(), m.machine()->Int32Mul(), in TEST()
67 m.machine()->Int32Div(), m.machine()->Int32UDiv(), in TEST()
68 m.machine()->Int32Mod(), m.machine()->Int32UMod(), in TEST()
69 m.machine()->Int32LessThan(), m.machine()->Int32LessThanOrEqual(), in TEST()
70 m.machine()->Uint32LessThan(), m.machine()->Uint32LessThanOrEqual(), in TEST()
76 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32); in TEST() local
77 Node* a = Int32Input(&m, j); in TEST()
78 Node* b = Int32Input(&m, k); in TEST()
79 m.Return(m.NewNode(ops[i], a, b)); in TEST()
80 m.GenerateCode(); in TEST()
88 RawMachineAssemblerTester<int32_t> m; in TEST() local
92 m.Goto(&next); in TEST()
93 m.Bind(&next); in TEST()
94 m.Return(m.Int32Constant(constant)); in TEST()
96 CHECK_EQ(constant, m.Call()); in TEST()
101 RawMachineAssemblerTester<int32_t> m; in TEST() local
106 m.Goto(&labels[i]); in TEST()
107 m.Bind(&labels[i]); in TEST()
109 m.Return(m.Int32Constant(constant)); in TEST()
111 CHECK_EQ(constant, m.Call()); in TEST()
116 RawMachineAssemblerTester<int32_t> m; in TEST() local
120 m.Branch(m.Int32Constant(0), &blocka, &blockb); in TEST()
121 m.Bind(&blocka); in TEST()
122 m.Return(m.Int32Constant(0 - constant)); in TEST()
123 m.Bind(&blockb); in TEST()
124 m.Return(m.Int32Constant(constant)); in TEST()
126 CHECK_EQ(constant, m.Call()); in TEST()
131 RawMachineAssemblerTester<int32_t> m; in TEST() local
135 m.Branch(m.Int32Constant(0), &blocka, &blocka); in TEST()
136 m.Bind(&blocka); in TEST()
137 m.Return(m.Int32Constant(constant)); in TEST()
139 CHECK_EQ(constant, m.Call()); in TEST()
144 RawMachineAssemblerTester<int32_t> m; in TEST() local
148 m.Branch(m.Int32Constant(0), &blocka, &blocka); in TEST()
149 m.Bind(&blockb); in TEST()
150 m.Goto(&blocka); in TEST()
151 m.Bind(&blocka); in TEST()
152 m.Return(m.Int32Constant(constant)); in TEST()
154 CHECK_EQ(constant, m.Call()); in TEST()
159 RawMachineAssemblerTester<int32_t> m; in TEST() local
163 m.Branch(m.Int32Constant(0), &blocka, &blockc); in TEST()
164 m.Bind(&blocka); in TEST()
165 m.Branch(m.Int32Constant(0), &blockb, &blockb); in TEST()
166 m.Bind(&blockc); in TEST()
167 m.Goto(&blockb); in TEST()
168 m.Bind(&blockb); in TEST()
169 m.Return(m.Int32Constant(constant)); in TEST()
171 CHECK_EQ(constant, m.Call()); in TEST()
176 RawMachineAssemblerTester<int32_t> m; in TEST() local
181 m.Branch(m.Int32Constant(0), &blocka, &blockb); in TEST()
182 m.Bind(&blocka); in TEST()
183 m.Goto(&end); in TEST()
184 m.Bind(&blockb); in TEST()
185 m.Goto(&end); in TEST()
186 m.Bind(&end); in TEST()
187 m.Return(m.Int32Constant(constant)); in TEST()
189 CHECK_EQ(constant, m.Call()); in TEST()
194 RawMachineAssemblerTester<int32_t> m; in TEST() local
198 m.Goto(&header); in TEST()
199 m.Bind(&header); in TEST()
200 m.Branch(m.Int32Constant(0), &body, &exit); in TEST()
201 m.Bind(&body); in TEST()
202 m.Goto(&header); in TEST()
203 m.Bind(&exit); in TEST()
204 m.Return(m.Int32Constant(constant)); in TEST()
206 CHECK_EQ(constant, m.Call()); in TEST()
211 static void BuildDiamondPhi(RawMachineAssemblerTester<R>* m, Node* cond_node, in BuildDiamondPhi() argument
215 MLabel* end = m->Exit(); in BuildDiamondPhi()
216 m->Branch(cond_node, &blocka, &blockb); in BuildDiamondPhi()
217 m->Bind(&blocka); in BuildDiamondPhi()
218 m->Goto(end); in BuildDiamondPhi()
219 m->Bind(&blockb); in BuildDiamondPhi()
220 m->Goto(end); in BuildDiamondPhi()
222 m->Bind(end); in BuildDiamondPhi()
223 Node* phi = m->Phi(type, true_node, false_node); in BuildDiamondPhi()
224 m->Return(phi); in BuildDiamondPhi()
229 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
232 Node* true_node = m.Int32Constant(true_val); in TEST()
233 Node* false_node = m.Int32Constant(false_val); in TEST()
234 BuildDiamondPhi(&m, m.Parameter(0), kMachInt32, true_node, false_node); in TEST()
235 CHECK_EQ(false_val, m.Call(0)); in TEST()
236 CHECK_EQ(true_val, m.Call(1)); in TEST()
241 RawMachineAssemblerTester<Object*> m(kMachInt32); in TEST() local
244 Node* true_node = m.NumberConstant(true_val); in TEST()
245 Node* false_node = m.NumberConstant(false_val); in TEST()
246 BuildDiamondPhi(&m, m.Parameter(0), kMachAnyTagged, true_node, false_node); in TEST()
247 m.CheckNumber(false_val, m.Call(0)); in TEST()
248 m.CheckNumber(true_val, m.Call(1)); in TEST()
253 RawMachineAssemblerTester<Object*> m(kMachInt32); in TEST() local
256 Node* true_node = m.StringConstant(true_val); in TEST()
257 Node* false_node = m.StringConstant(false_val); in TEST()
258 BuildDiamondPhi(&m, m.Parameter(0), kMachAnyTagged, true_node, false_node); in TEST()
259 m.CheckString(false_val, m.Call(0)); in TEST()
260 m.CheckString(true_val, m.Call(1)); in TEST()
265 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32, kMachInt32); in TEST() local
266 BuildDiamondPhi(&m, m.Parameter(0), kMachInt32, m.Parameter(1), in TEST()
267 m.Parameter(2)); in TEST()
270 int result = m.Call(0, c1, c2); in TEST()
272 result = m.Call(1, c1, c2); in TEST()
278 RawMachineAssemblerTester<int32_t> m; in TEST() local
282 Node* cond_node = m.Int32Constant(0); in TEST()
283 Node* true_node = m.Int32Constant(true_val); in TEST()
284 Node* false_node = m.Int32Constant(false_val); in TEST()
288 MLabel* end = m.Exit(); in TEST()
290 m.Goto(&header); in TEST()
291 m.Bind(&header); in TEST()
292 Node* phi = m.Phi(kMachInt32, false_node, true_node); in TEST()
293 m.Branch(cond_node, &body, end); in TEST()
294 m.Bind(&body); in TEST()
295 m.Goto(&header); in TEST()
296 m.Bind(end); in TEST()
297 m.Return(phi); in TEST()
299 CHECK_EQ(false_val, m.Call()); in TEST()
304 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32, kMachInt32); in TEST() local
307 MLabel* end = m.Exit(); in TEST()
309 m.Goto(&blocka); in TEST()
311 m.Bind(&blocka); in TEST()
312 Node* phi = m.Phi(kMachInt32, m.Parameter(1), m.Parameter(2)); in TEST()
313 Node* cond = m.Phi(kMachInt32, m.Parameter(0), m.Int32Constant(0)); in TEST()
314 m.Branch(cond, &blockb, end); in TEST()
316 m.Bind(&blockb); in TEST()
317 m.Goto(&blocka); in TEST()
319 m.Bind(end); in TEST()
320 m.Return(phi); in TEST()
324 int result = m.Call(0, c1, c2); in TEST()
326 result = m.Call(1, c1, c2); in TEST()
332 RawMachineAssemblerTester<int32_t> m; in TEST() local
338 MLabel* end = m.Exit(); in TEST()
339 Node* false_node = m.Int32Constant(false_val); in TEST()
341 m.Goto(&header); in TEST()
343 m.Bind(&header); in TEST()
344 Node* phi = m.Phi(kMachInt32, false_node, false_node); in TEST()
345 m.Branch(m.Int32Constant(0), &body, end); in TEST()
347 m.Bind(&body); in TEST()
348 Node* add = m.Int32Add(phi, m.Int32Constant(1)); in TEST()
350 m.Goto(&header); in TEST()
352 m.Bind(end); in TEST()
353 m.Return(phi); in TEST()
355 CHECK_EQ(false_val, m.Call()); in TEST()
360 RawMachineAssemblerTester<int32_t> m; in TEST() local
361 Int32BinopTester bt(&m); in TEST()
365 MLabel* end = m.Exit(); in TEST()
366 Node* zero = m.Int32Constant(0); in TEST()
368 m.Goto(&header); in TEST()
370 m.Bind(&header); in TEST()
371 Node* phi = m.Phi(kMachInt32, zero, zero); in TEST()
372 m.Branch(m.WordXor(phi, bt.param0), &body, end); in TEST()
374 m.Bind(&body); in TEST()
375 phi->ReplaceInput(1, m.Int32Add(phi, m.Int32Constant(1))); in TEST()
376 m.Goto(&header); in TEST()
378 m.Bind(end); in TEST()
388 RawMachineAssemblerTester<int32_t> m; in TEST() local
389 Int32BinopTester bt(&m); in TEST()
393 MLabel* end = m.Exit(); in TEST()
394 Node* zero = m.Int32Constant(0); in TEST()
396 m.Goto(&header); in TEST()
398 m.Bind(&header); in TEST()
399 Node* phi = m.Phi(kMachInt32, zero, zero); in TEST()
400 m.Branch(m.Int32LessThan(phi, bt.param0), &body, end); in TEST()
402 m.Bind(&body); in TEST()
403 phi->ReplaceInput(1, m.Int32Add(phi, m.Int32Constant(1))); in TEST()
404 m.Goto(&header); in TEST()
406 m.Bind(end); in TEST()
417 RawMachineAssemblerTester<int32_t> m; in TEST() local
418 Int32BinopTester bt(&m); in TEST()
422 MLabel* end = m.Exit(); in TEST()
423 Node* zero = m.Int32Constant(0); in TEST()
425 m.Goto(&header); in TEST()
427 m.Bind(&header); in TEST()
428 Node* phi = m.Phi(kMachInt32, zero, zero); in TEST()
429 m.Branch(m.Uint32LessThan(phi, bt.param0), &body, end); in TEST()
431 m.Bind(&body); in TEST()
432 phi->ReplaceInput(1, m.Int32Add(phi, m.Int32Constant(1))); in TEST()
433 m.Goto(&header); in TEST()
435 m.Bind(end); in TEST()
446 RawMachineAssemblerTester<int32_t> m; in TEST() local
447 Int32BinopTester bt(&m); in TEST()
451 MLabel* end = m.Exit(); in TEST()
453 m.Goto(&header); in TEST()
455 m.Bind(&header); in TEST()
456 Node* phi = m.Phi(kMachInt32, bt.param0, m.Int32Constant(0)); in TEST()
457 m.Branch(phi, &body, end); in TEST()
459 m.Bind(&body); in TEST()
460 phi->ReplaceInput(1, m.Int32Sub(phi, m.Int32Constant(1))); in TEST()
461 m.Goto(&header); in TEST()
463 m.Bind(end); in TEST()
473 RawMachineAssemblerTester<int32_t> m; in TEST() local
477 MLabel* end = m.Exit(); in TEST()
478 Node* minus_3 = m.Float64Constant(-3.0); in TEST()
479 Node* ten = m.Float64Constant(10.0); in TEST()
481 m.Goto(&header); in TEST()
483 m.Bind(&header); in TEST()
484 Node* phi = m.Phi(kMachFloat64, minus_3, ten); in TEST()
485 m.Branch(m.Float64LessThan(phi, ten), &body, end); in TEST()
487 m.Bind(&body); in TEST()
488 phi->ReplaceInput(1, m.Float64Add(phi, m.Float64Constant(0.5))); in TEST()
489 m.Goto(&header); in TEST()
491 m.Bind(end); in TEST()
492 m.Return(m.ChangeFloat64ToInt32(phi)); in TEST()
494 CHECK_EQ(10, m.Call()); in TEST()
499 RawMachineAssemblerTester<int32_t> m; in TEST() local
502 m.Return(m.LoadFromPointer(&p1, kMachInt32)); in TEST()
506 CHECK_EQ(p1, m.Call()); in TEST()
518 RawMachineAssemblerTester<int32_t> m; in TEST() local
522 m.Return(m.LoadFromPointer(pointer, kMachInt32, offset)); in TEST()
526 CHECK_EQ(p1, m.Call()); in TEST()
538 RawMachineAssemblerTester<int32_t> m; in TEST() local
544 m.Load(kMachFloat64, m.PointerConstant(from), m.Int32Constant(offset)); in TEST()
545 m.Store(kMachFloat64, m.PointerConstant(to), m.Int32Constant(offset), load); in TEST()
546 m.Return(m.Int32Constant(magic)); in TEST()
551 CHECK_EQ(magic, m.Call()); in TEST()
559 RawMachineAssemblerTester<int32_t> m; in TEST() local
560 Int32BinopTester bt(&m); in TEST()
562 bt.AddReturn(m.Int32Add(bt.param0, bt.param1)); in TEST()
576 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, kMachUint32); in TEST() local
577 m.Return(m.Int32Add(m.Parameter(0), in TEST()
578 m.Word32Sar(m.Parameter(1), m.Parameter(2)))); in TEST()
584 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
590 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachUint32, kMachUint32); in TEST() local
591 m.Return(m.Int32Add(m.Word32Sar(m.Parameter(0), m.Parameter(1)), in TEST()
592 m.Parameter(2))); in TEST()
598 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
608 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, kMachUint32); in TEST() local
609 m.Return(m.Int32Add(m.Parameter(0), in TEST()
610 m.Word32Shl(m.Parameter(1), m.Parameter(2)))); in TEST()
616 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
622 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachUint32, kMachUint32); in TEST() local
623 m.Return(m.Int32Add(m.Word32Shl(m.Parameter(0), m.Parameter(1)), in TEST()
624 m.Parameter(2))); in TEST()
630 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
640 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachUint32, kMachUint32); in TEST() local
641 m.Return(m.Int32Add(m.Parameter(0), in TEST()
642 m.Word32Shr(m.Parameter(1), m.Parameter(2)))); in TEST()
648 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
654 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachUint32, kMachUint32); in TEST() local
655 m.Return(m.Int32Add(m.Word32Shr(m.Parameter(0), m.Parameter(1)), in TEST()
656 m.Parameter(2))); in TEST()
662 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
673 RawMachineAssemblerTester<int32_t> m; in TEST() local
674 Uint32BinopTester bt(&m); in TEST()
676 m.Branch( in TEST()
677 m.Word32Equal(m.Int32Add(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
679 m.Bind(&blocka); in TEST()
680 bt.AddReturn(m.Int32Constant(constant)); in TEST()
681 m.Bind(&blockb); in TEST()
682 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
691 RawMachineAssemblerTester<int32_t> m; in TEST() local
692 Uint32BinopTester bt(&m); in TEST()
694 m.Branch( in TEST()
695 m.Word32NotEqual(m.Int32Add(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
697 m.Bind(&blocka); in TEST()
698 bt.AddReturn(m.Int32Constant(constant)); in TEST()
699 m.Bind(&blockb); in TEST()
700 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
710 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
712 m.Branch(m.Word32Equal(m.Int32Add(m.Int32Constant(*i), m.Parameter(0)), in TEST()
713 m.Int32Constant(0)), in TEST()
715 m.Bind(&blocka); in TEST()
716 m.Return(m.Int32Constant(constant)); in TEST()
717 m.Bind(&blockb); in TEST()
718 m.Return(m.Int32Constant(0 - constant)); in TEST()
721 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
727 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
729 m.Branch(m.Word32NotEqual(m.Int32Add(m.Int32Constant(*i), m.Parameter(0)), in TEST()
730 m.Int32Constant(0)), in TEST()
732 m.Bind(&blocka); in TEST()
733 m.Return(m.Int32Constant(constant)); in TEST()
734 m.Bind(&blockb); in TEST()
735 m.Return(m.Int32Constant(0 - constant)); in TEST()
738 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
743 RawMachineAssemblerTester<void> m; in TEST() local
744 const Operator* shops[] = {m.machine()->Word32Sar(), in TEST()
745 m.machine()->Word32Shl(), in TEST()
746 m.machine()->Word32Shr()}; in TEST()
748 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, in TEST() local
751 m.Branch(m.Word32Equal(m.Int32Add(m.Parameter(0), in TEST()
752 m.NewNode(shops[n], m.Parameter(1), in TEST()
753 m.Parameter(2))), in TEST()
754 m.Int32Constant(0)), in TEST()
756 m.Bind(&blocka); in TEST()
757 m.Return(m.Int32Constant(constant)); in TEST()
758 m.Bind(&blockb); in TEST()
759 m.Return(m.Int32Constant(0 - constant)); in TEST()
778 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
789 RawMachineAssemblerTester<int32_t> m; in TEST() local
790 Uint32BinopTester bt(&m); in TEST()
792 m.Word32Equal(m.Int32Add(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
801 RawMachineAssemblerTester<int32_t> m; in TEST() local
802 Uint32BinopTester bt(&m); in TEST()
804 m.Word32Equal(m.Int32Constant(0), m.Int32Add(bt.param0, bt.param1))); in TEST()
814 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
815 m.Return(m.Word32Equal(m.Int32Add(m.Int32Constant(*i), m.Parameter(0)), in TEST()
816 m.Int32Constant(0))); in TEST()
819 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
825 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
826 m.Return(m.Word32Equal(m.Int32Add(m.Parameter(0), m.Int32Constant(*i)), in TEST()
827 m.Int32Constant(0))); in TEST()
830 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
835 RawMachineAssemblerTester<void> m; in TEST() local
836 const Operator* shops[] = {m.machine()->Word32Sar(), in TEST()
837 m.machine()->Word32Shl(), in TEST()
838 m.machine()->Word32Shr()}; in TEST()
840 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, in TEST() local
842 m.Return(m.Word32Equal( in TEST()
843 m.Int32Add(m.Parameter(0), in TEST()
844 m.NewNode(shops[n], m.Parameter(1), m.Parameter(2))), in TEST()
845 m.Int32Constant(0))); in TEST()
864 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
874 RawMachineAssemblerTester<int32_t> m; in TEST() local
875 Uint32BinopTester bt(&m); in TEST()
877 m.Return(m.Int32Sub(bt.param0, bt.param1)); in TEST()
891 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
892 m.Return(m.Int32Sub(m.Int32Constant(*i), m.Parameter(0))); in TEST()
895 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
901 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
902 m.Return(m.Int32Sub(m.Parameter(0), m.Int32Constant(*i))); in TEST()
905 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
914 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, kMachUint32); in TEST() local
915 m.Return(m.Int32Sub(m.Parameter(0), in TEST()
916 m.Word32Sar(m.Parameter(1), m.Parameter(2)))); in TEST()
921 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
927 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachUint32, kMachUint32); in TEST() local
928 m.Return(m.Int32Sub(m.Word32Sar(m.Parameter(0), m.Parameter(1)), in TEST()
929 m.Parameter(2))); in TEST()
934 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
944 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, kMachUint32); in TEST() local
945 m.Return(m.Int32Sub(m.Parameter(0), in TEST()
946 m.Word32Shl(m.Parameter(1), m.Parameter(2)))); in TEST()
951 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
957 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachUint32, kMachUint32); in TEST() local
958 m.Return(m.Int32Sub(m.Word32Shl(m.Parameter(0), m.Parameter(1)), in TEST()
959 m.Parameter(2))); in TEST()
965 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
975 RawMachineAssemblerTester<uint32_t> m(kMachUint32, kMachUint32, in TEST() local
977 m.Return(m.Int32Sub(m.Parameter(0), in TEST()
978 m.Word32Shr(m.Parameter(1), m.Parameter(2)))); in TEST()
984 CHECK_UINT32_EQ(expected, m.Call(*i, *j, shift)); in TEST()
990 RawMachineAssemblerTester<uint32_t> m(kMachUint32, kMachUint32, in TEST() local
992 m.Return(m.Int32Sub(m.Word32Shr(m.Parameter(0), m.Parameter(1)), in TEST()
993 m.Parameter(2))); in TEST()
999 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
1010 RawMachineAssemblerTester<int32_t> m; in TEST() local
1011 Uint32BinopTester bt(&m); in TEST()
1013 m.Branch( in TEST()
1014 m.Word32Equal(m.Int32Sub(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
1016 m.Bind(&blocka); in TEST()
1017 bt.AddReturn(m.Int32Constant(constant)); in TEST()
1018 m.Bind(&blockb); in TEST()
1019 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
1028 RawMachineAssemblerTester<int32_t> m; in TEST() local
1029 Uint32BinopTester bt(&m); in TEST()
1031 m.Branch( in TEST()
1032 m.Word32NotEqual(m.Int32Sub(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
1034 m.Bind(&blocka); in TEST()
1035 bt.AddReturn(m.Int32Constant(constant)); in TEST()
1036 m.Bind(&blockb); in TEST()
1037 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
1047 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1049 m.Branch(m.Word32Equal(m.Int32Sub(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1050 m.Int32Constant(0)), in TEST()
1052 m.Bind(&blocka); in TEST()
1053 m.Return(m.Int32Constant(constant)); in TEST()
1054 m.Bind(&blockb); in TEST()
1055 m.Return(m.Int32Constant(0 - constant)); in TEST()
1058 CHECK_EQ(expected, m.Call(*j)); in TEST()
1064 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
1066 m.Branch(m.Word32NotEqual(m.Int32Sub(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1067 m.Int32Constant(0)), in TEST()
1069 m.Bind(&blocka); in TEST()
1070 m.Return(m.Int32Constant(constant)); in TEST()
1071 m.Bind(&blockb); in TEST()
1072 m.Return(m.Int32Constant(0 - constant)); in TEST()
1075 CHECK_EQ(expected, m.Call(*j)); in TEST()
1080 RawMachineAssemblerTester<void> m; in TEST() local
1081 const Operator* shops[] = {m.machine()->Word32Sar(), in TEST()
1082 m.machine()->Word32Shl(), in TEST()
1083 m.machine()->Word32Shr()}; in TEST()
1085 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, in TEST() local
1088 m.Branch(m.Word32Equal(m.Int32Sub(m.Parameter(0), in TEST()
1089 m.NewNode(shops[n], m.Parameter(1), in TEST()
1090 m.Parameter(2))), in TEST()
1091 m.Int32Constant(0)), in TEST()
1093 m.Bind(&blocka); in TEST()
1094 m.Return(m.Int32Constant(constant)); in TEST()
1095 m.Bind(&blockb); in TEST()
1096 m.Return(m.Int32Constant(0 - constant)); in TEST()
1115 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
1126 RawMachineAssemblerTester<int32_t> m; in TEST() local
1127 Uint32BinopTester bt(&m); in TEST()
1129 m.Word32Equal(m.Int32Sub(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
1138 RawMachineAssemblerTester<int32_t> m; in TEST() local
1139 Uint32BinopTester bt(&m); in TEST()
1141 m.Word32Equal(m.Int32Constant(0), m.Int32Sub(bt.param0, bt.param1))); in TEST()
1151 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1152 m.Return(m.Word32Equal(m.Int32Sub(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1153 m.Int32Constant(0))); in TEST()
1156 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1162 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1163 m.Return(m.Word32Equal(m.Int32Sub(m.Parameter(0), m.Int32Constant(*i)), in TEST()
1164 m.Int32Constant(0))); in TEST()
1167 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1172 RawMachineAssemblerTester<void> m; in TEST() local
1173 const Operator* shops[] = {m.machine()->Word32Sar(), in TEST()
1174 m.machine()->Word32Shl(), in TEST()
1175 m.machine()->Word32Shr()}; in TEST()
1177 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, in TEST() local
1179 m.Return(m.Word32Equal( in TEST()
1180 m.Int32Sub(m.Parameter(0), in TEST()
1181 m.NewNode(shops[n], m.Parameter(1), m.Parameter(2))), in TEST()
1182 m.Int32Constant(0))); in TEST()
1201 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
1212 RawMachineAssemblerTester<int32_t> m; in TEST() local
1213 Int32BinopTester bt(&m); in TEST()
1214 bt.AddReturn(m.Int32Mul(bt.param0, bt.param1)); in TEST()
1223 RawMachineAssemblerTester<int32_t> m; in TEST() local
1224 Uint32BinopTester bt(&m); in TEST()
1225 bt.AddReturn(m.Int32Mul(bt.param0, bt.param1)); in TEST()
1239 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1240 m.Return(m.Int32Mul(m.Int32Constant(*i), m.Parameter(0))); in TEST()
1243 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1249 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1250 m.Return(m.Int32Mul(m.Parameter(0), m.Int32Constant(*i))); in TEST()
1253 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1262 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32, kMachInt32); in TEST() local
1263 m.Return( in TEST()
1264 m.Int32Add(m.Parameter(0), m.Int32Mul(m.Parameter(1), m.Parameter(2)))); in TEST()
1272 CHECK_EQ(expected, m.Call(p0, p1, p2)); in TEST()
1278 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32, kMachInt32); in TEST() local
1279 m.Return( in TEST()
1280 m.Int32Add(m.Int32Mul(m.Parameter(0), m.Parameter(1)), m.Parameter(2))); in TEST()
1288 CHECK_EQ(expected, m.Call(p0, p1, p2)); in TEST()
1295 RawMachineAssemblerTester<int32_t> m; in TEST() local
1296 Int32BinopTester bt(&m); in TEST()
1298 m.Int32Add(m.Int32Constant(*i), m.Int32Mul(bt.param0, bt.param1))); in TEST()
1314 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, kMachInt32); in TEST() local
1315 m.Return( in TEST()
1316 m.Int32Sub(m.Parameter(0), m.Int32Mul(m.Parameter(1), m.Parameter(2)))); in TEST()
1325 CHECK_EQ(expected, m.Call(p0, p1, p2)); in TEST()
1332 RawMachineAssemblerTester<int32_t> m; in TEST() local
1333 Int32BinopTester bt(&m); in TEST()
1335 m.Int32Sub(m.Int32Constant(*i), m.Int32Mul(bt.param0, bt.param1))); in TEST()
1352 RawMachineAssemblerTester<int32_t> m; in TEST() local
1353 Int32BinopTester bt(&m); in TEST()
1354 bt.AddReturn(m.Int32Div(bt.param0, bt.param1)); in TEST()
1367 RawMachineAssemblerTester<int32_t> m; in TEST() local
1368 Int32BinopTester bt(&m); in TEST()
1369 bt.AddReturn(m.Int32Add(bt.param0, m.Int32Div(bt.param0, bt.param1))); in TEST()
1386 RawMachineAssemblerTester<int32_t> m; in TEST() local
1387 Int32BinopTester bt(&m); in TEST()
1388 bt.AddReturn(m.Int32UDiv(bt.param0, bt.param1)); in TEST()
1401 RawMachineAssemblerTester<int32_t> m; in TEST() local
1402 Int32BinopTester bt(&m); in TEST()
1403 bt.AddReturn(m.Int32Add(bt.param0, m.Int32UDiv(bt.param0, bt.param1))); in TEST()
1420 RawMachineAssemblerTester<int32_t> m; in TEST() local
1421 Int32BinopTester bt(&m); in TEST()
1422 bt.AddReturn(m.Int32Mod(bt.param0, bt.param1)); in TEST()
1435 RawMachineAssemblerTester<int32_t> m; in TEST() local
1436 Int32BinopTester bt(&m); in TEST()
1437 bt.AddReturn(m.Int32Add(bt.param0, m.Int32Mod(bt.param0, bt.param1))); in TEST()
1454 RawMachineAssemblerTester<int32_t> m; in TEST() local
1455 Int32BinopTester bt(&m); in TEST()
1456 bt.AddReturn(m.Int32UMod(bt.param0, bt.param1)); in TEST()
1469 RawMachineAssemblerTester<int32_t> m; in TEST() local
1470 Int32BinopTester bt(&m); in TEST()
1471 bt.AddReturn(m.Int32Add(bt.param0, m.Int32UMod(bt.param0, bt.param1))); in TEST()
1488 RawMachineAssemblerTester<int32_t> m; in TEST() local
1489 Int32BinopTester bt(&m); in TEST()
1490 bt.AddReturn(m.Word32And(bt.param0, bt.param1)); in TEST()
1499 RawMachineAssemblerTester<int32_t> m; in TEST() local
1500 Int32BinopTester bt(&m); in TEST()
1501 bt.AddReturn(m.Word32And(bt.param0, m.Word32Not(bt.param1))); in TEST()
1510 RawMachineAssemblerTester<int32_t> m; in TEST() local
1511 Int32BinopTester bt(&m); in TEST()
1512 bt.AddReturn(m.Word32And(m.Word32Not(bt.param0), bt.param1)); in TEST()
1525 RawMachineAssemblerTester<int32_t> m; in TEST() local
1526 Uint32BinopTester bt(&m); in TEST()
1528 m.Word32Shl(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1f)))); in TEST()
1537 RawMachineAssemblerTester<int32_t> m; in TEST() local
1538 Uint32BinopTester bt(&m); in TEST()
1540 m.Word32Shl(bt.param0, m.Word32And(m.Int32Constant(0x1f), bt.param1))); in TEST()
1553 RawMachineAssemblerTester<int32_t> m; in TEST() local
1554 Uint32BinopTester bt(&m); in TEST()
1556 m.Word32Shr(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1f)))); in TEST()
1565 RawMachineAssemblerTester<int32_t> m; in TEST() local
1566 Uint32BinopTester bt(&m); in TEST()
1568 m.Word32Shr(bt.param0, m.Word32And(m.Int32Constant(0x1f), bt.param1))); in TEST()
1581 RawMachineAssemblerTester<int32_t> m; in TEST() local
1582 Int32BinopTester bt(&m); in TEST()
1584 m.Word32Sar(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1f)))); in TEST()
1593 RawMachineAssemblerTester<int32_t> m; in TEST() local
1594 Int32BinopTester bt(&m); in TEST()
1596 m.Word32Sar(bt.param0, m.Word32And(m.Int32Constant(0x1f), bt.param1))); in TEST()
1610 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1611 m.Return(m.Word32And(m.Int32Constant(*i), m.Parameter(0))); in TEST()
1614 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1620 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1621 m.Return(m.Word32And(m.Int32Constant(*i), m.Word32Not(m.Parameter(0)))); in TEST()
1624 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1634 RawMachineAssemblerTester<int32_t> m; in TEST() local
1635 Uint32BinopTester bt(&m); in TEST()
1637 m.Branch( in TEST()
1638 m.Word32Equal(m.Word32And(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
1640 m.Bind(&blocka); in TEST()
1641 bt.AddReturn(m.Int32Constant(constant)); in TEST()
1642 m.Bind(&blockb); in TEST()
1643 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
1652 RawMachineAssemblerTester<int32_t> m; in TEST() local
1653 Uint32BinopTester bt(&m); in TEST()
1655 m.Branch( in TEST()
1656 m.Word32NotEqual(m.Word32And(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
1658 m.Bind(&blocka); in TEST()
1659 bt.AddReturn(m.Int32Constant(constant)); in TEST()
1660 m.Bind(&blockb); in TEST()
1661 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
1671 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
1673 m.Branch(m.Word32Equal(m.Word32And(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1674 m.Int32Constant(0)), in TEST()
1676 m.Bind(&blocka); in TEST()
1677 m.Return(m.Int32Constant(constant)); in TEST()
1678 m.Bind(&blockb); in TEST()
1679 m.Return(m.Int32Constant(0 - constant)); in TEST()
1682 CHECK_EQ(expected, m.Call(*j)); in TEST()
1688 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
1690 m.Branch( in TEST()
1691 m.Word32NotEqual(m.Word32And(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1692 m.Int32Constant(0)), in TEST()
1694 m.Bind(&blocka); in TEST()
1695 m.Return(m.Int32Constant(constant)); in TEST()
1696 m.Bind(&blockb); in TEST()
1697 m.Return(m.Int32Constant(0 - constant)); in TEST()
1700 CHECK_EQ(expected, m.Call(*j)); in TEST()
1705 RawMachineAssemblerTester<void> m; in TEST() local
1706 const Operator* shops[] = {m.machine()->Word32Sar(), in TEST()
1707 m.machine()->Word32Shl(), in TEST()
1708 m.machine()->Word32Shr()}; in TEST()
1710 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, in TEST() local
1713 m.Branch(m.Word32Equal(m.Word32And(m.Parameter(0), in TEST()
1714 m.NewNode(shops[n], m.Parameter(1), in TEST()
1715 m.Parameter(2))), in TEST()
1716 m.Int32Constant(0)), in TEST()
1718 m.Bind(&blocka); in TEST()
1719 m.Return(m.Int32Constant(constant)); in TEST()
1720 m.Bind(&blockb); in TEST()
1721 m.Return(m.Int32Constant(0 - constant)); in TEST()
1740 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
1751 RawMachineAssemblerTester<int32_t> m; in TEST() local
1752 Uint32BinopTester bt(&m); in TEST()
1754 m.Word32Equal(m.Word32And(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
1763 RawMachineAssemblerTester<int32_t> m; in TEST() local
1764 Uint32BinopTester bt(&m); in TEST()
1766 m.Word32Equal(m.Int32Constant(0), m.Word32And(bt.param0, bt.param1))); in TEST()
1776 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1777 m.Return(m.Word32Equal(m.Word32And(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1778 m.Int32Constant(0))); in TEST()
1781 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1787 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1788 m.Return(m.Word32Equal(m.Word32And(m.Parameter(0), m.Int32Constant(*i)), in TEST()
1789 m.Int32Constant(0))); in TEST()
1792 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1801 RawMachineAssemblerTester<int32_t> m; in TEST() local
1802 Uint32BinopTester bt(&m); in TEST()
1803 bt.AddReturn(m.Word32Or(bt.param0, bt.param1)); in TEST()
1812 RawMachineAssemblerTester<int32_t> m; in TEST() local
1813 Uint32BinopTester bt(&m); in TEST()
1814 bt.AddReturn(m.Word32Or(bt.param0, m.Word32Not(bt.param1))); in TEST()
1823 RawMachineAssemblerTester<int32_t> m; in TEST() local
1824 Uint32BinopTester bt(&m); in TEST()
1825 bt.AddReturn(m.Word32Or(m.Word32Not(bt.param0), bt.param1)); in TEST()
1839 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1840 m.Return(m.Word32Or(m.Int32Constant(*i), m.Parameter(0))); in TEST()
1843 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1849 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
1850 m.Return(m.Word32Or(m.Int32Constant(*i), m.Word32Not(m.Parameter(0)))); in TEST()
1853 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
1863 RawMachineAssemblerTester<int32_t> m; in TEST() local
1864 Int32BinopTester bt(&m); in TEST()
1866 m.Branch( in TEST()
1867 m.Word32Equal(m.Word32Or(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
1869 m.Bind(&blocka); in TEST()
1870 bt.AddReturn(m.Int32Constant(constant)); in TEST()
1871 m.Bind(&blockb); in TEST()
1872 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
1881 RawMachineAssemblerTester<int32_t> m; in TEST() local
1882 Int32BinopTester bt(&m); in TEST()
1884 m.Branch( in TEST()
1885 m.Word32NotEqual(m.Word32Or(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
1887 m.Bind(&blocka); in TEST()
1888 bt.AddReturn(m.Int32Constant(constant)); in TEST()
1889 m.Bind(&blockb); in TEST()
1890 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
1900 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
1902 m.Branch(m.Word32Equal(m.Word32Or(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1903 m.Int32Constant(0)), in TEST()
1905 m.Bind(&blocka); in TEST()
1906 m.Return(m.Int32Constant(constant)); in TEST()
1907 m.Bind(&blockb); in TEST()
1908 m.Return(m.Int32Constant(0 - constant)); in TEST()
1911 CHECK_EQ(expected, m.Call(*j)); in TEST()
1917 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
1919 m.Branch(m.Word32NotEqual(m.Word32Or(m.Int32Constant(*i), m.Parameter(0)), in TEST()
1920 m.Int32Constant(0)), in TEST()
1922 m.Bind(&blocka); in TEST()
1923 m.Return(m.Int32Constant(constant)); in TEST()
1924 m.Bind(&blockb); in TEST()
1925 m.Return(m.Int32Constant(0 - constant)); in TEST()
1928 CHECK_EQ(expected, m.Call(*j)); in TEST()
1933 RawMachineAssemblerTester<void> m; in TEST() local
1934 const Operator* shops[] = {m.machine()->Word32Sar(), in TEST()
1935 m.machine()->Word32Shl(), in TEST()
1936 m.machine()->Word32Shr()}; in TEST()
1938 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, in TEST() local
1941 m.Branch(m.Word32Equal(m.Word32Or(m.Parameter(0), in TEST()
1942 m.NewNode(shops[n], m.Parameter(1), in TEST()
1943 m.Parameter(2))), in TEST()
1944 m.Int32Constant(0)), in TEST()
1946 m.Bind(&blocka); in TEST()
1947 m.Return(m.Int32Constant(constant)); in TEST()
1948 m.Bind(&blockb); in TEST()
1949 m.Return(m.Int32Constant(0 - constant)); in TEST()
1968 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
1979 RawMachineAssemblerTester<int32_t> m; in TEST() local
1980 Uint32BinopTester bt(&m); in TEST()
1982 m.Word32Equal(m.Word32Or(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
1991 RawMachineAssemblerTester<int32_t> m; in TEST() local
1992 Uint32BinopTester bt(&m); in TEST()
1994 m.Word32Equal(m.Int32Constant(0), m.Word32Or(bt.param0, bt.param1))); in TEST()
2004 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
2005 m.Return(m.Word32Equal(m.Word32Or(m.Int32Constant(*i), m.Parameter(0)), in TEST()
2006 m.Int32Constant(0))); in TEST()
2009 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2015 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
2016 m.Return(m.Word32Equal(m.Word32Or(m.Parameter(0), m.Int32Constant(*i)), in TEST()
2017 m.Int32Constant(0))); in TEST()
2020 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2030 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2031 m.Return(m.Word32Xor(m.Int32Constant(*i), m.Parameter(0))); in TEST()
2034 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2039 RawMachineAssemblerTester<int32_t> m; in TEST() local
2040 Uint32BinopTester bt(&m); in TEST()
2041 bt.AddReturn(m.Word32Xor(bt.param0, bt.param1)); in TEST()
2050 RawMachineAssemblerTester<int32_t> m; in TEST() local
2051 Int32BinopTester bt(&m); in TEST()
2052 bt.AddReturn(m.Word32Xor(bt.param0, m.Word32Not(bt.param1))); in TEST()
2061 RawMachineAssemblerTester<int32_t> m; in TEST() local
2062 Int32BinopTester bt(&m); in TEST()
2063 bt.AddReturn(m.Word32Xor(m.Word32Not(bt.param0), bt.param1)); in TEST()
2073 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
2074 m.Return(m.Word32Xor(m.Int32Constant(*i), m.Word32Not(m.Parameter(0)))); in TEST()
2077 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2087 RawMachineAssemblerTester<int32_t> m; in TEST() local
2088 Uint32BinopTester bt(&m); in TEST()
2090 m.Branch( in TEST()
2091 m.Word32Equal(m.Word32Xor(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
2093 m.Bind(&blocka); in TEST()
2094 bt.AddReturn(m.Int32Constant(constant)); in TEST()
2095 m.Bind(&blockb); in TEST()
2096 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
2105 RawMachineAssemblerTester<int32_t> m; in TEST() local
2106 Uint32BinopTester bt(&m); in TEST()
2108 m.Branch( in TEST()
2109 m.Word32NotEqual(m.Word32Xor(bt.param0, bt.param1), m.Int32Constant(0)), in TEST()
2111 m.Bind(&blocka); in TEST()
2112 bt.AddReturn(m.Int32Constant(constant)); in TEST()
2113 m.Bind(&blockb); in TEST()
2114 bt.AddReturn(m.Int32Constant(0 - constant)); in TEST()
2124 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
2126 m.Branch(m.Word32Equal(m.Word32Xor(m.Int32Constant(*i), m.Parameter(0)), in TEST()
2127 m.Int32Constant(0)), in TEST()
2129 m.Bind(&blocka); in TEST()
2130 m.Return(m.Int32Constant(constant)); in TEST()
2131 m.Bind(&blockb); in TEST()
2132 m.Return(m.Int32Constant(0 - constant)); in TEST()
2135 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2141 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
2143 m.Branch( in TEST()
2144 m.Word32NotEqual(m.Word32Xor(m.Int32Constant(*i), m.Parameter(0)), in TEST()
2145 m.Int32Constant(0)), in TEST()
2147 m.Bind(&blocka); in TEST()
2148 m.Return(m.Int32Constant(constant)); in TEST()
2149 m.Bind(&blockb); in TEST()
2150 m.Return(m.Int32Constant(0 - constant)); in TEST()
2153 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2158 RawMachineAssemblerTester<void> m; in TEST() local
2159 const Operator* shops[] = {m.machine()->Word32Sar(), in TEST()
2160 m.machine()->Word32Shl(), in TEST()
2161 m.machine()->Word32Shr()}; in TEST()
2163 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachInt32, in TEST() local
2166 m.Branch(m.Word32Equal(m.Word32Xor(m.Parameter(0), in TEST()
2167 m.NewNode(shops[n], m.Parameter(1), in TEST()
2168 m.Parameter(2))), in TEST()
2169 m.Int32Constant(0)), in TEST()
2171 m.Bind(&blocka); in TEST()
2172 m.Return(m.Int32Constant(constant)); in TEST()
2173 m.Bind(&blockb); in TEST()
2174 m.Return(m.Int32Constant(0 - constant)); in TEST()
2193 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
2205 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
2206 m.Return(m.Word32Shl(m.Parameter(0), m.Int32Constant(shift))); in TEST()
2209 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2214 RawMachineAssemblerTester<int32_t> m; in TEST() local
2215 Uint32BinopTester bt(&m); in TEST()
2216 bt.AddReturn(m.Word32Shl(bt.param0, bt.param1)); in TEST()
2229 RawMachineAssemblerTester<int32_t> m; in TEST() local
2230 Uint32BinopTester bt(&m); in TEST()
2232 m.Word32Equal(m.Word32Shl(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
2241 RawMachineAssemblerTester<int32_t> m; in TEST() local
2242 Uint32BinopTester bt(&m); in TEST()
2244 m.Word32Equal(m.Int32Constant(0), m.Word32Shl(bt.param0, bt.param1))); in TEST()
2254 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2255 m.Return( in TEST()
2256 m.Word32Equal(m.Int32Constant(0), in TEST()
2257 m.Word32Shl(m.Parameter(0), m.Int32Constant(shift)))); in TEST()
2260 CHECK_UINT32_EQ(expected, m.Call(*i)); in TEST()
2266 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2267 m.Return( in TEST()
2268 m.Word32Equal(m.Word32Shl(m.Parameter(0), m.Int32Constant(shift)), in TEST()
2269 m.Int32Constant(0))); in TEST()
2272 CHECK_UINT32_EQ(expected, m.Call(*i)); in TEST()
2282 RawMachineAssemblerTester<uint32_t> m(kMachUint32); in TEST() local
2283 m.Return(m.Word32Shr(m.Parameter(0), m.Int32Constant(shift))); in TEST()
2286 CHECK_UINT32_EQ(expected, m.Call(*j)); in TEST()
2291 RawMachineAssemblerTester<int32_t> m; in TEST() local
2292 Uint32BinopTester bt(&m); in TEST()
2293 bt.AddReturn(m.Word32Shr(bt.param0, bt.param1)); in TEST()
2307 RawMachineAssemblerTester<int32_t> m; in TEST() local
2308 Uint32BinopTester bt(&m); in TEST()
2310 m.Word32Equal(m.Word32Shr(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
2319 RawMachineAssemblerTester<int32_t> m; in TEST() local
2320 Uint32BinopTester bt(&m); in TEST()
2322 m.Word32Equal(m.Int32Constant(0), m.Word32Shr(bt.param0, bt.param1))); in TEST()
2332 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2333 m.Return( in TEST()
2334 m.Word32Equal(m.Int32Constant(0), in TEST()
2335 m.Word32Shr(m.Parameter(0), m.Int32Constant(shift)))); in TEST()
2338 CHECK_UINT32_EQ(expected, m.Call(*i)); in TEST()
2344 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2345 m.Return( in TEST()
2346 m.Word32Equal(m.Word32Shr(m.Parameter(0), m.Int32Constant(shift)), in TEST()
2347 m.Int32Constant(0))); in TEST()
2350 CHECK_UINT32_EQ(expected, m.Call(*i)); in TEST()
2360 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
2361 m.Return(m.Word32Sar(m.Parameter(0), m.Int32Constant(shift))); in TEST()
2364 CHECK_EQ(expected, m.Call(*j)); in TEST()
2369 RawMachineAssemblerTester<int32_t> m; in TEST() local
2370 Int32BinopTester bt(&m); in TEST()
2371 bt.AddReturn(m.Word32Sar(bt.param0, bt.param1)); in TEST()
2385 RawMachineAssemblerTester<int32_t> m; in TEST() local
2386 Int32BinopTester bt(&m); in TEST()
2388 m.Word32Equal(m.Word32Sar(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
2397 RawMachineAssemblerTester<int32_t> m; in TEST() local
2398 Int32BinopTester bt(&m); in TEST()
2400 m.Word32Equal(m.Int32Constant(0), m.Word32Sar(bt.param0, bt.param1))); in TEST()
2410 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
2411 m.Return( in TEST()
2412 m.Word32Equal(m.Int32Constant(0), in TEST()
2413 m.Word32Sar(m.Parameter(0), m.Int32Constant(shift)))); in TEST()
2416 CHECK_EQ(expected, m.Call(*i)); in TEST()
2422 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
2423 m.Return( in TEST()
2424 m.Word32Equal(m.Word32Sar(m.Parameter(0), m.Int32Constant(shift)), in TEST()
2425 m.Int32Constant(0))); in TEST()
2428 CHECK_EQ(expected, m.Call(*i)); in TEST()
2438 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2439 m.Return(m.Word32Ror(m.Parameter(0), m.Int32Constant(shift))); in TEST()
2442 CHECK_EQ(expected, m.Call(*j)); in TEST()
2447 RawMachineAssemblerTester<int32_t> m; in TEST() local
2448 Uint32BinopTester bt(&m); in TEST()
2449 bt.AddReturn(m.Word32Ror(bt.param0, bt.param1)); in TEST()
2462 RawMachineAssemblerTester<int32_t> m; in TEST() local
2463 Uint32BinopTester bt(&m); in TEST()
2465 m.Word32Equal(m.Word32Ror(bt.param0, bt.param1), m.Int32Constant(0))); in TEST()
2474 RawMachineAssemblerTester<int32_t> m; in TEST() local
2475 Uint32BinopTester bt(&m); in TEST()
2477 m.Word32Equal(m.Int32Constant(0), m.Word32Ror(bt.param0, bt.param1))); in TEST()
2487 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2488 m.Return( in TEST()
2489 m.Word32Equal(m.Int32Constant(0), in TEST()
2490 m.Word32Ror(m.Parameter(0), m.Int32Constant(shift)))); in TEST()
2493 CHECK_UINT32_EQ(expected, m.Call(*i)); in TEST()
2499 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
2500 m.Return( in TEST()
2501 m.Word32Equal(m.Word32Ror(m.Parameter(0), m.Int32Constant(shift)), in TEST()
2502 m.Int32Constant(0))); in TEST()
2505 CHECK_UINT32_EQ(expected, m.Call(*i)); in TEST()
2513 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
2514 m.Return(m.Word32Not(m.Parameter(0))); in TEST()
2517 CHECK_EQ(expected, m.Call(*i)); in TEST()
2523 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
2524 m.Return(m.Int32Neg(m.Parameter(0))); in TEST()
2527 CHECK_EQ(expected, m.Call(*i)); in TEST()
2534 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32, kMachUint32); in TEST() local
2535 m.Return(m.Word32Equal(m.Parameter(0), in TEST()
2536 m.Word32Sar(m.Parameter(1), m.Parameter(2)))); in TEST()
2541 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
2547 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachUint32, kMachInt32); in TEST() local
2548 m.Return(m.Word32Equal(m.Word32Sar(m.Parameter(0), m.Parameter(1)), in TEST()
2549 m.Parameter(2))); in TEST()
2554 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
2564 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachUint32, kMachUint32); in TEST() local
2565 m.Return(m.Word32Equal(m.Parameter(0), in TEST()
2566 m.Word32Shl(m.Parameter(1), m.Parameter(2)))); in TEST()
2571 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
2577 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachUint32, kMachUint32); in TEST() local
2578 m.Return(m.Word32Equal(m.Word32Shl(m.Parameter(0), m.Parameter(1)), in TEST()
2579 m.Parameter(2))); in TEST()
2584 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
2594 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachUint32, kMachUint32); in TEST() local
2595 m.Return(m.Word32Equal(m.Parameter(0), in TEST()
2596 m.Word32Shr(m.Parameter(1), m.Parameter(2)))); in TEST()
2601 CHECK_EQ(expected, m.Call(*i, *j, shift)); in TEST()
2607 RawMachineAssemblerTester<int32_t> m(kMachUint32, kMachUint32, kMachUint32); in TEST() local
2608 m.Return(m.Word32Equal(m.Word32Shr(m.Parameter(0), m.Parameter(1)), in TEST()
2609 m.Parameter(2))); in TEST()
2614 CHECK_EQ(expected, m.Call(*i, shift, *k)); in TEST()
2624 RawMachineAssemblerTester<int32_t> m(i == 5 ? kMachInt32 : kMachNone); in TEST() local
2628 m.Int32Constant(44); in TEST()
2631 m.StringConstant("unused"); in TEST()
2634 m.NumberConstant(11.1); in TEST()
2637 m.PointerConstant(&constant); in TEST()
2640 m.LoadFromPointer(&constant, kMachInt32); in TEST()
2643 m.Parameter(0); in TEST()
2648 m.Return(m.Int32Constant(constant)); in TEST()
2650 CHECK_EQ(constant, m.Call()); in TEST()
2652 CHECK_EQ(constant, m.Call(0)); in TEST()
2659 RawMachineAssemblerTester<int32_t> m; in TEST() local
2662 m.machine()->Word32And(), m.machine()->Word32Or(), in TEST()
2663 m.machine()->Word32Xor(), m.machine()->Word32Shl(), in TEST()
2664 m.machine()->Word32Shr(), m.machine()->Word32Sar(), in TEST()
2665 m.machine()->Word32Ror(), m.machine()->Word32Equal(), in TEST()
2666 m.machine()->Int32Add(), m.machine()->Int32Sub(), in TEST()
2667 m.machine()->Int32Mul(), m.machine()->Int32Div(), in TEST()
2668 m.machine()->Int32UDiv(), m.machine()->Int32Mod(), in TEST()
2669 m.machine()->Int32UMod(), m.machine()->Int32LessThan(), in TEST()
2670 m.machine()->Int32LessThanOrEqual(), m.machine()->Uint32LessThan(), in TEST()
2671 m.machine()->Uint32LessThanOrEqual(), NULL}; in TEST()
2674 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32); in TEST() local
2676 m.NewNode(ops[i], m.Parameter(0), m.Parameter(1)); in TEST()
2677 m.Return(m.Int32Constant(constant)); in TEST()
2679 CHECK_EQ(constant, m.Call(1, 1)); in TEST()
2698 RawMachineAssemblerTester<Type> m; in RunLoadImmIndex() local
2699 Node* base = m.PointerConstant(buffer - offset); in RunLoadImmIndex()
2700 Node* index = m.Int32Constant((offset + i) * sizeof(buffer[0])); in RunLoadImmIndex()
2701 m.Return(m.Load(rep, base, index)); in RunLoadImmIndex()
2704 Type actual = m.Call(); in RunLoadImmIndex()
2739 RawMachineAssemblerTester<int32_t> m; in RunLoadStore() local
2741 Node* base = m.PointerConstant(buffer); in RunLoadStore()
2742 Node* index0 = m.Int32Constant(x * sizeof(buffer[0])); in RunLoadStore()
2743 Node* load = m.Load(rep, base, index0); in RunLoadStore()
2744 Node* index1 = m.Int32Constant(y * sizeof(buffer[0])); in RunLoadStore()
2745 m.Store(rep, base, index1, load); in RunLoadStore()
2746 m.Return(m.Int32Constant(OK)); in RunLoadStore()
2749 CHECK_EQ(OK, m.Call()); in RunLoadStore()
2769 RawMachineAssemblerTester<int32_t> m; in TEST() local
2772 const Operator* ops[] = {m.machine()->Float64Add(), m.machine()->Float64Sub(), in TEST()
2773 m.machine()->Float64Mul(), m.machine()->Float64Div(), in TEST()
2774 m.machine()->Float64Mod(), NULL}; in TEST()
2778 m.common()->Float64Constant(0), m.common()->Float64Constant(1), in TEST()
2779 m.common()->Float64Constant(1), m.common()->Float64Constant(0), in TEST()
2780 m.common()->Float64Constant(0), m.common()->Float64Constant(-1), in TEST()
2781 m.common()->Float64Constant(-1), m.common()->Float64Constant(0), in TEST()
2782 m.common()->Float64Constant(0.22), m.common()->Float64Constant(-1.22), in TEST()
2783 m.common()->Float64Constant(-1.22), m.common()->Float64Constant(0.22), in TEST()
2784 m.common()->Float64Constant(inf), m.common()->Float64Constant(0.22), in TEST()
2785 m.common()->Float64Constant(inf), m.common()->Float64Constant(-inf), in TEST()
2790 RawMachineAssemblerTester<int32_t> m; in TEST() local
2791 Node* a = m.NewNode(inputs[j]); in TEST()
2792 Node* b = m.NewNode(inputs[j + 1]); in TEST()
2793 Node* binop = m.NewNode(ops[i], a, b); in TEST()
2794 Node* base = m.PointerConstant(&result); in TEST()
2795 Node* zero = m.Int32Constant(0); in TEST()
2796 m.Store(kMachFloat64, base, zero, binop); in TEST()
2797 m.Return(m.Int32Constant(i + j)); in TEST()
2798 CHECK_EQ(i + j, m.Call()); in TEST()
2805 RawMachineAssemblerTester<int32_t> m; in TEST() local
2807 const Operator* ops[] = {m.machine()->Float64Add(), m.machine()->Float64Sub(), in TEST()
2808 m.machine()->Float64Mul(), m.machine()->Float64Div(), in TEST()
2809 m.machine()->Float64Mod(), NULL}; in TEST()
2812 RawMachineAssemblerTester<int32_t> m; in TEST() local
2814 m.NewNode(ops[i], m.Float64Constant(0.1), m.Float64Constant(1.11)); in TEST()
2815 m.Return(m.Int32Constant(constant)); in TEST()
2816 CHECK_EQ(constant, m.Call()); in TEST()
2822 RawMachineAssemblerTester<int32_t> m; in TEST() local
2823 Float64BinopTester bt(&m); in TEST()
2825 bt.AddReturn(m.Float64Add(bt.param0, bt.param1)); in TEST()
2837 RawMachineAssemblerTester<int32_t> m; in TEST() local
2838 Float64BinopTester bt(&m); in TEST()
2840 bt.AddReturn(m.Float64Sub(bt.param0, bt.param1)); in TEST()
2856 RawMachineAssemblerTester<int32_t> m; in TEST() local
2857 Node* t0 = m.LoadFromPointer(&input, kMachFloat64); in TEST()
2858 Node* t1 = m.Float64Sub(m.Float64Constant(*i), t0); in TEST()
2859 m.StoreToPointer(&output, kMachFloat64, t1); in TEST()
2860 m.Return(m.Int32Constant(0)); in TEST()
2864 CHECK_EQ(0, m.Call()); in TEST()
2876 RawMachineAssemblerTester<int32_t> m; in TEST() local
2877 Node* t0 = m.LoadFromPointer(&input, kMachFloat64); in TEST()
2878 Node* t1 = m.Float64Sub(t0, m.Float64Constant(*i)); in TEST()
2879 m.StoreToPointer(&output, kMachFloat64, t1); in TEST()
2880 m.Return(m.Int32Constant(0)); in TEST()
2884 CHECK_EQ(0, m.Call()); in TEST()
2892 RawMachineAssemblerTester<int32_t> m; in TEST() local
2893 Float64BinopTester bt(&m); in TEST()
2895 bt.AddReturn(m.Float64Mul(bt.param0, bt.param1)); in TEST()
2913 RawMachineAssemblerTester<int32_t> m; in TEST() local
2914 Node* a = m.LoadFromPointer(&input_a, kMachFloat64); in TEST()
2915 Node* b = m.LoadFromPointer(&input_b, kMachFloat64); in TEST()
2916 Node* c = m.LoadFromPointer(&input_c, kMachFloat64); in TEST()
2917 m.StoreToPointer(&output, kMachFloat64, in TEST()
2918 m.Float64Add(m.Float64Mul(a, b), c)); in TEST()
2919 m.Return(m.Int32Constant(0)); in TEST()
2928 CHECK_EQ(0, m.Call()); in TEST()
2935 RawMachineAssemblerTester<int32_t> m; in TEST() local
2936 Node* a = m.LoadFromPointer(&input_a, kMachFloat64); in TEST()
2937 Node* b = m.LoadFromPointer(&input_b, kMachFloat64); in TEST()
2938 Node* c = m.LoadFromPointer(&input_c, kMachFloat64); in TEST()
2939 m.StoreToPointer(&output, kMachFloat64, in TEST()
2940 m.Float64Add(a, m.Float64Mul(b, c))); in TEST()
2941 m.Return(m.Int32Constant(0)); in TEST()
2950 CHECK_EQ(0, m.Call()); in TEST()
2965 RawMachineAssemblerTester<int32_t> m; in TEST() local
2966 Node* a = m.LoadFromPointer(&input_a, kMachFloat64); in TEST()
2967 Node* b = m.LoadFromPointer(&input_b, kMachFloat64); in TEST()
2968 Node* c = m.LoadFromPointer(&input_c, kMachFloat64); in TEST()
2969 m.StoreToPointer(&output, kMachFloat64, m.Float64Sub(a, m.Float64Mul(b, c))); in TEST()
2970 m.Return(m.Int32Constant(0)); in TEST()
2980 CHECK_EQ(0, m.Call()); in TEST()
2994 RawMachineAssemblerTester<int32_t> m; in TEST() local
2995 Node* t0 = m.LoadFromPointer(&input, kMachFloat64); in TEST()
2996 Node* t1 = m.Float64Mul(m.Float64Constant(*i), t0); in TEST()
2997 m.StoreToPointer(&output, kMachFloat64, t1); in TEST()
2998 m.Return(m.Int32Constant(0)); in TEST()
3002 CHECK_EQ(0, m.Call()); in TEST()
3009 RawMachineAssemblerTester<int32_t> m; in TEST() local
3010 Node* t0 = m.LoadFromPointer(&input, kMachFloat64); in TEST()
3011 Node* t1 = m.Float64Mul(t0, m.Float64Constant(*i)); in TEST()
3012 m.StoreToPointer(&output, kMachFloat64, t1); in TEST()
3013 m.Return(m.Int32Constant(0)); in TEST()
3017 CHECK_EQ(0, m.Call()); in TEST()
3026 RawMachineAssemblerTester<int32_t> m; in TEST() local
3027 Float64BinopTester bt(&m); in TEST()
3029 bt.AddReturn(m.Float64Div(bt.param0, bt.param1)); in TEST()
3041 RawMachineAssemblerTester<int32_t> m; in TEST() local
3042 Float64BinopTester bt(&m); in TEST()
3044 bt.AddReturn(m.Float64Mod(bt.param0, bt.param1)); in TEST()
3057 RawMachineAssemblerTester<int32_t> m; in TEST() local
3061 Node* convert = m.ChangeInt32ToFloat64(m.Int32Constant(magic)); in TEST()
3062 m.Store(kMachFloat64, m.PointerConstant(&result), m.Int32Constant(0), in TEST()
3064 m.Return(m.Int32Constant(magic)); in TEST()
3066 CHECK_EQ(magic, m.Call()); in TEST()
3072 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
3075 Node* convert = m.ChangeInt32ToFloat64(m.Parameter(0)); in TEST()
3076 m.Store(kMachFloat64, m.PointerConstant(&output), m.Int32Constant(0), in TEST()
3078 m.Return(m.Parameter(0)); in TEST()
3082 CHECK_EQ(expect, m.Call(expect)); in TEST()
3089 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
3092 Node* convert = m.ChangeUint32ToFloat64(m.Parameter(0)); in TEST()
3093 m.Store(kMachFloat64, m.PointerConstant(&output), m.Int32Constant(0), in TEST()
3095 m.Return(m.Parameter(0)); in TEST()
3099 CHECK_EQ(expect, m.Call(expect)); in TEST()
3106 RawMachineAssemblerTester<int32_t> m; in TEST() local
3111 m.Store(kMachInt32, m.PointerConstant(&result), m.Int32Constant(0), in TEST()
3112 m.ChangeFloat64ToInt32(m.Float64Constant(input))); in TEST()
3113 m.Return(m.Int32Constant(magic)); in TEST()
3115 CHECK_EQ(magic, m.Call()); in TEST()
3121 RawMachineAssemblerTester<int32_t> m; in TEST() local
3126 m.Load(kMachFloat64, m.PointerConstant(&input), m.Int32Constant(0)); in TEST()
3127 Node* convert = m.ChangeFloat64ToInt32(load); in TEST()
3128 m.Store(kMachInt32, m.PointerConstant(&output), m.Int32Constant(0), convert); in TEST()
3129 m.Return(convert); in TEST()
3135 CHECK_EQ(expect, m.Call()); in TEST()
3145 CHECK_EQ(expect, m.Call()); in TEST()
3152 CHECK_EQ(expect, m.Call()); in TEST()
3162 RawMachineAssemblerTester<int32_t> m; in TEST() local
3167 m.Load(kMachFloat64, m.PointerConstant(&input), m.Int32Constant(0)); in TEST()
3168 Node* convert = m.ChangeFloat64ToUint32(load); in TEST()
3169 m.Store(kMachInt32, m.PointerConstant(&output), m.Int32Constant(0), convert); in TEST()
3170 m.Return(convert); in TEST()
3177 CHECK_EQ(expect, m.Call()); in TEST()
3187 CHECK_EQ(expect, m.Call()); in TEST()
3194 CHECK_EQ(expect, m.Call()); in TEST()
3204 RawMachineAssemblerTester<int32_t> m; in TEST() local
3213 m.Load(kMachFloat64, m.PointerConstant(&input), m.Int32Constant(i * 8)); in TEST()
3217 m.Store(kMachInt32, m.PointerConstant(&result), m.Int32Constant(i * 4), in TEST()
3218 m.ChangeFloat64ToInt32(input_node[i])); in TEST()
3221 m.Return(m.Int32Constant(magic)); in TEST()
3227 CHECK_EQ(magic, m.Call()); in TEST()
3236 RawMachineAssemblerTester<uint32_t> m; in TEST() local
3245 m.Load(kMachFloat64, m.PointerConstant(&input), m.Int32Constant(i * 8)); in TEST()
3249 m.Store(kMachUint32, m.PointerConstant(&result), m.Int32Constant(i * 4), in TEST()
3250 m.ChangeFloat64ToUint32(input_node[i])); in TEST()
3253 m.Return(m.Int32Constant(magic)); in TEST()
3263 CHECK_EQ(magic, m.Call()); in TEST()
3276 RawMachineAssemblerTester<int32_t> m; in TEST() local
3278 m.ChangeFloat64ToInt32(m.Float64Constant(999.78)); in TEST()
3279 m.Return(m.Int32Constant(magic)); in TEST()
3280 CHECK_EQ(magic, m.Call()); in TEST()
3285 RawMachineAssemblerTester<int32_t> m; in TEST() local
3287 m.ChangeInt32ToFloat64(m.Int32Constant(magic - 6888)); in TEST()
3288 m.Return(m.Int32Constant(magic)); in TEST()
3289 CHECK_EQ(magic, m.Call()); in TEST()
3294 RawMachineAssemblerTester<int32_t> m; in TEST() local
3300 Node* false_node = m.Int32Constant(false_val); in TEST()
3301 m.Goto(&header); in TEST()
3302 m.Bind(&header); in TEST()
3303 Node* phi = m.Phi(kMachInt32, false_node, false_node); in TEST()
3304 m.Branch(m.Int32Constant(0), &body, &end); in TEST()
3305 m.Bind(&body); in TEST()
3306 Node* add = m.Int32Add(phi, m.Int32Constant(1)); in TEST()
3308 m.Goto(&header); in TEST()
3309 m.Bind(&end); in TEST()
3310 m.Return(phi); in TEST()
3312 CHECK_EQ(false_val, m.Call()); in TEST()
3317 RawMachineAssemblerTester<int32_t> m; in TEST() local
3324 Node* k1 = m.Float64Constant(constant); in TEST()
3325 Node* k2 = m.Float64Constant(0 - constant); in TEST()
3326 m.Branch(m.Int32Constant(0), &blocka, &blockb); in TEST()
3327 m.Bind(&blocka); in TEST()
3328 m.Goto(&end); in TEST()
3329 m.Bind(&blockb); in TEST()
3330 m.Goto(&end); in TEST()
3331 m.Bind(&end); in TEST()
3332 Node* phi = m.Phi(kMachFloat64, k2, k1); in TEST()
3333 m.Store(kMachFloat64, m.PointerConstant(&buffer), m.Int32Constant(0), phi); in TEST()
3334 m.Return(m.Int32Constant(magic)); in TEST()
3336 CHECK_EQ(magic, m.Call()); in TEST()
3342 RawMachineAssemblerTester<int32_t> m; in TEST() local
3350 Node* k1 = m.StringConstant("A"); in TEST()
3351 Node* k2 = m.StringConstant("B"); in TEST()
3352 m.Branch(m.Int32Constant(0), &blocka, &blockb); in TEST()
3353 m.Bind(&blocka); in TEST()
3354 m.Goto(&end); in TEST()
3355 m.Bind(&blockb); in TEST()
3356 m.Goto(&end); in TEST()
3357 m.Bind(&end); in TEST()
3358 Node* phi = m.Phi(kMachAnyTagged, k2, k1); in TEST()
3359 m.Store(kMachAnyTagged, m.PointerConstant(&buffer), m.Int32Constant(0), phi); in TEST()
3360 m.Return(m.Int32Constant(magic)); in TEST()
3362 CHECK_EQ(magic, m.Call()); in TEST()
3368 RawMachineAssemblerTester<int32_t> m; in TEST() local
3378 Node* d1 = m.Float64Constant(dconstant); in TEST()
3379 Node* d2 = m.Float64Constant(0 - dconstant); in TEST()
3380 Node* r1 = m.StringConstant("AX"); in TEST()
3381 Node* r2 = m.StringConstant("BX"); in TEST()
3382 m.Branch(m.Int32Constant(0), &blocka, &blockb); in TEST()
3383 m.Bind(&blocka); in TEST()
3384 m.Goto(&end); in TEST()
3385 m.Bind(&blockb); in TEST()
3386 m.Goto(&end); in TEST()
3387 m.Bind(&end); in TEST()
3388 Node* dphi = m.Phi(kMachFloat64, d2, d1); in TEST()
3389 Node* rphi = m.Phi(kMachAnyTagged, r2, r1); in TEST()
3390 m.Store(kMachFloat64, m.PointerConstant(&dbuffer), m.Int32Constant(0), dphi); in TEST()
3391 m.Store(kMachAnyTagged, m.PointerConstant(&rbuffer), m.Int32Constant(0), in TEST()
3393 m.Return(m.Int32Constant(magic)); in TEST()
3395 CHECK_EQ(magic, m.Call()); in TEST()
3402 RawMachineAssemblerTester<int32_t> m; in TEST() local
3412 Node* d1 = m.Float64Constant(dconstant); in TEST()
3413 Node* d2 = m.Float64Constant(0 - dconstant); in TEST()
3414 Node* r1 = m.StringConstant("AD"); in TEST()
3415 Node* r2 = m.StringConstant("BD"); in TEST()
3416 m.Branch(m.Int32Constant(0), &blocka, &blockb); in TEST()
3417 m.Bind(&blocka); in TEST()
3418 m.Goto(&mid); in TEST()
3419 m.Bind(&blockb); in TEST()
3420 m.Goto(&mid); in TEST()
3421 m.Bind(&mid); in TEST()
3422 Node* dphi1 = m.Phi(kMachFloat64, d2, d1); in TEST()
3423 Node* rphi1 = m.Phi(kMachAnyTagged, r2, r1); in TEST()
3424 m.Branch(m.Int32Constant(0), &blockd, &blocke); in TEST()
3426 m.Bind(&blockd); in TEST()
3427 m.Goto(&end); in TEST()
3428 m.Bind(&blocke); in TEST()
3429 m.Goto(&end); in TEST()
3430 m.Bind(&end); in TEST()
3431 Node* dphi2 = m.Phi(kMachFloat64, d1, dphi1); in TEST()
3432 Node* rphi2 = m.Phi(kMachAnyTagged, r1, rphi1); in TEST()
3434 m.Store(kMachFloat64, m.PointerConstant(&dbuffer), m.Int32Constant(0), dphi2); in TEST()
3435 m.Store(kMachAnyTagged, m.PointerConstant(&rbuffer), m.Int32Constant(0), in TEST()
3437 m.Return(m.Int32Constant(magic)); in TEST()
3439 CHECK_EQ(magic, m.Call()); in TEST()
3446 RawMachineAssemblerTester<int32_t> m; in TEST() local
3453 Node* zero = m.Int32Constant(0); in TEST()
3454 Node* dk = m.Float64Constant(dconstant); in TEST()
3456 m.Goto(&header); in TEST()
3457 m.Bind(&header); in TEST()
3458 Node* phi = m.Phi(kMachFloat64, dk, dk); in TEST()
3460 m.Branch(zero, &body, &end); in TEST()
3461 m.Bind(&body); in TEST()
3462 m.Goto(&header); in TEST()
3463 m.Bind(&end); in TEST()
3464 m.Store(kMachFloat64, m.PointerConstant(&buffer), m.Int32Constant(0), phi); in TEST()
3465 m.Return(m.Int32Constant(magic)); in TEST()
3467 CHECK_EQ(magic, m.Call()); in TEST()
3472 RawMachineAssemblerTester<int32_t> m; in TEST() local
3474 Node* zero = m.Int32Constant(0); in TEST()
3475 Node* ten = m.Int32Constant(10); in TEST()
3476 Node* one = m.Int32Constant(1); in TEST()
3480 m.Goto(&header); in TEST()
3482 m.Bind(&header); in TEST()
3483 Node* i = m.Phi(kMachInt32, zero, zero); in TEST()
3484 Node* j = m.Phi(kMachInt32, zero, zero); in TEST()
3485 m.Goto(&body); in TEST()
3487 m.Bind(&body); in TEST()
3488 Node* next_i = m.Int32Add(i, one); in TEST()
3489 Node* next_j = m.Int32Add(j, one); in TEST()
3490 m.Branch(m.Word32Equal(next_i, ten), &end, &body_cont); in TEST()
3492 m.Bind(&body_cont); in TEST()
3495 m.Goto(&header); in TEST()
3497 m.Bind(&end); in TEST()
3498 m.Return(ten); in TEST()
3500 CHECK_EQ(10, m.Call()); in TEST()
3505 RawMachineAssemblerTester<int32_t> m; in TEST() local
3507 Node* zero = m.Int32Constant(0); in TEST()
3508 Node* ten = m.Int32Constant(10); in TEST()
3509 Node* one = m.Int32Constant(1); in TEST()
3513 m.Goto(&header); in TEST()
3515 m.Bind(&header); in TEST()
3516 Node* i = m.Phi(kMachInt32, zero, zero); in TEST()
3517 Node* j = m.Phi(kMachInt32, zero, zero); in TEST()
3518 Node* k = m.Phi(kMachInt32, zero, zero); in TEST()
3519 m.Goto(&body); in TEST()
3521 m.Bind(&body); in TEST()
3522 Node* next_i = m.Int32Add(i, one); in TEST()
3523 Node* next_j = m.Int32Add(j, one); in TEST()
3524 Node* next_k = m.Int32Add(j, one); in TEST()
3525 m.Branch(m.Word32Equal(next_i, ten), &end, &body_cont); in TEST()
3527 m.Bind(&body_cont); in TEST()
3531 m.Goto(&header); in TEST()
3533 m.Bind(&end); in TEST()
3534 m.Return(ten); in TEST()
3536 CHECK_EQ(10, m.Call()); in TEST()
3541 RawMachineAssemblerTester<int32_t> m; in TEST() local
3544 Node* base = m.PointerConstant(inputs); in TEST()
3545 Node* n0 = m.Load(kMachInt32, base, m.Int32Constant(0 * sizeof(int32_t))); in TEST()
3546 Node* n1 = m.Load(kMachInt32, base, m.Int32Constant(1 * sizeof(int32_t))); in TEST()
3547 Node* n2 = m.Load(kMachInt32, base, m.Int32Constant(2 * sizeof(int32_t))); in TEST()
3548 Node* n3 = m.Load(kMachInt32, base, m.Int32Constant(3 * sizeof(int32_t))); in TEST()
3549 Node* n4 = m.Load(kMachInt32, base, m.Int32Constant(4 * sizeof(int32_t))); in TEST()
3550 Node* n5 = m.Load(kMachInt32, base, m.Int32Constant(5 * sizeof(int32_t))); in TEST()
3551 Node* n6 = m.Load(kMachInt32, base, m.Int32Constant(6 * sizeof(int32_t))); in TEST()
3552 Node* n7 = m.Load(kMachInt32, base, m.Int32Constant(7 * sizeof(int32_t))); in TEST()
3554 Node* i1 = m.Int32Add(n0, n1); in TEST()
3555 Node* i2 = m.Int32Add(n2, n3); in TEST()
3556 Node* i3 = m.Int32Add(n4, n5); in TEST()
3557 Node* i4 = m.Int32Add(n6, n7); in TEST()
3559 Node* i5 = m.Int32Add(i1, i2); in TEST()
3560 Node* i6 = m.Int32Add(i3, i4); in TEST()
3562 Node* i7 = m.Int32Add(i5, i6); in TEST()
3564 m.Return(i7); in TEST()
3566 CHECK_EQ(116, m.Call()); in TEST()
3573 static int Float64CompareHelper(RawMachineAssemblerTester<int32_t>* m, in Float64CompareHelper() argument
3584 Node* a = load_a ? m->Load(kMachFloat64, m->PointerConstant(&buffer[0])) in Float64CompareHelper()
3585 : m->Float64Constant(x); in Float64CompareHelper()
3586 Node* b = load_b ? m->Load(kMachFloat64, m->PointerConstant(&buffer[1])) in Float64CompareHelper()
3587 : m->Float64Constant(y); in Float64CompareHelper()
3593 cmp = m->Float64Equal(a, b); in Float64CompareHelper()
3597 cmp = m->Float64Equal(a, a); in Float64CompareHelper()
3602 cmp = m->Float64LessThan(a, b); in Float64CompareHelper()
3606 cmp = m->Float64LessThan(b, a); in Float64CompareHelper()
3610 cmp = m->Float64LessThan(a, a); in Float64CompareHelper()
3615 cmp = m->Float64LessThanOrEqual(a, b); in Float64CompareHelper()
3619 cmp = m->Float64LessThanOrEqual(b, a); in Float64CompareHelper()
3623 cmp = m->Float64LessThanOrEqual(a, a); in Float64CompareHelper()
3628 cmp = m->Float64NotEqual(a, b); in Float64CompareHelper()
3632 cmp = m->Float64NotEqual(b, a); in Float64CompareHelper()
3636 cmp = m->Float64NotEqual(a, a); in Float64CompareHelper()
3641 cmp = m->Float64GreaterThan(a, a); in Float64CompareHelper()
3645 cmp = m->Float64GreaterThan(a, b); in Float64CompareHelper()
3650 cmp = m->Float64GreaterThanOrEqual(a, a); in Float64CompareHelper()
3654 cmp = m->Float64GreaterThanOrEqual(b, a); in Float64CompareHelper()
3660 m->Return(cmp); in Float64CompareHelper()
3675 RawMachineAssemblerTester<int32_t> m; in TEST() local
3676 int expected = Float64CompareHelper(&m, test, node_type, inputs[input], in TEST()
3678 CHECK_EQ(expected, m.Call()); in TEST()
3686 RawMachineAssemblerTester<int32_t> m; in TEST() local
3688 const Operator* operators[] = {m.machine()->Float64Equal(), in TEST()
3689 m.machine()->Float64LessThan(), in TEST()
3690 m.machine()->Float64LessThanOrEqual()}; in TEST()
3697 RawMachineAssemblerTester<int32_t> m; in TEST() local
3698 Node* a = m.Float64Constant(*i); in TEST()
3699 Node* b = m.Float64Constant(nan); in TEST()
3701 m.Return(m.NewNode(operators[o], a, b)); in TEST()
3702 CHECK_EQ(0, m.Call()); in TEST()
3713 RawMachineAssemblerTester<int32_t> m; in TEST() local
3714 Node* a = m.LoadFromPointer(&input_a, kMachFloat64); in TEST()
3715 Node* b = m.LoadFromPointer(&input_b, kMachFloat64); in TEST()
3716 m.Return(m.Float64Equal(a, b)); in TEST()
3724 CHECK_EQ(expected, m.Call()); in TEST()
3734 RawMachineAssemblerTester<int32_t> m; in TEST() local
3735 Node* a = m.LoadFromPointer(&input_a, kMachFloat64); in TEST()
3736 Node* b = m.LoadFromPointer(&input_b, kMachFloat64); in TEST()
3737 m.Return(m.Float64LessThan(a, b)); in TEST()
3745 CHECK_EQ(expected, m.Call()); in TEST()
3755 RawMachineAssemblerTester<int32_t> m; in LoadStoreTruncation() local
3756 Node* a = m.LoadFromPointer(&input, kRepresentation); in LoadStoreTruncation()
3757 Node* ap1 = m.Int32Add(a, m.Int32Constant(1)); in LoadStoreTruncation()
3758 m.StoreToPointer(&input, kRepresentation, ap1); in LoadStoreTruncation()
3759 m.Return(ap1); in LoadStoreTruncation()
3766 CHECK_EQ(max + 1, m.Call()); in LoadStoreTruncation()
3771 CHECK_EQ(static_cast<IntType>(max + 2), m.Call()); in LoadStoreTruncation()
3778 CHECK_EQ(static_cast<IntType>(expected), m.Call()); in LoadStoreTruncation()
3792 RawMachineAssemblerTester<bool> m(kMachPtr, kMachPtr); in IntPtrCompare() local
3793 Node* p0 = m.Parameter(0); in IntPtrCompare()
3794 Node* p1 = m.Parameter(1); in IntPtrCompare()
3799 res = m.IntPtrLessThan(p0, p1); in IntPtrCompare()
3803 res = m.IntPtrLessThanOrEqual(p0, p1); in IntPtrCompare()
3807 res = m.IntPtrEqual(p0, p1); in IntPtrCompare()
3811 res = m.IntPtrGreaterThanOrEqual(p0, p1); in IntPtrCompare()
3815 res = m.IntPtrGreaterThan(p0, p1); in IntPtrCompare()
3819 res = m.IntPtrEqual(p0, p0); in IntPtrCompare()
3823 res = m.IntPtrNotEqual(p0, p1); in IntPtrCompare()
3830 m.Return(res); in IntPtrCompare()
3831 CHECK_EQ(expected, m.Call(reinterpret_cast<int32_t*>(left), in IntPtrCompare()
3856 RawMachineAssemblerTester<int32_t*> m; in TEST() local
3857 Node* input = m.PointerConstant(&inputs[0]); in TEST()
3858 Node* output = m.PointerConstant(&outputs[kInputSize - 1]); in TEST()
3859 Node* elem_size = m.ConvertInt32ToIntPtr(m.Int32Constant(sizeof(inputs[0]))); in TEST()
3861 m.Store(kMachInt32, output, m.Load(kMachInt32, input)); in TEST()
3862 input = m.IntPtrAdd(input, elem_size); in TEST()
3863 output = m.IntPtrSub(output, elem_size); in TEST()
3865 m.Return(input); in TEST()
3866 CHECK_EQ(&inputs[kInputSize], m.Call()); in TEST()
3876 RawMachineAssemblerTester<void> m; in TEST() local
3879 Node* one = m.Int32Constant(1); in TEST()
3882 acc = m.Int32Add(acc, one); in TEST()
3886 m.StoreToPointer(&outputs[i], kMachInt32, accs[i]); in TEST()
3888 m.Return(one); in TEST()
3889 m.Call(); in TEST()
3899 RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32); in TEST() local
3903 Node* acc = m.Int32Constant(0); in TEST()
3905 csts[i] = m.Int32Constant(static_cast<int32_t>(kBase + i)); in TEST()
3908 acc = m.Int32Add(acc, csts[i]); in TEST()
3912 m.StoreToPointer(&outputs[i], kMachInt32, accs[i]); in TEST()
3914 m.Return(m.Int32Add(acc, m.Int32Add(m.Parameter(0), m.Parameter(1)))); in TEST()
3921 CHECK_EQ(expected, m.Call(*i, *j)); in TEST()
3933 RawMachineAssemblerTester<Object*> m(kMachInt32); in TEST() local
3938 Node* true_node = m.HeapConstant(true_val); in TEST()
3939 Node* false_node = m.HeapConstant(false_val); in TEST()
3942 m.Branch(m.Parameter(0), &blocka, &blockb); in TEST()
3943 m.Bind(&blocka); in TEST()
3944 m.Goto(&end); in TEST()
3945 m.Bind(&blockb); in TEST()
3946 m.Goto(&end); in TEST()
3948 m.Bind(&end); in TEST()
3949 Node* phi = m.Phi(kMachAnyTagged, true_node, false_node); in TEST()
3950 m.Return(phi); in TEST()
3952 CHECK_EQ(*false_val, m.Call(0)); in TEST()
3953 CHECK_EQ(*true_val, m.Call(1)); in TEST()
3959 RawMachineAssemblerTester<int32_t> m; in TEST() local
3960 Int32BinopTester bt(&m); in TEST()
3961 Node* add = m.Int32AddWithOverflow(bt.param0, bt.param1); in TEST()
3962 Node* val = m.Projection(0, add); in TEST()
3963 Node* ovf = m.Projection(1, add); in TEST()
3964 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
3981 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
3982 Node* add = m.Int32AddWithOverflow(m.Int32Constant(*i), m.Parameter(0)); in TEST()
3983 Node* val = m.Projection(0, add); in TEST()
3984 Node* ovf = m.Projection(1, add); in TEST()
3985 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
3986 m.Return(ovf); in TEST()
3989 CHECK_EQ(expected_ovf, m.Call(*j)); in TEST()
3994 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
3995 Node* add = m.Int32AddWithOverflow(m.Parameter(0), m.Int32Constant(*i)); in TEST()
3996 Node* val = m.Projection(0, add); in TEST()
3997 Node* ovf = m.Projection(1, add); in TEST()
3998 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
3999 m.Return(ovf); in TEST()
4002 CHECK_EQ(expected_ovf, m.Call(*j)); in TEST()
4007 RawMachineAssemblerTester<int32_t> m; in TEST() local
4009 m.Int32AddWithOverflow(m.Int32Constant(*i), m.Int32Constant(*j)); in TEST()
4010 Node* val = m.Projection(0, add); in TEST()
4011 Node* ovf = m.Projection(1, add); in TEST()
4012 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
4013 m.Return(ovf); in TEST()
4015 CHECK_EQ(expected_ovf, m.Call()); in TEST()
4025 RawMachineAssemblerTester<int32_t> m; in TEST() local
4026 Int32BinopTester bt(&m); in TEST()
4027 Node* add = m.Int32AddWithOverflow(bt.param0, bt.param1); in TEST()
4028 Node* ovf = m.Projection(1, add); in TEST()
4029 m.Branch(ovf, &blocka, &blockb); in TEST()
4030 m.Bind(&blocka); in TEST()
4031 bt.AddReturn(m.Int32Constant(constant)); in TEST()
4032 m.Bind(&blockb); in TEST()
4033 Node* val = m.Projection(0, add); in TEST()
4047 RawMachineAssemblerTester<int32_t> m; in TEST() local
4048 Int32BinopTester bt(&m); in TEST()
4049 Node* add = m.Int32SubWithOverflow(bt.param0, bt.param1); in TEST()
4050 Node* val = m.Projection(0, add); in TEST()
4051 Node* ovf = m.Projection(1, add); in TEST()
4052 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
4069 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
4070 Node* add = m.Int32SubWithOverflow(m.Int32Constant(*i), m.Parameter(0)); in TEST()
4071 Node* val = m.Projection(0, add); in TEST()
4072 Node* ovf = m.Projection(1, add); in TEST()
4073 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
4074 m.Return(ovf); in TEST()
4077 CHECK_EQ(expected_ovf, m.Call(*j)); in TEST()
4082 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
4083 Node* add = m.Int32SubWithOverflow(m.Parameter(0), m.Int32Constant(*i)); in TEST()
4084 Node* val = m.Projection(0, add); in TEST()
4085 Node* ovf = m.Projection(1, add); in TEST()
4086 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
4087 m.Return(ovf); in TEST()
4090 CHECK_EQ(expected_ovf, m.Call(*j)); in TEST()
4095 RawMachineAssemblerTester<int32_t> m; in TEST() local
4097 m.Int32SubWithOverflow(m.Int32Constant(*i), m.Int32Constant(*j)); in TEST()
4098 Node* val = m.Projection(0, add); in TEST()
4099 Node* ovf = m.Projection(1, add); in TEST()
4100 m.StoreToPointer(&actual_val, kMachInt32, val); in TEST()
4101 m.Return(ovf); in TEST()
4103 CHECK_EQ(expected_ovf, m.Call()); in TEST()
4113 RawMachineAssemblerTester<int32_t> m; in TEST() local
4114 Int32BinopTester bt(&m); in TEST()
4115 Node* sub = m.Int32SubWithOverflow(bt.param0, bt.param1); in TEST()
4116 Node* ovf = m.Projection(1, sub); in TEST()
4117 m.Branch(ovf, &blocka, &blockb); in TEST()
4118 m.Bind(&blocka); in TEST()
4119 bt.AddReturn(m.Int32Constant(constant)); in TEST()
4120 m.Bind(&blockb); in TEST()
4121 Node* val = m.Projection(0, sub); in TEST()
4136 RawMachineAssemblerTester<int32_t> m(kMachInt32); in TEST() local
4137 m.StoreToPointer(&actual, kMachInt64, m.ChangeInt32ToInt64(m.Parameter(0))); in TEST()
4138 m.Return(m.Int32Constant(0)); in TEST()
4141 CHECK_EQ(0, m.Call(*i)); in TEST()
4150 RawMachineAssemblerTester<int32_t> m(kMachUint32); in TEST() local
4151 m.StoreToPointer(&actual, kMachUint64, in TEST()
4152 m.ChangeUint32ToUint64(m.Parameter(0))); in TEST()
4153 m.Return(m.Int32Constant(0)); in TEST()
4156 CHECK_EQ(0, m.Call(*i)); in TEST()
4165 RawMachineAssemblerTester<int32_t> m; in TEST() local
4166 m.Return(m.TruncateInt64ToInt32(m.LoadFromPointer(&expected, kMachInt64))); in TEST()
4170 CHECK_UINT32_EQ(expected, m.Call()); in TEST()
4236 RawMachineAssemblerTester<int32_t> m; in TEST() local
4237 m.Return(m.TruncateFloat64ToInt32(m.LoadFromPointer(&input, kMachFloat64))); in TEST()
4241 CHECK_EQ(static_cast<int>(expected), m.Call()); in TEST()