Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 43fa8be1cdeec090f2914b0598b7179b18f611a9..c5db715d6d0b7e08459405a41c38cdf4e2731a80 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -3114,7 +3114,10 @@ |
? (element_size_shift - kSmiTagSize) : element_size_shift; |
int base_offset = instr->base_offset(); |
- if (elements_kind == FLOAT32_ELEMENTS || elements_kind == FLOAT64_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS || |
+ elements_kind == FLOAT32_ELEMENTS || |
+ elements_kind == EXTERNAL_FLOAT64_ELEMENTS || |
+ elements_kind == FLOAT64_ELEMENTS) { |
FPURegister result = ToDoubleRegister(instr->result()); |
if (key_is_constant) { |
__ Addu(scratch0(), external_pointer, constant_key << element_size_shift); |
@@ -3122,7 +3125,8 @@ |
__ sll(scratch0(), key, shift_size); |
__ Addu(scratch0(), scratch0(), external_pointer); |
} |
- if (elements_kind == FLOAT32_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS || |
+ elements_kind == FLOAT32_ELEMENTS) { |
__ lwc1(result, MemOperand(scratch0(), base_offset)); |
__ cvt_d_s(result, result); |
} else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS |
@@ -3134,22 +3138,29 @@ |
key, external_pointer, key_is_constant, constant_key, |
element_size_shift, shift_size, base_offset); |
switch (elements_kind) { |
+ case EXTERNAL_INT8_ELEMENTS: |
case INT8_ELEMENTS: |
__ lb(result, mem_operand); |
break; |
+ case EXTERNAL_UINT8_CLAMPED_ELEMENTS: |
+ case EXTERNAL_UINT8_ELEMENTS: |
case UINT8_ELEMENTS: |
case UINT8_CLAMPED_ELEMENTS: |
__ lbu(result, mem_operand); |
break; |
+ case EXTERNAL_INT16_ELEMENTS: |
case INT16_ELEMENTS: |
__ lh(result, mem_operand); |
break; |
+ case EXTERNAL_UINT16_ELEMENTS: |
case UINT16_ELEMENTS: |
__ lhu(result, mem_operand); |
break; |
+ case EXTERNAL_INT32_ELEMENTS: |
case INT32_ELEMENTS: |
__ lw(result, mem_operand); |
break; |
+ case EXTERNAL_UINT32_ELEMENTS: |
case UINT32_ELEMENTS: |
__ lw(result, mem_operand); |
if (!instr->hydrogen()->CheckFlag(HInstruction::kUint32)) { |
@@ -3159,6 +3170,8 @@ |
break; |
case FLOAT32_ELEMENTS: |
case FLOAT64_ELEMENTS: |
+ case EXTERNAL_FLOAT32_ELEMENTS: |
+ case EXTERNAL_FLOAT64_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
case FAST_ELEMENTS: |
case FAST_SMI_ELEMENTS: |
@@ -3270,7 +3283,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); |
@@ -4265,7 +4278,10 @@ |
? (element_size_shift - kSmiTagSize) : element_size_shift; |
int base_offset = instr->base_offset(); |
- if (elements_kind == FLOAT32_ELEMENTS || elements_kind == FLOAT64_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS || |
+ elements_kind == FLOAT32_ELEMENTS || |
+ elements_kind == EXTERNAL_FLOAT64_ELEMENTS || |
+ elements_kind == FLOAT64_ELEMENTS) { |
Register address = scratch0(); |
FPURegister value(ToDoubleRegister(instr->value())); |
if (key_is_constant) { |
@@ -4280,7 +4296,8 @@ |
__ Addu(address, external_pointer, address); |
} |
- if (elements_kind == FLOAT32_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS || |
+ elements_kind == FLOAT32_ELEMENTS) { |
__ cvt_s_d(double_scratch0(), value); |
__ swc1(double_scratch0(), MemOperand(address, base_offset)); |
} else { // Storing doubles, not floats. |
@@ -4293,21 +4310,30 @@ |
element_size_shift, shift_size, |
base_offset); |
switch (elements_kind) { |
+ case EXTERNAL_UINT8_CLAMPED_ELEMENTS: |
+ case EXTERNAL_INT8_ELEMENTS: |
+ case EXTERNAL_UINT8_ELEMENTS: |
case UINT8_ELEMENTS: |
case UINT8_CLAMPED_ELEMENTS: |
case INT8_ELEMENTS: |
__ sb(value, mem_operand); |
break; |
+ case EXTERNAL_INT16_ELEMENTS: |
+ case EXTERNAL_UINT16_ELEMENTS: |
case INT16_ELEMENTS: |
case UINT16_ELEMENTS: |
__ sh(value, mem_operand); |
break; |
+ case EXTERNAL_INT32_ELEMENTS: |
+ case EXTERNAL_UINT32_ELEMENTS: |
case INT32_ELEMENTS: |
case UINT32_ELEMENTS: |
__ sw(value, mem_operand); |
break; |
case FLOAT32_ELEMENTS: |
case FLOAT64_ELEMENTS: |
+ case EXTERNAL_FLOAT32_ELEMENTS: |
+ case EXTERNAL_FLOAT64_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
case FAST_ELEMENTS: |
case FAST_SMI_ELEMENTS: |
@@ -4421,7 +4447,7 @@ |
void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) { |
// By cases: external, fast double |
- if (instr->is_fixed_typed_array()) { |
+ if (instr->is_typed_elements()) { |
DoStoreKeyedExternalArray(instr); |
} else if (instr->hydrogen()->value()->representation().IsDouble()) { |
DoStoreKeyedFixedDoubleArray(instr); |