From d0d4852847432368b090c184d6639e573538dccf Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Tue, 4 Nov 2014 16:40:20 +0000 Subject: [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 --- compiler/optimizing/codegen_test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compiler/optimizing/codegen_test.cc') diff --git a/compiler/optimizing/codegen_test.cc b/compiler/optimizing/codegen_test.cc index 68fcb25036..6d4514f0ea 100644 --- a/compiler/optimizing/codegen_test.cc +++ b/compiler/optimizing/codegen_test.cc @@ -543,4 +543,13 @@ TEST(CodegenTest, MaterializedCondition2) { } } +TEST(CodegenTest, ReturnDivIntLit8) { + const uint16_t data[] = ONE_REGISTER_CODE_ITEM( + Instruction::CONST_4 | 4 << 12 | 0 << 8, + Instruction::DIV_INT_LIT8, 3 << 8 | 0, + Instruction::RETURN); + + TestCode(data, true, 1); +} + } // namespace art -- cgit v1.2.3-59-g8ed1b