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
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index e43841a..a4af900 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -896,6 +896,16 @@
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;