From d6fb6cfb6f2d0d9595f55e8cc18d2753be5d9a13 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Tue, 11 Nov 2014 19:07:44 +0000 Subject: [optimizing compiler] Add DIV_LONG - for backends: arm, x86, x86_64 - added cqo, idivq, testq assembly for x64_64 - small cleanups Change-Id: I762ef37880749038ed25d6014370be9a61795200 --- compiler/optimizing/nodes.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 59fac527ce..5af3cdd2d6 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -1750,8 +1750,8 @@ class HMul : public HBinaryOperation { class HDiv : public HBinaryOperation { public: - HDiv(Primitive::Type result_type, HInstruction* left, HInstruction* right) - : HBinaryOperation(result_type, left, right) {} + HDiv(Primitive::Type result_type, HInstruction* left, HInstruction* right, uint32_t dex_pc) + : HBinaryOperation(result_type, left, right), dex_pc_(dex_pc) {} virtual int32_t Evaluate(int32_t x, int32_t y) const { // Our graph structure ensures we never have 0 for `y` during constant folding. @@ -1761,9 +1761,13 @@ class HDiv : public HBinaryOperation { } virtual int64_t Evaluate(int64_t x, int64_t y) const { return x / y; } + uint32_t GetDexPc() const { return dex_pc_; } + DECLARE_INSTRUCTION(Div); private: + const uint32_t dex_pc_; + DISALLOW_COPY_AND_ASSIGN(HDiv); }; -- cgit v1.2.3-59-g8ed1b