[optimizing compiler] Add div-int and exception handling.
- for backends: arm, x86, x86_64
- fixed a register allocator bug: the request for a fixed register for
the first input was ignored if the output was kSameAsFirstInput
- added divide by zero exception
- more tests
- shuffle around some code in the builder to reduce the number of lines
of code for a single function.
Change-Id: Id3a515e02bfbc66cd9d16cb9746f7551bdab3d42
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index f25415b..f09f729 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -120,6 +120,11 @@
Primitive::Type input_type,
Primitive::Type result_type);
+ void BuildCheckedDiv(const Instruction& instruction,
+ uint32_t dex_offset,
+ Primitive::Type type,
+ bool second_is_lit);
+
void BuildReturn(const Instruction& instruction, Primitive::Type type);
// Builds an instance field access node and returns whether the instruction is supported.
@@ -150,6 +155,8 @@
uint32_t* args,
uint32_t register_index);
+ void BuildFillArrayData(const Instruction& instruction, uint32_t dex_offset);
+
// Fills the given object with data as specified in the fill-array-data
// instruction. Currently only used for non-reference and non-floating point
// arrays.