| 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 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 StoreInstanceFieldSlowPath* slow_path = | 1807 StoreInstanceFieldSlowPath* slow_path = |
| 1808 new StoreInstanceFieldSlowPath(this, *cls); | 1808 new StoreInstanceFieldSlowPath(this, *cls); |
| 1809 compiler->AddSlowPathCode(slow_path); | 1809 compiler->AddSlowPathCode(slow_path); |
| 1810 | 1810 |
| 1811 __ TryAllocate(*cls, | 1811 __ TryAllocate(*cls, |
| 1812 slow_path->entry_label(), | 1812 slow_path->entry_label(), |
| 1813 temp, | 1813 temp, |
| 1814 temp2); | 1814 temp2); |
| 1815 __ Bind(slow_path->exit_label()); | 1815 __ Bind(slow_path->exit_label()); |
| 1816 __ mov(temp2, temp); | 1816 __ mov(temp2, temp); |
| 1817 __ StoreIntoObject(instance_reg, | 1817 __ StoreIntoObjectOffset(instance_reg, offset_in_bytes_, temp2); |
| 1818 FieldAddress(instance_reg, offset_in_bytes_), | |
| 1819 temp2); | |
| 1820 } else { | 1818 } else { |
| 1821 __ lw(temp, FieldAddress(instance_reg, offset_in_bytes_)); | 1819 __ lw(temp, FieldAddress(instance_reg, offset_in_bytes_)); |
| 1822 } | 1820 } |
| 1823 switch (cid) { | 1821 switch (cid) { |
| 1824 case kDoubleCid: | 1822 case kDoubleCid: |
| 1825 __ StoreDToOffset(value, temp, Double::value_offset() - kHeapObjectTag); | 1823 __ StoreDToOffset(value, temp, Double::value_offset() - kHeapObjectTag); |
| 1826 break; | 1824 break; |
| 1827 default: | 1825 default: |
| 1828 UNREACHABLE(); | 1826 UNREACHABLE(); |
| 1829 } | 1827 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1870 StoreInstanceFieldSlowPath* slow_path = | 1868 StoreInstanceFieldSlowPath* slow_path = |
| 1871 new StoreInstanceFieldSlowPath(this, compiler->double_class()); | 1869 new StoreInstanceFieldSlowPath(this, compiler->double_class()); |
| 1872 compiler->AddSlowPathCode(slow_path); | 1870 compiler->AddSlowPathCode(slow_path); |
| 1873 | 1871 |
| 1874 __ TryAllocate(compiler->double_class(), | 1872 __ TryAllocate(compiler->double_class(), |
| 1875 slow_path->entry_label(), | 1873 slow_path->entry_label(), |
| 1876 temp, | 1874 temp, |
| 1877 temp2); | 1875 temp2); |
| 1878 __ Bind(slow_path->exit_label()); | 1876 __ Bind(slow_path->exit_label()); |
| 1879 __ mov(temp2, temp); | 1877 __ mov(temp2, temp); |
| 1880 __ StoreIntoObject(instance_reg, | 1878 __ StoreIntoObjectOffset(instance_reg, offset_in_bytes_, temp2); |
| 1881 FieldAddress(instance_reg, offset_in_bytes_), | |
| 1882 temp2); | |
| 1883 | 1879 |
| 1884 __ Bind(©_double); | 1880 __ Bind(©_double); |
| 1885 __ LoadDFromOffset(fpu_temp, | 1881 __ LoadDFromOffset(fpu_temp, |
| 1886 value_reg, | 1882 value_reg, |
| 1887 Double::value_offset() - kHeapObjectTag); | 1883 Double::value_offset() - kHeapObjectTag); |
| 1888 __ StoreDToOffset(fpu_temp, temp, | 1884 __ StoreDToOffset(fpu_temp, temp, |
| 1889 Double::value_offset() - kHeapObjectTag); | 1885 Double::value_offset() - kHeapObjectTag); |
| 1890 __ b(&skip_store); | 1886 __ b(&skip_store); |
| 1891 } | 1887 } |
| 1892 | 1888 |
| 1893 __ Bind(&store_pointer); | 1889 __ Bind(&store_pointer); |
| 1894 } | 1890 } |
| 1895 | 1891 |
| 1896 if (ShouldEmitStoreBarrier()) { | 1892 if (ShouldEmitStoreBarrier()) { |
| 1897 Register value_reg = locs()->in(1).reg(); | 1893 Register value_reg = locs()->in(1).reg(); |
| 1898 __ StoreIntoObject(instance_reg, | 1894 __ StoreIntoObjectOffset(instance_reg, |
| 1899 FieldAddress(instance_reg, offset_in_bytes_), | 1895 offset_in_bytes_, |
| 1900 value_reg, | 1896 value_reg, |
| 1901 CanValueBeSmi()); | 1897 CanValueBeSmi()); |
| 1902 } else { | 1898 } else { |
| 1903 if (locs()->in(1).IsConstant()) { | 1899 if (locs()->in(1).IsConstant()) { |
| 1904 __ StoreIntoObjectNoBarrier( | 1900 __ StoreIntoObjectNoBarrierOffset( |
| 1905 instance_reg, | 1901 instance_reg, |
| 1906 FieldAddress(instance_reg, offset_in_bytes_), | 1902 offset_in_bytes_, |
| 1907 locs()->in(1).constant()); | 1903 locs()->in(1).constant()); |
| 1908 } else { | 1904 } else { |
| 1909 Register value_reg = locs()->in(1).reg(); | 1905 Register value_reg = locs()->in(1).reg(); |
| 1910 __ StoreIntoObjectNoBarrier(instance_reg, | 1906 __ StoreIntoObjectNoBarrierOffset(instance_reg, |
| 1911 FieldAddress(instance_reg, offset_in_bytes_), value_reg); | 1907 offset_in_bytes_, |
| 1908 value_reg); |
| 1912 } | 1909 } |
| 1913 } | 1910 } |
| 1914 __ Bind(&skip_store); | 1911 __ Bind(&skip_store); |
| 1915 } | 1912 } |
| 1916 | 1913 |
| 1917 | 1914 |
| 1918 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(Isolate* isolate, | 1915 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(Isolate* isolate, |
| 1919 bool opt) const { | 1916 bool opt) const { |
| 1920 const intptr_t kNumInputs = 1; | 1917 const intptr_t kNumInputs = 1; |
| 1921 const intptr_t kNumTemps = 0; | 1918 const intptr_t kNumTemps = 0; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2242 __ lw(temp, FieldAddress(instance_reg, offset_in_bytes())); | 2239 __ lw(temp, FieldAddress(instance_reg, offset_in_bytes())); |
| 2243 __ LoadDFromOffset(value, temp, Double::value_offset() - kHeapObjectTag); | 2240 __ LoadDFromOffset(value, temp, Double::value_offset() - kHeapObjectTag); |
| 2244 __ StoreDToOffset(value, | 2241 __ StoreDToOffset(value, |
| 2245 result_reg, | 2242 result_reg, |
| 2246 Double::value_offset() - kHeapObjectTag); | 2243 Double::value_offset() - kHeapObjectTag); |
| 2247 __ b(&done); | 2244 __ b(&done); |
| 2248 } | 2245 } |
| 2249 | 2246 |
| 2250 __ Bind(&load_pointer); | 2247 __ Bind(&load_pointer); |
| 2251 } | 2248 } |
| 2252 __ lw(result_reg, Address(instance_reg, offset_in_bytes() - kHeapObjectTag)); | 2249 __ LoadFromOffset( |
| 2250 result_reg, instance_reg, offset_in_bytes() - kHeapObjectTag); |
| 2253 __ Bind(&done); | 2251 __ Bind(&done); |
| 2254 } | 2252 } |
| 2255 | 2253 |
| 2256 | 2254 |
| 2257 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(Isolate* isolate, | 2255 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(Isolate* isolate, |
| 2258 bool opt) const { | 2256 bool opt) const { |
| 2259 const intptr_t kNumInputs = 1; | 2257 const intptr_t kNumInputs = 1; |
| 2260 const intptr_t kNumTemps = 0; | 2258 const intptr_t kNumTemps = 0; |
| 2261 LocationSummary* locs = new(isolate) LocationSummary( | 2259 LocationSummary* locs = new(isolate) LocationSummary( |
| 2262 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 2260 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
| (...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4694 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 4692 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 4695 #if defined(DEBUG) | 4693 #if defined(DEBUG) |
| 4696 __ LoadImmediate(S4, kInvalidObjectPointer); | 4694 __ LoadImmediate(S4, kInvalidObjectPointer); |
| 4697 __ LoadImmediate(S5, kInvalidObjectPointer); | 4695 __ LoadImmediate(S5, kInvalidObjectPointer); |
| 4698 #endif | 4696 #endif |
| 4699 } | 4697 } |
| 4700 | 4698 |
| 4701 } // namespace dart | 4699 } // namespace dart |
| 4702 | 4700 |
| 4703 #endif // defined TARGET_ARCH_MIPS | 4701 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |