From 3dbcb38a8b2237b0da290ae35dc0caab3cb47b3d Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Tue, 28 Oct 2014 17:30:07 +0000 Subject: Support float & double negation in the optimizing compiler. - Add support for the neg-float and neg-double Dex instructions in the optimizing compiler. - Generate x86, x86-64 and ARM (but not ARM64) code for float and double HNeg nodes. - Add related tests to test/415-optimizing-arith-neg. Change-Id: I29739a86e13dbe6f64e191641d01637c867cba6c --- compiler/optimizing/builder.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/optimizing/builder.cc') diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index e43841a03d..a4af900062 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -896,6 +896,16 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32 break; } + case Instruction::NEG_FLOAT: { + Unop_12x(instruction, Primitive::kPrimFloat); + break; + } + + case Instruction::NEG_DOUBLE: { + Unop_12x(instruction, Primitive::kPrimDouble); + break; + } + case Instruction::NOT_INT: { Unop_12x(instruction, Primitive::kPrimInt); break; -- cgit v1.2.3-59-g8ed1b