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

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 6879009: Support Float64Arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index 2d415cbaf12ee8c96dcb72288c1c60525af004b1..b44d3b5aec194b01f7e45bfa22231f231c30db36 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -2479,6 +2479,11 @@ void LCodeGen::DoLoadKeyedSpecializedArrayElement(
__ add(scratch0(), external_pointer, Operand(key, LSL, 2));
__ vldr(result.low(), scratch0(), 0);
__ vcvt_f64_f32(result, result.low());
+ } else if (array_type == kExternalDoubleArray) {
+ CpuFeatures::Scope scope(VFP3);
+ DwVfpRegister result(ToDoubleRegister(instr->result()));
+ __ add(scratch0(), external_pointer, Operand(key, LSL, 3));
+ __ vldr(result, scratch0(), 0);
} else {
Register result(ToRegister(instr->result()));
switch (array_type) {
@@ -2507,6 +2512,7 @@ void LCodeGen::DoLoadKeyedSpecializedArrayElement(
DeoptimizeIf(cs, instr->environment());
break;
case kExternalFloatArray:
+ case kExternalDoubleArray:
UNREACHABLE();
break;
}
@@ -3232,12 +3238,18 @@ void LCodeGen::DoStoreKeyedSpecializedArrayElement(
Register external_pointer = ToRegister(instr->external_pointer());
Register key = ToRegister(instr->key());
ExternalArrayType array_type = instr->array_type();
+
if (array_type == kExternalFloatArray) {
CpuFeatures::Scope scope(VFP3);
DwVfpRegister value(ToDoubleRegister(instr->value()));
__ add(scratch0(), external_pointer, Operand(key, LSL, 2));
__ vcvt_f32_f64(double_scratch0().low(), value);
__ vstr(double_scratch0().low(), scratch0(), 0);
+ } else if (array_type == kExternalDoubleArray) {
+ CpuFeatures::Scope scope(VFP3);
+ DwVfpRegister value(ToDoubleRegister(instr->value()));
+ __ add(scratch0(), external_pointer, Operand(key, LSL, 3));
+ __ vstr(value, scratch0(), 0);
} else {
Register value(ToRegister(instr->value()));
switch (array_type) {
@@ -3259,6 +3271,7 @@ void LCodeGen::DoStoreKeyedSpecializedArrayElement(
__ str(value, MemOperand(external_pointer, key, LSL, 2));
break;
case kExternalFloatArray:
+ case kExternalDoubleArray:
UNREACHABLE();
break;
}

Powered by Google App Engine
This is Rietveld 408576698