Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 892193a3f8ba28d20603e7e1b4c5d6b47a16e74d..db2602c179c2d40eedeb1f864f38026ac21fb517 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -3070,31 +3070,40 @@ |
instr->hydrogen()->key()->representation(), |
elements_kind, |
instr->base_offset())); |
- if (elements_kind == FLOAT32_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS || |
+ elements_kind == FLOAT32_ELEMENTS) { |
XMMRegister result(ToDoubleRegister(instr->result())); |
__ movss(result, operand); |
__ cvtss2sd(result, result); |
- } else if (elements_kind == FLOAT64_ELEMENTS) { |
+ } else if (elements_kind == EXTERNAL_FLOAT64_ELEMENTS || |
+ elements_kind == FLOAT64_ELEMENTS) { |
__ movsd(ToDoubleRegister(instr->result()), operand); |
} else { |
Register result(ToRegister(instr->result())); |
switch (elements_kind) { |
+ case EXTERNAL_INT8_ELEMENTS: |
case INT8_ELEMENTS: |
__ movsx_b(result, operand); |
break; |
+ case EXTERNAL_UINT8_CLAMPED_ELEMENTS: |
+ case EXTERNAL_UINT8_ELEMENTS: |
case UINT8_ELEMENTS: |
case UINT8_CLAMPED_ELEMENTS: |
__ movzx_b(result, operand); |
break; |
+ case EXTERNAL_INT16_ELEMENTS: |
case INT16_ELEMENTS: |
__ movsx_w(result, operand); |
break; |
+ case EXTERNAL_UINT16_ELEMENTS: |
case UINT16_ELEMENTS: |
__ movzx_w(result, operand); |
break; |
+ case EXTERNAL_INT32_ELEMENTS: |
case INT32_ELEMENTS: |
__ mov(result, operand); |
break; |
+ case EXTERNAL_UINT32_ELEMENTS: |
case UINT32_ELEMENTS: |
__ mov(result, operand); |
if (!instr->hydrogen()->CheckFlag(HInstruction::kUint32)) { |
@@ -3102,6 +3111,8 @@ |
DeoptimizeIf(negative, instr, Deoptimizer::kNegativeValue); |
} |
break; |
+ case EXTERNAL_FLOAT32_ELEMENTS: |
+ case EXTERNAL_FLOAT64_ELEMENTS: |
case FLOAT32_ELEMENTS: |
case FLOAT64_ELEMENTS: |
case FAST_SMI_ELEMENTS: |
@@ -3181,7 +3192,7 @@ |
void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
- if (instr->is_fixed_typed_array()) { |
+ if (instr->is_typed_elements()) { |
DoLoadKeyedExternalArray(instr); |
} else if (instr->hydrogen()->representation().IsDouble()) { |
DoLoadKeyedFixedDoubleArray(instr); |
@@ -4196,28 +4207,39 @@ |
instr->hydrogen()->key()->representation(), |
elements_kind, |
instr->base_offset())); |
- if (elements_kind == FLOAT32_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS || |
+ elements_kind == FLOAT32_ELEMENTS) { |
XMMRegister xmm_scratch = double_scratch0(); |
__ cvtsd2ss(xmm_scratch, ToDoubleRegister(instr->value())); |
__ movss(operand, xmm_scratch); |
- } else if (elements_kind == FLOAT64_ELEMENTS) { |
+ } else if (elements_kind == EXTERNAL_FLOAT64_ELEMENTS || |
+ elements_kind == FLOAT64_ELEMENTS) { |
__ movsd(operand, ToDoubleRegister(instr->value())); |
} else { |
Register value = ToRegister(instr->value()); |
switch (elements_kind) { |
+ case EXTERNAL_UINT8_CLAMPED_ELEMENTS: |
+ case EXTERNAL_UINT8_ELEMENTS: |
+ case EXTERNAL_INT8_ELEMENTS: |
case UINT8_ELEMENTS: |
case INT8_ELEMENTS: |
case UINT8_CLAMPED_ELEMENTS: |
__ mov_b(operand, value); |
break; |
+ case EXTERNAL_INT16_ELEMENTS: |
+ case EXTERNAL_UINT16_ELEMENTS: |
case UINT16_ELEMENTS: |
case INT16_ELEMENTS: |
__ mov_w(operand, value); |
break; |
+ case EXTERNAL_INT32_ELEMENTS: |
+ case EXTERNAL_UINT32_ELEMENTS: |
case UINT32_ELEMENTS: |
case INT32_ELEMENTS: |
__ mov(operand, value); |
break; |
+ case EXTERNAL_FLOAT32_ELEMENTS: |
+ case EXTERNAL_FLOAT64_ELEMENTS: |
case FLOAT32_ELEMENTS: |
case FLOAT64_ELEMENTS: |
case FAST_SMI_ELEMENTS: |
@@ -4303,7 +4325,7 @@ |
void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) { |
// By cases...external, fast-double, fast |
- if (instr->is_fixed_typed_array()) { |
+ if (instr->is_typed_elements()) { |
DoStoreKeyedExternalArray(instr); |
} else if (instr->hydrogen()->value()->representation().IsDouble()) { |
DoStoreKeyedFixedDoubleArray(instr); |