summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2014-10-28 17:30:07 +0000
committerRoland Levillain <rpl@google.com>2014-11-06 16:40:59 +0000
commit3dbcb38a8b2237b0da290ae35dc0caab3cb47b3d (patch)
tree98ed87e77213fc36fd72b2dbab71156f9176d4ee /compiler/optimizing/builder.cc
parent55dcfb5e0dd626993bb2b7b9f692c1b02b5d955f (diff)
downloadart-3dbcb38a8b2237b0da290ae35dc0caab3cb47b3d.tar.gz
art-3dbcb38a8b2237b0da290ae35dc0caab3cb47b3d.tar.bz2
art-3dbcb38a8b2237b0da290ae35dc0caab3cb47b3d.zip
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
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index e43841a03..a4af90006 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<HNeg>(instruction, Primitive::kPrimFloat);
+ break;
+ }
+
+ case Instruction::NEG_DOUBLE: {
+ Unop_12x<HNeg>(instruction, Primitive::kPrimDouble);
+ break;
+ }
+
case Instruction::NOT_INT: {
Unop_12x<HNot>(instruction, Primitive::kPrimInt);
break;