| Index: runtime/vm/intermediate_language_arm64.cc
|
| diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
|
| index 651371dfa933af4185a4d75942a4857217684b28..ab9a71e4c987e751bbfc60fc018785094d485e8b 100644
|
| --- a/runtime/vm/intermediate_language_arm64.cc
|
| +++ b/runtime/vm/intermediate_language_arm64.cc
|
| @@ -993,9 +993,11 @@ Representation LoadIndexedInstr::representation() const {
|
| case kTypedDataUint16ArrayCid:
|
| case kOneByteStringCid:
|
| case kTwoByteStringCid:
|
| + return kTagged;
|
| case kTypedDataInt32ArrayCid:
|
| + return kUnboxedInt32;
|
| case kTypedDataUint32ArrayCid:
|
| - return kTagged;
|
| + return kUnboxedUint32;
|
| case kTypedDataFloat32ArrayCid:
|
| case kTypedDataFloat64ArrayCid:
|
| return kUnboxedDouble;
|
| @@ -1093,6 +1095,25 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| return;
|
| }
|
|
|
| + if ((representation() == kUnboxedInt32) ||
|
| + (representation() == kUnboxedUint32)) {
|
| + const Register result = locs()->out(0).reg();
|
| + switch (class_id()) {
|
| + case kTypedDataInt32ArrayCid:
|
| + ASSERT(representation() == kUnboxedInt32);
|
| + __ ldr(result, element_address, kWord);
|
| + break;
|
| + case kTypedDataUint32ArrayCid:
|
| + ASSERT(representation() == kUnboxedUint32);
|
| + __ ldr(result, element_address, kUnsignedWord);
|
| + break;
|
| + default:
|
| + UNREACHABLE();
|
| + }
|
| + return;
|
| + }
|
| +
|
| + ASSERT(representation() == kTagged);
|
| const Register result = locs()->out(0).reg();
|
| switch (class_id()) {
|
| case kTypedDataInt8ArrayCid:
|
| @@ -1118,14 +1139,6 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ ldr(result, element_address, kUnsignedHalfword);
|
| __ SmiTag(result);
|
| break;
|
| - case kTypedDataInt32ArrayCid:
|
| - __ ldr(result, element_address, kWord);
|
| - __ SmiTag(result);
|
| - break;
|
| - case kTypedDataUint32ArrayCid:
|
| - __ ldr(result, element_address, kUnsignedWord);
|
| - __ SmiTag(result);
|
| - break;
|
| default:
|
| ASSERT((class_id() == kArrayCid) || (class_id() == kImmutableArrayCid));
|
| __ ldr(result, element_address);
|
| @@ -4387,7 +4400,23 @@ void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -DEFINE_UNIMPLEMENTED_INSTRUCTION(Int32ToDoubleInstr)
|
| +LocationSummary* Int32ToDoubleInstr::MakeLocationSummary(Isolate* isolate,
|
| + bool opt) const {
|
| + const intptr_t kNumInputs = 1;
|
| + const intptr_t kNumTemps = 0;
|
| + LocationSummary* result = new(isolate) LocationSummary(
|
| + isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + result->set_in(0, Location::RequiresRegister());
|
| + result->set_out(0, Location::RequiresFpuRegister());
|
| + return result;
|
| +}
|
| +
|
| +
|
| +void Int32ToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + const Register value = locs()->in(0).reg();
|
| + const VRegister result = locs()->out(0).fpu_reg();
|
| + __ scvtfd32(result, value);
|
| +}
|
|
|
|
|
| LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Isolate* isolate,
|
|
|