summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes_x86.h
diff options
context:
space:
mode:
author Mark Mendell <mark.p.mendell@intel.com> 2015-10-30 09:45:03 -0400
committer Mark Mendell <mark.p.mendell@intel.com> 2016-01-22 14:54:15 -0500
commitdc00454f0b9a134f01f79b419200f4044c2af5c6 (patch)
tree49a787e2b617ce5bc69aa2dc4b71653c68ee0375 /compiler/optimizing/nodes_x86.h
parent2d0582b6c96cf16e18df50158494e32eeede0a95 (diff)
X86: Use the constant area for more operations.
Allow FP HNeg to use the constant area to hold the constant to flip the sign bit. Enhance some math intrinsics to allow the use of the constant area: Abs{Float,Double}, {Min,Max}{FloatFloat,DoubleDouble}. Allow compares of floats/doubles to constants using the constant area. These eliminate almost all uses of loading constants from the stack. Change-Id: Ic4b831565825cbe9f0801b1b53c1013be7c87ae4 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Diffstat (limited to 'compiler/optimizing/nodes_x86.h')
-rw-r--r--compiler/optimizing/nodes_x86.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes_x86.h b/compiler/optimizing/nodes_x86.h
index 556217bf74..20372467a4 100644
--- a/compiler/optimizing/nodes_x86.h
+++ b/compiler/optimizing/nodes_x86.h
@@ -62,6 +62,25 @@ class HX86LoadFromConstantTable : public HExpression<2> {
DISALLOW_COPY_AND_ASSIGN(HX86LoadFromConstantTable);
};
+// Version of HNeg with access to the constant table for FP types.
+class HX86FPNeg : public HExpression<2> {
+ public:
+ HX86FPNeg(Primitive::Type result_type,
+ HInstruction* input,
+ HX86ComputeBaseMethodAddress* method_base,
+ uint32_t dex_pc)
+ : HExpression(result_type, SideEffects::None(), dex_pc) {
+ DCHECK(Primitive::IsFloatingPointType(result_type));
+ SetRawInputAt(0, input);
+ SetRawInputAt(1, method_base);
+ }
+
+ DECLARE_INSTRUCTION(X86FPNeg);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(HX86FPNeg);
+};
+
// X86 version of HPackedSwitch that holds a pointer to the base method address.
class HX86PackedSwitch : public HTemplateInstruction<2> {
public: