OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1599 | 1599 |
1600 for (intptr_t i = 0; i < num_temps; i++) { | 1600 for (intptr_t i = 0; i < num_temps; i++) { |
1601 summary->set_temp(i, Location::RequiresRegister()); | 1601 summary->set_temp(i, Location::RequiresRegister()); |
1602 } | 1602 } |
1603 | 1603 |
1604 return summary; | 1604 return summary; |
1605 } | 1605 } |
1606 | 1606 |
1607 | 1607 |
1608 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1608 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1609 ASSERT(sizeof(classid_t) == 2); | |
siva
2015/06/12 22:08:11
Ditto.
| |
1609 __ Comment("GuardFieldClassInstr"); | 1610 __ Comment("GuardFieldClassInstr"); |
1610 | 1611 |
1611 const intptr_t value_cid = value()->Type()->ToCid(); | 1612 const intptr_t value_cid = value()->Type()->ToCid(); |
1612 const intptr_t field_cid = field().guarded_cid(); | 1613 const intptr_t field_cid = field().guarded_cid(); |
1613 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1614 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
1614 | 1615 |
1615 if (field_cid == kDynamicCid) { | 1616 if (field_cid == kDynamicCid) { |
1616 ASSERT(!compiler->is_optimizing()); | 1617 ASSERT(!compiler->is_optimizing()); |
1617 return; // Nothing to emit. | 1618 return; // Nothing to emit. |
1618 } | 1619 } |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1940 __ lw(box_reg, FieldAddress(instance_reg, offset)); | 1941 __ lw(box_reg, FieldAddress(instance_reg, offset)); |
1941 __ BranchNotEqual(box_reg, Object::null_object(), &done); | 1942 __ BranchNotEqual(box_reg, Object::null_object(), &done); |
1942 BoxAllocationSlowPath::Allocate(compiler, instruction, cls, box_reg, temp); | 1943 BoxAllocationSlowPath::Allocate(compiler, instruction, cls, box_reg, temp); |
1943 __ mov(temp, box_reg); | 1944 __ mov(temp, box_reg); |
1944 __ StoreIntoObjectOffset(instance_reg, offset, temp); | 1945 __ StoreIntoObjectOffset(instance_reg, offset, temp); |
1945 __ Bind(&done); | 1946 __ Bind(&done); |
1946 } | 1947 } |
1947 | 1948 |
1948 | 1949 |
1949 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1950 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1951 ASSERT(sizeof(classid_t) == 2); | |
1950 Label skip_store; | 1952 Label skip_store; |
1951 | 1953 |
1952 Register instance_reg = locs()->in(0).reg(); | 1954 Register instance_reg = locs()->in(0).reg(); |
1953 | 1955 |
1954 if (IsUnboxedStore() && compiler->is_optimizing()) { | 1956 if (IsUnboxedStore() && compiler->is_optimizing()) { |
1955 DRegister value = locs()->in(1).fpu_reg(); | 1957 DRegister value = locs()->in(1).fpu_reg(); |
1956 Register temp = locs()->temp(0).reg(); | 1958 Register temp = locs()->temp(0).reg(); |
1957 Register temp2 = locs()->temp(1).reg(); | 1959 Register temp2 = locs()->temp(1).reg(); |
1958 const intptr_t cid = field().UnboxedFieldCid(); | 1960 const intptr_t cid = field().UnboxedFieldCid(); |
1959 | 1961 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2278 locs->set_temp(0, opt ? Location::RequiresFpuRegister() | 2280 locs->set_temp(0, opt ? Location::RequiresFpuRegister() |
2279 : Location::FpuRegisterLocation(D1)); | 2281 : Location::FpuRegisterLocation(D1)); |
2280 locs->set_temp(1, Location::RequiresRegister()); | 2282 locs->set_temp(1, Location::RequiresRegister()); |
2281 } | 2283 } |
2282 locs->set_out(0, Location::RequiresRegister()); | 2284 locs->set_out(0, Location::RequiresRegister()); |
2283 return locs; | 2285 return locs; |
2284 } | 2286 } |
2285 | 2287 |
2286 | 2288 |
2287 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2289 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2290 ASSERT(sizeof(classid_t) == 2); | |
2291 | |
2288 Register instance_reg = locs()->in(0).reg(); | 2292 Register instance_reg = locs()->in(0).reg(); |
2289 if (IsUnboxedLoad() && compiler->is_optimizing()) { | 2293 if (IsUnboxedLoad() && compiler->is_optimizing()) { |
2290 DRegister result = locs()->out(0).fpu_reg(); | 2294 DRegister result = locs()->out(0).fpu_reg(); |
2291 Register temp = locs()->temp(0).reg(); | 2295 Register temp = locs()->temp(0).reg(); |
2292 __ lw(temp, FieldAddress(instance_reg, offset_in_bytes())); | 2296 __ lw(temp, FieldAddress(instance_reg, offset_in_bytes())); |
2293 intptr_t cid = field()->UnboxedFieldCid(); | 2297 intptr_t cid = field()->UnboxedFieldCid(); |
2294 switch (cid) { | 2298 switch (cid) { |
2295 case kDoubleCid: | 2299 case kDoubleCid: |
2296 __ LoadDFromOffset(result, temp, | 2300 __ LoadDFromOffset(result, temp, |
2297 Double::value_offset() - kHeapObjectTag); | 2301 Double::value_offset() - kHeapObjectTag); |
(...skipping 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5622 1, | 5626 1, |
5623 locs()); | 5627 locs()); |
5624 __ lw(result, Address(SP, 1 * kWordSize)); | 5628 __ lw(result, Address(SP, 1 * kWordSize)); |
5625 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5629 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5626 } | 5630 } |
5627 | 5631 |
5628 | 5632 |
5629 } // namespace dart | 5633 } // namespace dart |
5630 | 5634 |
5631 #endif // defined TARGET_ARCH_MIPS | 5635 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |