| Index: test/unittests/compiler/node-test-utils.cc
|
| diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc
|
| index 72723145851c394836d4ca46fee19f00ec9df624..c9852822b92948e39afa0c9c5ff2052ab3ddda85 100644
|
| --- a/test/unittests/compiler/node-test-utils.cc
|
| +++ b/test/unittests/compiler/node-test-utils.cc
|
| @@ -1243,6 +1243,75 @@ class IsUnopMatcher FINAL : public NodeMatcher {
|
| const Matcher<Node*> input_matcher_;
|
| };
|
|
|
| +
|
| +class IsFloat64ExtractWord32Matcher FINAL : public NodeMatcher {
|
| + public:
|
| + IsFloat64ExtractWord32Matcher(const Matcher<int>& location_matcher,
|
| + const Matcher<Node*>& value_matcher)
|
| + : NodeMatcher(IrOpcode::kFloat64ExtractWord32),
|
| + location_matcher_(location_matcher),
|
| + value_matcher_(value_matcher) {}
|
| +
|
| + void DescribeTo(std::ostream* os) const FINAL {
|
| + NodeMatcher::DescribeTo(os);
|
| + *os << " whose location (";
|
| + location_matcher_.DescribeTo(os);
|
| + *os << ") and value (";
|
| + value_matcher_.DescribeTo(os);
|
| + *os << ")";
|
| + }
|
| +
|
| + bool MatchAndExplain(Node* node, MatchResultListener* listener) const FINAL {
|
| + return (NodeMatcher::MatchAndExplain(node, listener) &&
|
| + PrintMatchAndExplain(OpParameter<int>(node), "location",
|
| + location_matcher_, listener) &&
|
| + PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
|
| + "value", value_matcher_, listener));
|
| + }
|
| +
|
| + private:
|
| + const Matcher<int> location_matcher_;
|
| + const Matcher<Node*> value_matcher_;
|
| +};
|
| +
|
| +
|
| +class IsFloat64InsertWord32Matcher FINAL : public NodeMatcher {
|
| + public:
|
| + IsFloat64InsertWord32Matcher(const Matcher<int>& location_matcher,
|
| + const Matcher<Node*>& lhs_matcher,
|
| + const Matcher<Node*>& rhs_matcher)
|
| + : NodeMatcher(IrOpcode::kFloat64InsertWord32),
|
| + location_matcher_(location_matcher),
|
| + lhs_matcher_(lhs_matcher),
|
| + rhs_matcher_(rhs_matcher) {}
|
| +
|
| + void DescribeTo(std::ostream* os) const FINAL {
|
| + NodeMatcher::DescribeTo(os);
|
| + *os << " whose location (";
|
| + location_matcher_.DescribeTo(os);
|
| + *os << "), lhs (";
|
| + lhs_matcher_.DescribeTo(os);
|
| + *os << ") and rhs (";
|
| + rhs_matcher_.DescribeTo(os);
|
| + *os << ")";
|
| + }
|
| +
|
| + bool MatchAndExplain(Node* node, MatchResultListener* listener) const FINAL {
|
| + return (NodeMatcher::MatchAndExplain(node, listener) &&
|
| + PrintMatchAndExplain(OpParameter<int>(node), "location",
|
| + location_matcher_, listener) &&
|
| + PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), "lhs",
|
| + lhs_matcher_, listener) &&
|
| + PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), "rhs",
|
| + rhs_matcher_, listener));
|
| + }
|
| +
|
| + private:
|
| + const Matcher<int> location_matcher_;
|
| + const Matcher<Node*> lhs_matcher_;
|
| + const Matcher<Node*> rhs_matcher_;
|
| +};
|
| +
|
| } // namespace
|
|
|
|
|
| @@ -1562,6 +1631,21 @@ Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher,
|
| }
|
|
|
|
|
| +Matcher<Node*> IsFloat64ExtractWord32(const Matcher<int>& location_matcher,
|
| + const Matcher<Node*>& value_matcher) {
|
| + return MakeMatcher(
|
| + new IsFloat64ExtractWord32Matcher(location_matcher, value_matcher));
|
| +}
|
| +
|
| +
|
| +Matcher<Node*> IsFloat64InsertWord32(const Matcher<int>& location_matcher,
|
| + const Matcher<Node*>& lhs_matcher,
|
| + const Matcher<Node*>& rhs_matcher) {
|
| + return MakeMatcher(new IsFloat64InsertWord32Matcher(
|
| + location_matcher, lhs_matcher, rhs_matcher));
|
| +}
|
| +
|
| +
|
| #define IS_BINOP_MATCHER(Name) \
|
| Matcher<Node*> Is##Name(const Matcher<Node*>& lhs_matcher, \
|
| const Matcher<Node*>& rhs_matcher) { \
|
|
|