diff options
| author | 2014-06-19 10:00:34 +0100 | |
|---|---|---|
| committer | 2014-07-02 16:00:32 +0100 | |
| commit | 412f10cfed002ab617c78f2621d68446ca4dd8bd (patch) | |
| tree | bbd9dddd0436da566365ada5deb1840e315e1b11 /compiler/optimizing/nodes.h | |
| parent | d6ab04646d8eec6f24b200f8649f3d942d9ad17e (diff) | |
Support longs in the register allocator for x86_64.
Change-Id: I7fb6dfb761bc5cf9e5705682032855a0a70ca867
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 503f31d990..92920845c3 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -414,6 +414,7 @@ class HBasicBlock : public ArenaObject { M(ReturnVoid) \ M(StoreLocal) \ M(Sub) \ + M(Compare) \ #define FORWARD_DECLARATION(type) class H##type; @@ -986,6 +987,22 @@ class HGreaterThanOrEqual : public HCondition { }; +// Instruction to check how two inputs compare to each other. +// Result is 0 if input0 == input1, 1 if input0 > input1, or -1 if input0 < input1. +class HCompare : public HBinaryOperation { + public: + HCompare(Primitive::Type type, HInstruction* first, HInstruction* second) + : HBinaryOperation(Primitive::kPrimInt, first, second) { + DCHECK_EQ(type, first->GetType()); + DCHECK_EQ(type, second->GetType()); + } + + DECLARE_INSTRUCTION(Compare); + + private: + DISALLOW_COPY_AND_ASSIGN(HCompare); +}; + // A local in the graph. Corresponds to a Dex register. class HLocal : public HTemplateInstruction<0> { public: |