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

Side by Side Diff: test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc

Issue 989203002: [x86] Faster/shorter code for stack checks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/unittests/compiler/instruction-selector-unittest.h" 5 #include "test/unittests/compiler/instruction-selector-unittest.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 m.Return(ret); 659 m.Return(ret);
660 Stream s = m.Build(); 660 Stream s = m.Build();
661 ASSERT_EQ(4U, s.size()); 661 ASSERT_EQ(4U, s.size());
662 EXPECT_EQ(kSSEFloat64Add, s[0]->arch_opcode()); 662 EXPECT_EQ(kSSEFloat64Add, s[0]->arch_opcode());
663 EXPECT_EQ(kSSEFloat64Mul, s[1]->arch_opcode()); 663 EXPECT_EQ(kSSEFloat64Mul, s[1]->arch_opcode());
664 EXPECT_EQ(kSSEFloat64Sub, s[2]->arch_opcode()); 664 EXPECT_EQ(kSSEFloat64Sub, s[2]->arch_opcode());
665 EXPECT_EQ(kSSEFloat64Div, s[3]->arch_opcode()); 665 EXPECT_EQ(kSSEFloat64Div, s[3]->arch_opcode());
666 } 666 }
667 } 667 }
668 668
669
670 // -----------------------------------------------------------------------------
671 // Miscellaneous.
672
673
674 TEST_F(InstructionSelectorTest, Uint32LessThanWithLoadAndLoadStackPointer) {
675 StreamBuilder m(this, kMachBool);
676 Node* const sl = m.Load(
677 kMachPtr,
678 m.ExternalConstant(ExternalReference::address_of_stack_limit(isolate())));
679 Node* const sp = m.LoadStackPointer();
680 Node* const n = m.Uint32LessThan(sl, sp);
681 m.Return(n);
682 Stream s = m.Build();
683 ASSERT_EQ(1U, s.size());
684 EXPECT_EQ(kIA32StackCheck, s[0]->arch_opcode());
685 ASSERT_EQ(0U, s[0]->InputCount());
686 ASSERT_EQ(1U, s[0]->OutputCount());
687 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
688 EXPECT_EQ(kFlags_set, s[0]->flags_mode());
689 EXPECT_EQ(kUnsignedGreaterThan, s[0]->flags_condition());
690 }
691
669 } // namespace compiler 692 } // namespace compiler
670 } // namespace internal 693 } // namespace internal
671 } // namespace v8 694 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/unittests/compiler/x64/instruction-selector-x64-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698