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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 Register temp = locs()->temp(0).reg(); | 1564 Register temp = locs()->temp(0).reg(); |
1565 Register temp2 = locs()->temp(1).reg(); | 1565 Register temp2 = locs()->temp(1).reg(); |
1566 const intptr_t cid = field().UnboxedFieldCid(); | 1566 const intptr_t cid = field().UnboxedFieldCid(); |
1567 | 1567 |
1568 if (is_initialization_) { | 1568 if (is_initialization_) { |
1569 const Class* cls = NULL; | 1569 const Class* cls = NULL; |
1570 switch (cid) { | 1570 switch (cid) { |
1571 case kDoubleCid: | 1571 case kDoubleCid: |
1572 cls = &compiler->double_class(); | 1572 cls = &compiler->double_class(); |
1573 break; | 1573 break; |
1574 // TODO(johnmccutchan): Add kFloat32x4Cid here. | 1574 case kFloat32x4Cid: |
| 1575 cls = &compiler->float32x4_class(); |
| 1576 break; |
1575 default: | 1577 default: |
1576 UNREACHABLE(); | 1578 UNREACHABLE(); |
1577 } | 1579 } |
| 1580 |
1578 StoreInstanceFieldSlowPath* slow_path = | 1581 StoreInstanceFieldSlowPath* slow_path = |
1579 new StoreInstanceFieldSlowPath(this, *cls); | 1582 new StoreInstanceFieldSlowPath(this, *cls); |
1580 compiler->AddSlowPathCode(slow_path); | 1583 compiler->AddSlowPathCode(slow_path); |
1581 | 1584 |
1582 __ TryAllocate(*cls, | 1585 __ TryAllocate(*cls, |
1583 slow_path->entry_label(), | 1586 slow_path->entry_label(), |
1584 Assembler::kFarJump, | 1587 Assembler::kFarJump, |
1585 temp, | 1588 temp, |
1586 PP); | 1589 PP); |
1587 __ Bind(slow_path->exit_label()); | 1590 __ Bind(slow_path->exit_label()); |
1588 __ movq(temp2, temp); | 1591 __ movq(temp2, temp); |
1589 __ StoreIntoObject(instance_reg, | 1592 __ StoreIntoObject(instance_reg, |
1590 FieldAddress(instance_reg, field().Offset()), | 1593 FieldAddress(instance_reg, field().Offset()), |
1591 temp2); | 1594 temp2); |
1592 } else { | 1595 } else { |
1593 __ movq(temp, FieldAddress(instance_reg, field().Offset())); | 1596 __ movq(temp, FieldAddress(instance_reg, field().Offset())); |
1594 } | 1597 } |
1595 switch (cid) { | 1598 switch (cid) { |
1596 case kDoubleCid: | 1599 case kDoubleCid: |
1597 __ movsd(FieldAddress(temp, Double::value_offset()), value); | 1600 __ Comment("UnboxedDoubleStoreInstanceFieldInstr"); |
1598 // TODO(johnmccutchan): Add kFloat32x4Cid here. | 1601 __ movsd(FieldAddress(temp, Double::value_offset()), value); |
1599 break; | 1602 break; |
| 1603 case kFloat32x4Cid: |
| 1604 __ Comment("UnboxedFloat32x4StoreInstanceFieldInstr"); |
| 1605 __ movups(FieldAddress(temp, Float32x4::value_offset()), value); |
| 1606 break; |
1600 default: | 1607 default: |
1601 UNREACHABLE(); | 1608 UNREACHABLE(); |
1602 } | 1609 } |
1603 return; | 1610 return; |
1604 } | 1611 } |
1605 | 1612 |
1606 if (IsPotentialUnboxedStore()) { | 1613 if (IsPotentialUnboxedStore()) { |
1607 Register value_reg = locs()->in(1).reg(); | 1614 Register value_reg = locs()->in(1).reg(); |
1608 Register temp = locs()->temp(0).reg(); | 1615 Register temp = locs()->temp(0).reg(); |
1609 Register temp2 = locs()->temp(1).reg(); | 1616 Register temp2 = locs()->temp(1).reg(); |
1610 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); | 1617 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); |
1611 | 1618 |
1612 Label store_pointer; | 1619 Label store_pointer; |
1613 Label copy_double; | |
1614 Label store_double; | 1620 Label store_double; |
| 1621 Label store_float32x4; |
1615 | 1622 |
1616 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP); | 1623 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP); |
1617 | 1624 |
1618 __ cmpq(FieldAddress(temp, Field::is_nullable_offset()), | 1625 __ cmpq(FieldAddress(temp, Field::is_nullable_offset()), |
1619 Immediate(kNullCid)); | 1626 Immediate(kNullCid)); |
1620 __ j(EQUAL, &store_pointer); | 1627 __ j(EQUAL, &store_pointer); |
1621 | 1628 |
1622 __ movzxb(temp2, FieldAddress(temp, Field::kind_bits_offset())); | 1629 __ movzxb(temp2, FieldAddress(temp, Field::kind_bits_offset())); |
1623 __ testq(temp2, Immediate(1 << Field::kUnboxingCandidateBit)); | 1630 __ testq(temp2, Immediate(1 << Field::kUnboxingCandidateBit)); |
1624 __ j(ZERO, &store_pointer); | 1631 __ j(ZERO, &store_pointer); |
1625 | 1632 |
1626 __ cmpq(FieldAddress(temp, Field::guarded_cid_offset()), | 1633 __ cmpq(FieldAddress(temp, Field::guarded_cid_offset()), |
1627 Immediate(kDoubleCid)); | 1634 Immediate(kDoubleCid)); |
1628 __ j(EQUAL, &store_double); | 1635 __ j(EQUAL, &store_double); |
1629 | 1636 |
| 1637 __ cmpq(FieldAddress(temp, Field::guarded_cid_offset()), |
| 1638 Immediate(kFloat32x4Cid)); |
| 1639 __ j(EQUAL, &store_float32x4); |
| 1640 |
1630 // Fall through. | 1641 // Fall through. |
1631 __ jmp(&store_pointer); | 1642 __ jmp(&store_pointer); |
1632 | 1643 |
1633 __ Bind(&store_double); | |
1634 | |
1635 __ movq(temp, FieldAddress(instance_reg, field().Offset())); | |
1636 __ CompareObject(temp, Object::null_object(), PP); | |
1637 __ j(NOT_EQUAL, ©_double); | |
1638 | |
1639 StoreInstanceFieldSlowPath* slow_path = | |
1640 new StoreInstanceFieldSlowPath(this, compiler->double_class()); | |
1641 compiler->AddSlowPathCode(slow_path); | |
1642 | |
1643 if (!compiler->is_optimizing()) { | 1644 if (!compiler->is_optimizing()) { |
1644 locs()->live_registers()->Add(locs()->in(0)); | 1645 locs()->live_registers()->Add(locs()->in(0)); |
1645 locs()->live_registers()->Add(locs()->in(1)); | 1646 locs()->live_registers()->Add(locs()->in(1)); |
1646 } | 1647 } |
1647 __ TryAllocate(compiler->double_class(), | |
1648 slow_path->entry_label(), | |
1649 Assembler::kFarJump, | |
1650 temp, | |
1651 PP); | |
1652 __ Bind(slow_path->exit_label()); | |
1653 __ movq(temp2, temp); | |
1654 __ StoreIntoObject(instance_reg, | |
1655 FieldAddress(instance_reg, field().Offset()), | |
1656 temp2); | |
1657 | 1648 |
1658 __ Bind(©_double); | 1649 { |
1659 __ movsd(fpu_temp, FieldAddress(value_reg, Double::value_offset())); | 1650 __ Bind(&store_double); |
1660 __ movsd(FieldAddress(temp, Double::value_offset()), fpu_temp); | 1651 Label copy_double; |
1661 __ jmp(&skip_store); | 1652 StoreInstanceFieldSlowPath* slow_path = |
| 1653 new StoreInstanceFieldSlowPath(this, compiler->double_class()); |
| 1654 compiler->AddSlowPathCode(slow_path); |
| 1655 |
| 1656 __ movq(temp, FieldAddress(instance_reg, field().Offset())); |
| 1657 __ CompareObject(temp, Object::null_object(), PP); |
| 1658 __ j(NOT_EQUAL, ©_double); |
| 1659 |
| 1660 __ TryAllocate(compiler->double_class(), |
| 1661 slow_path->entry_label(), |
| 1662 Assembler::kFarJump, |
| 1663 temp, |
| 1664 PP); |
| 1665 __ Bind(slow_path->exit_label()); |
| 1666 __ movq(temp2, temp); |
| 1667 __ StoreIntoObject(instance_reg, |
| 1668 FieldAddress(instance_reg, field().Offset()), |
| 1669 temp2); |
| 1670 |
| 1671 __ Bind(©_double); |
| 1672 __ movsd(fpu_temp, FieldAddress(value_reg, Double::value_offset())); |
| 1673 __ movsd(FieldAddress(temp, Double::value_offset()), fpu_temp); |
| 1674 __ jmp(&skip_store); |
| 1675 } |
| 1676 |
| 1677 { |
| 1678 __ Bind(&store_float32x4); |
| 1679 Label copy_float32x4; |
| 1680 StoreInstanceFieldSlowPath* slow_path = |
| 1681 new StoreInstanceFieldSlowPath(this, compiler->float32x4_class()); |
| 1682 compiler->AddSlowPathCode(slow_path); |
| 1683 |
| 1684 __ movq(temp, FieldAddress(instance_reg, field().Offset())); |
| 1685 __ CompareObject(temp, Object::null_object(), PP); |
| 1686 __ j(NOT_EQUAL, ©_float32x4); |
| 1687 |
| 1688 __ TryAllocate(compiler->float32x4_class(), |
| 1689 slow_path->entry_label(), |
| 1690 Assembler::kFarJump, |
| 1691 temp, |
| 1692 PP); |
| 1693 __ Bind(slow_path->exit_label()); |
| 1694 __ movq(temp2, temp); |
| 1695 __ StoreIntoObject(instance_reg, |
| 1696 FieldAddress(instance_reg, field().Offset()), |
| 1697 temp2); |
| 1698 |
| 1699 __ Bind(©_float32x4); |
| 1700 __ movups(fpu_temp, FieldAddress(value_reg, Float32x4::value_offset())); |
| 1701 __ movups(FieldAddress(temp, Float32x4::value_offset()), fpu_temp); |
| 1702 __ jmp(&skip_store); |
| 1703 } |
| 1704 |
1662 __ Bind(&store_pointer); | 1705 __ Bind(&store_pointer); |
1663 } | 1706 } |
1664 | 1707 |
1665 if (ShouldEmitStoreBarrier()) { | 1708 if (ShouldEmitStoreBarrier()) { |
1666 Register value_reg = locs()->in(1).reg(); | 1709 Register value_reg = locs()->in(1).reg(); |
1667 __ StoreIntoObject(instance_reg, | 1710 __ StoreIntoObject(instance_reg, |
1668 FieldAddress(instance_reg, field().Offset()), | 1711 FieldAddress(instance_reg, field().Offset()), |
1669 value_reg, | 1712 value_reg, |
1670 CanValueBeSmi()); | 1713 CanValueBeSmi()); |
1671 } else { | 1714 } else { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 compiler->RestoreLiveRegisters(locs); | 1867 compiler->RestoreLiveRegisters(locs); |
1825 | 1868 |
1826 __ jmp(exit_label()); | 1869 __ jmp(exit_label()); |
1827 } | 1870 } |
1828 | 1871 |
1829 private: | 1872 private: |
1830 Instruction* instruction_; | 1873 Instruction* instruction_; |
1831 }; | 1874 }; |
1832 | 1875 |
1833 | 1876 |
| 1877 class BoxFloat32x4SlowPath : public SlowPathCode { |
| 1878 public: |
| 1879 explicit BoxFloat32x4SlowPath(Instruction* instruction) |
| 1880 : instruction_(instruction) { } |
| 1881 |
| 1882 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1883 __ Comment("BoxFloat32x4SlowPath"); |
| 1884 __ Bind(entry_label()); |
| 1885 const Class& float32x4_class = compiler->float32x4_class(); |
| 1886 const Code& stub = |
| 1887 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); |
| 1888 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint()); |
| 1889 |
| 1890 LocationSummary* locs = instruction_->locs(); |
| 1891 locs->live_registers()->Remove(locs->out()); |
| 1892 |
| 1893 compiler->SaveLiveRegisters(locs); |
| 1894 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. |
| 1895 &label, |
| 1896 PcDescriptors::kOther, |
| 1897 locs); |
| 1898 __ MoveRegister(locs->out().reg(), RAX); |
| 1899 compiler->RestoreLiveRegisters(locs); |
| 1900 |
| 1901 __ jmp(exit_label()); |
| 1902 } |
| 1903 |
| 1904 private: |
| 1905 Instruction* instruction_; |
| 1906 }; |
| 1907 |
| 1908 |
1834 LocationSummary* LoadFieldInstr::MakeLocationSummary(bool opt) const { | 1909 LocationSummary* LoadFieldInstr::MakeLocationSummary(bool opt) const { |
1835 const intptr_t kNumInputs = 1; | 1910 const intptr_t kNumInputs = 1; |
1836 const intptr_t kNumTemps = 0; | 1911 const intptr_t kNumTemps = 0; |
1837 LocationSummary* locs = | 1912 LocationSummary* locs = |
1838 new LocationSummary( | 1913 new LocationSummary( |
1839 kNumInputs, kNumTemps, | 1914 kNumInputs, kNumTemps, |
1840 (opt && !IsPotentialUnboxedLoad()) | 1915 (opt && !IsPotentialUnboxedLoad()) |
1841 ? LocationSummary::kNoCall | 1916 ? LocationSummary::kNoCall |
1842 : LocationSummary::kCallOnSlowPath); | 1917 : LocationSummary::kCallOnSlowPath); |
1843 | 1918 |
(...skipping 13 matching lines...) Expand all Loading... |
1857 | 1932 |
1858 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1933 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1859 Register instance_reg = locs()->in(0).reg(); | 1934 Register instance_reg = locs()->in(0).reg(); |
1860 if (IsUnboxedLoad() && compiler->is_optimizing()) { | 1935 if (IsUnboxedLoad() && compiler->is_optimizing()) { |
1861 XmmRegister result = locs()->out().fpu_reg(); | 1936 XmmRegister result = locs()->out().fpu_reg(); |
1862 Register temp = locs()->temp(0).reg(); | 1937 Register temp = locs()->temp(0).reg(); |
1863 __ movq(temp, FieldAddress(instance_reg, offset_in_bytes())); | 1938 __ movq(temp, FieldAddress(instance_reg, offset_in_bytes())); |
1864 intptr_t cid = field()->UnboxedFieldCid(); | 1939 intptr_t cid = field()->UnboxedFieldCid(); |
1865 switch (cid) { | 1940 switch (cid) { |
1866 case kDoubleCid: | 1941 case kDoubleCid: |
| 1942 __ Comment("UnboxedDoubleLoadFieldInstr"); |
1867 __ movsd(result, FieldAddress(temp, Double::value_offset())); | 1943 __ movsd(result, FieldAddress(temp, Double::value_offset())); |
1868 break; | 1944 break; |
1869 // TODO(johnmccutchan): Add Float32x4 path here. | 1945 case kFloat32x4Cid: |
| 1946 __ Comment("UnboxedFloat32x4LoadFieldInstr"); |
| 1947 __ movups(result, FieldAddress(temp, Float32x4::value_offset())); |
| 1948 break; |
1870 default: | 1949 default: |
1871 UNREACHABLE(); | 1950 UNREACHABLE(); |
1872 } | 1951 } |
1873 return; | 1952 return; |
1874 } | 1953 } |
1875 | 1954 |
1876 Label done; | 1955 Label done; |
1877 Register result = locs()->out().reg(); | 1956 Register result = locs()->out().reg(); |
1878 if (IsPotentialUnboxedLoad()) { | 1957 if (IsPotentialUnboxedLoad()) { |
1879 Register temp = locs()->temp(1).reg(); | 1958 Register temp = locs()->temp(1).reg(); |
1880 XmmRegister value = locs()->temp(0).fpu_reg(); | 1959 XmmRegister value = locs()->temp(0).fpu_reg(); |
1881 | 1960 |
1882 Label load_pointer; | 1961 Label load_pointer; |
1883 Label load_double; | 1962 Label load_double; |
| 1963 Label load_float32x4; |
1884 | 1964 |
1885 __ LoadObject(result, Field::ZoneHandle(field()->raw()), PP); | 1965 __ LoadObject(result, Field::ZoneHandle(field()->raw()), PP); |
1886 | 1966 |
1887 __ cmpq(FieldAddress(result, Field::is_nullable_offset()), | 1967 __ cmpq(FieldAddress(result, Field::is_nullable_offset()), |
1888 Immediate(kNullCid)); | 1968 Immediate(kNullCid)); |
1889 __ j(EQUAL, &load_pointer); | 1969 __ j(EQUAL, &load_pointer); |
1890 | 1970 |
1891 __ cmpq(FieldAddress(result, Field::guarded_cid_offset()), | 1971 __ cmpq(FieldAddress(result, Field::guarded_cid_offset()), |
1892 Immediate(kDoubleCid)); | 1972 Immediate(kDoubleCid)); |
1893 __ j(EQUAL, &load_double); | 1973 __ j(EQUAL, &load_double); |
1894 | 1974 |
| 1975 __ cmpq(FieldAddress(result, Field::guarded_cid_offset()), |
| 1976 Immediate(kFloat32x4Cid)); |
| 1977 __ j(EQUAL, &load_float32x4); |
| 1978 |
1895 // Fall through. | 1979 // Fall through. |
1896 __ jmp(&load_pointer); | 1980 __ jmp(&load_pointer); |
1897 | 1981 |
1898 __ Bind(&load_double); | |
1899 | |
1900 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); | |
1901 compiler->AddSlowPathCode(slow_path); | |
1902 | |
1903 if (!compiler->is_optimizing()) { | 1982 if (!compiler->is_optimizing()) { |
1904 locs()->live_registers()->Add(locs()->in(0)); | 1983 locs()->live_registers()->Add(locs()->in(0)); |
1905 } | 1984 } |
1906 | 1985 |
1907 __ TryAllocate(compiler->double_class(), | 1986 { |
1908 slow_path->entry_label(), | 1987 __ Bind(&load_double); |
1909 Assembler::kFarJump, | 1988 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); |
1910 result, | 1989 compiler->AddSlowPathCode(slow_path); |
1911 PP); | |
1912 __ Bind(slow_path->exit_label()); | |
1913 __ movq(temp, FieldAddress(instance_reg, offset_in_bytes())); | |
1914 __ movsd(value, FieldAddress(temp, Double::value_offset())); | |
1915 __ movsd(FieldAddress(result, Double::value_offset()), value); | |
1916 __ jmp(&done); | |
1917 | 1990 |
1918 // TODO(johnmccutchan): Add Float32x4 path here. | 1991 __ TryAllocate(compiler->double_class(), |
| 1992 slow_path->entry_label(), |
| 1993 Assembler::kFarJump, |
| 1994 result, |
| 1995 PP); |
| 1996 __ Bind(slow_path->exit_label()); |
| 1997 __ movq(temp, FieldAddress(instance_reg, offset_in_bytes())); |
| 1998 __ movsd(value, FieldAddress(temp, Double::value_offset())); |
| 1999 __ movsd(FieldAddress(result, Double::value_offset()), value); |
| 2000 __ jmp(&done); |
| 2001 } |
| 2002 { |
| 2003 __ Bind(&load_float32x4); |
| 2004 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); |
| 2005 compiler->AddSlowPathCode(slow_path); |
| 2006 |
| 2007 __ TryAllocate(compiler->float32x4_class(), |
| 2008 slow_path->entry_label(), |
| 2009 Assembler::kFarJump, |
| 2010 result, |
| 2011 PP); |
| 2012 __ Bind(slow_path->exit_label()); |
| 2013 __ movq(temp, FieldAddress(instance_reg, offset_in_bytes())); |
| 2014 __ movups(value, FieldAddress(temp, Float32x4::value_offset())); |
| 2015 __ movups(FieldAddress(result, Float32x4::value_offset()), value); |
| 2016 __ jmp(&done); |
| 2017 } |
1919 | 2018 |
1920 __ Bind(&load_pointer); | 2019 __ Bind(&load_pointer); |
1921 } | 2020 } |
1922 __ movq(result, FieldAddress(instance_reg, offset_in_bytes())); | 2021 __ movq(result, FieldAddress(instance_reg, offset_in_bytes())); |
1923 __ Bind(&done); | 2022 __ Bind(&done); |
1924 } | 2023 } |
1925 | 2024 |
1926 | 2025 |
1927 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(bool opt) const { | 2026 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(bool opt) const { |
1928 const intptr_t kNumInputs = 1; | 2027 const intptr_t kNumInputs = 1; |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2962 LocationSummary* summary = | 3061 LocationSummary* summary = |
2963 new LocationSummary(kNumInputs, | 3062 new LocationSummary(kNumInputs, |
2964 kNumTemps, | 3063 kNumTemps, |
2965 LocationSummary::kCallOnSlowPath); | 3064 LocationSummary::kCallOnSlowPath); |
2966 summary->set_in(0, Location::RequiresFpuRegister()); | 3065 summary->set_in(0, Location::RequiresFpuRegister()); |
2967 summary->set_out(Location::RequiresRegister()); | 3066 summary->set_out(Location::RequiresRegister()); |
2968 return summary; | 3067 return summary; |
2969 } | 3068 } |
2970 | 3069 |
2971 | 3070 |
2972 class BoxFloat32x4SlowPath : public SlowPathCode { | |
2973 public: | |
2974 explicit BoxFloat32x4SlowPath(BoxFloat32x4Instr* instruction) | |
2975 : instruction_(instruction) { } | |
2976 | |
2977 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | |
2978 __ Comment("BoxFloat32x4SlowPath"); | |
2979 __ Bind(entry_label()); | |
2980 const Class& float32x4_class = compiler->float32x4_class(); | |
2981 const Code& stub = | |
2982 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); | |
2983 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint()); | |
2984 | |
2985 LocationSummary* locs = instruction_->locs(); | |
2986 locs->live_registers()->Remove(locs->out()); | |
2987 | |
2988 compiler->SaveLiveRegisters(locs); | |
2989 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | |
2990 &label, | |
2991 PcDescriptors::kOther, | |
2992 locs); | |
2993 __ MoveRegister(locs->out().reg(), RAX); | |
2994 compiler->RestoreLiveRegisters(locs); | |
2995 | |
2996 __ jmp(exit_label()); | |
2997 } | |
2998 | |
2999 private: | |
3000 BoxFloat32x4Instr* instruction_; | |
3001 }; | |
3002 | |
3003 | |
3004 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3071 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3005 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); | 3072 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); |
3006 compiler->AddSlowPathCode(slow_path); | 3073 compiler->AddSlowPathCode(slow_path); |
3007 | 3074 |
3008 Register out_reg = locs()->out().reg(); | 3075 Register out_reg = locs()->out().reg(); |
3009 XmmRegister value = locs()->in(0).fpu_reg(); | 3076 XmmRegister value = locs()->in(0).fpu_reg(); |
3010 | 3077 |
3011 __ TryAllocate(compiler->float32x4_class(), | 3078 __ TryAllocate(compiler->float32x4_class(), |
3012 slow_path->entry_label(), | 3079 slow_path->entry_label(), |
3013 Assembler::kFarJump, | 3080 Assembler::kFarJump, |
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5001 PcDescriptors::kOther, | 5068 PcDescriptors::kOther, |
5002 locs()); | 5069 locs()); |
5003 __ Drop(2); // Discard type arguments and receiver. | 5070 __ Drop(2); // Discard type arguments and receiver. |
5004 } | 5071 } |
5005 | 5072 |
5006 } // namespace dart | 5073 } // namespace dart |
5007 | 5074 |
5008 #undef __ | 5075 #undef __ |
5009 | 5076 |
5010 #endif // defined TARGET_ARCH_X64 | 5077 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |