[optimizing compiler] Add DIV_LONG

- for backends: arm, x86, x86_64
- added cqo, idivq, testq assembly for x64_64
- small cleanups

Change-Id: I762ef37880749038ed25d6014370be9a61795200
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index 9cf8305..b4497bf 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -102,9 +102,15 @@
   void Binop_23x(const Instruction& instruction, Primitive::Type type);
 
   template<typename T>
+  void Binop_23x(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc);
+
+  template<typename T>
   void Binop_12x(const Instruction& instruction, Primitive::Type type);
 
   template<typename T>
+  void Binop_12x(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc);
+
+  template<typename T>
   void Binop_22b(const Instruction& instruction, bool reverse);
 
   template<typename T>
@@ -119,7 +125,7 @@
 
   void BuildCheckedDiv(uint16_t out_reg,
                        uint16_t first_reg,
-                       int32_t second_reg,  // can be a constant
+                       int64_t second_reg_or_constant,
                        uint32_t dex_offset,
                        Primitive::Type type,
                        bool second_is_lit);