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. |