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

Unified Diff: src/arm/lithium-arm.h

Issue 330053002: ARM, ARM64: Optimize array copy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.h
diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h
index 127badcfe929691bcb595b7fce40dab89361da9c..fc75785891a3774eeb9a61d295519387c3d0b32d 100644
--- a/src/arm/lithium-arm.h
+++ b/src/arm/lithium-arm.h
@@ -60,6 +60,7 @@ class LCodeGen;
V(ConstantT) \
V(ConstructDouble) \
V(Context) \
+ V(CopyElements) \
V(DateField) \
V(DebugBreak) \
V(DeclareGlobals) \
@@ -73,6 +74,7 @@ class LCodeGen;
V(Drop) \
V(Dummy) \
V(DummyUse) \
+ V(FillElements) \
V(FlooringDivByConstI) \
V(FlooringDivByPowerOf2I) \
V(FlooringDivI) \
@@ -2192,6 +2194,51 @@ class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> {
};
+class LFillElements V8_FINAL : public LTemplateInstruction<0, 4, 1> {
+ public:
+ LFillElements(LOperand* object, LOperand* from, LOperand* to,
+ LOperand* value, LOperand* scratch) {
+ inputs_[0] = object;
+ inputs_[1] = from;
+ inputs_[2] = to;
+ inputs_[3] = value;
+ temps_[0] = scratch;
+ }
+ LOperand* elements() { return inputs_[0]; }
+ LOperand* from() { return inputs_[1]; }
+ LOperand* to() { return inputs_[2]; }
+ LOperand* value() { return inputs_[3]; }
+ LOperand* scratch() { return temps_[0]; }
+
+ DECLARE_CONCRETE_INSTRUCTION(FillElements, "fill-elements")
+ DECLARE_HYDROGEN_ACCESSOR(FillElements)
+
+ virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
+
+ // Max size for unroll (choosen to generate the smallest code size).
+ static const int32_t kMaxUnrolledSize = 4;
+};
+
+
+class LCopyElements V8_FINAL : public LTemplateInstruction<0, 3, 0> {
+ public:
+ LCopyElements(LOperand* src, LOperand* dst, LOperand* length) {
+ inputs_[0] = src;
+ inputs_[1] = dst;
+ inputs_[2] = length;
+ }
+ LOperand* src() { return inputs_[0]; }
+ LOperand* dst() { return inputs_[1]; }
+ LOperand* length() { return inputs_[2]; }
+ ElementsKind elements_kind() const { return hydrogen()->elements_kind(); }
+
+ DECLARE_CONCRETE_INSTRUCTION(CopyElements, "copy-elements")
+ DECLARE_HYDROGEN_ACCESSOR(CopyElements)
+
+ virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
+};
+
+
class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> {
public:
LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698