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

Unified Diff: test/unittests/compiler/instruction-selector-unittest.cc

Issue 671393002: [x86] Fix register constraints for multiply-high. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added regression test. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: test/unittests/compiler/instruction-selector-unittest.cc
diff --git a/test/unittests/compiler/instruction-selector-unittest.cc b/test/unittests/compiler/instruction-selector-unittest.cc
index 0b58dc09a04647041e6561f32df3eb0d65c8abb9..defc9535029698b70d1b48036bd50d385acdc917 100644
--- a/test/unittests/compiler/instruction-selector-unittest.cc
+++ b/test/unittests/compiler/instruction-selector-unittest.cc
@@ -129,6 +129,24 @@ int InstructionSelectorTest::Stream::ToVreg(const Node* node) const {
}
+bool InstructionSelectorTest::Stream::IsFixed(const InstructionOperand* operand,
+ Register reg) const {
+ if (!operand->IsUnallocated()) return false;
+ const UnallocatedOperand* unallocated = UnallocatedOperand::cast(operand);
+ if (!unallocated->HasFixedRegisterPolicy()) return false;
+ const int index = Register::ToAllocationIndex(reg);
+ return unallocated->fixed_register_index() == index;
+}
+
+
+bool InstructionSelectorTest::Stream::IsUsedAtStart(
+ const InstructionOperand* operand) const {
+ if (!operand->IsUnallocated()) return false;
+ const UnallocatedOperand* unallocated = UnallocatedOperand::cast(operand);
+ return unallocated->IsUsedAtStart();
+}
+
+
// -----------------------------------------------------------------------------
// Return.

Powered by Google App Engine
This is Rietveld 408576698