Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: src/hydrogen-instructions.h

Issue 11293061: Emit VMLA for multiply-add on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use VMLA instead, pass all tests(*) Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index d11835452c72d7024f2a38bb49a854eba7ce45f1..0c62cacd8f614711c89a9a23e9c2b973ecca709e 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -143,6 +143,7 @@ class LChunkBuilder;
V(MathMinMax) \
V(Mod) \
V(Mul) \
+ V(MultiplyAdd) \
V(ObjectLiteral) \
V(OsrEntry) \
V(OuterContext) \
@@ -3537,6 +3538,44 @@ class HMul: public HArithmeticBinaryOperation {
};
+class HMultiplyAdd: public HTemplateInstruction<4> {
+ public:
+ HMultiplyAdd(HValue* context, HValue* a, HValue* b, HValue* c) {
+ ASSERT(a != NULL && b != NULL && c != NULL);
+ SetOperandAt(0, context);
+ SetOperandAt(1, a);
+ SetOperandAt(2, b);
+ SetOperandAt(3, c);
+
+ // FIXME: Not sure what the stuff below means. Stolen from
+ // HArithmeticBinaryOperation and HMathFloorOfDiv.
ulan_google 2012/11/07 09:54:03 It sets the output representation of this instruct
+ set_representation(Representation::Double());
+ }
+
+ HValue* context() { return OperandAt(0); }
+ HValue* a() { return OperandAt(1); }
+ HValue* b() { return OperandAt(2); }
+ HValue* c() { return OperandAt(3); }
+
+ virtual bool IsCommutative() const { return false; }
+
+ virtual void PrintDataTo(StringStream* stream) {
+ // FIXME: Implement properly in the .cc file
+ a()->PrintNameTo(stream);
+ stream->Add(" ");
+ b()->PrintNameTo(stream);
+ stream->Add(" ");
+ c()->PrintNameTo(stream);
+ }
+
+ virtual Representation RequiredInputRepresentation(int index) {
+ return index == 0 ? Representation::Tagged() : Representation::Double();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(MultiplyAdd)
+};
+
+
class HMod: public HArithmeticBinaryOperation {
public:
HMod(HValue* context, HValue* left, HValue* right)
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698