| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 const Register base, | 1813 const Register base, |
| 1814 int offset, | 1814 int offset, |
| 1815 const Condition cond) { | 1815 const Condition cond) { |
| 1816 // Ddst = MEM(Rbase + offset). | 1816 // Ddst = MEM(Rbase + offset). |
| 1817 // Instruction details available in ARM DDI 0406A, A8-628. | 1817 // Instruction details available in ARM DDI 0406A, A8-628. |
| 1818 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) | | 1818 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) | |
| 1819 // Vdst(15-12) | 1011(11-8) | offset | 1819 // Vdst(15-12) | 1011(11-8) | offset |
| 1820 ASSERT(CpuFeatures::IsEnabled(VFP3)); | 1820 ASSERT(CpuFeatures::IsEnabled(VFP3)); |
| 1821 ASSERT(offset % 4 == 0); | 1821 ASSERT(offset % 4 == 0); |
| 1822 ASSERT((offset / 4) < 256); | 1822 ASSERT((offset / 4) < 256); |
| 1823 ASSERT(offset >= 0); |
| 1823 emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 | | 1824 emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 | |
| 1824 0xB*B8 | ((offset / 4) & 255)); | 1825 0xB*B8 | ((offset / 4) & 255)); |
| 1825 } | 1826 } |
| 1826 | 1827 |
| 1827 | 1828 |
| 1828 void Assembler::vldr(const SwVfpRegister dst, | 1829 void Assembler::vldr(const SwVfpRegister dst, |
| 1829 const Register base, | 1830 const Register base, |
| 1830 int offset, | 1831 int offset, |
| 1831 const Condition cond) { | 1832 const Condition cond) { |
| 1832 // Sdst = MEM(Rbase + offset). | 1833 // Sdst = MEM(Rbase + offset). |
| 1833 // Instruction details available in ARM DDI 0406A, A8-628. | 1834 // Instruction details available in ARM DDI 0406A, A8-628. |
| 1834 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) | | 1835 // cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) | |
| 1835 // Vdst(15-12) | 1010(11-8) | offset | 1836 // Vdst(15-12) | 1010(11-8) | offset |
| 1836 ASSERT(CpuFeatures::IsEnabled(VFP3)); | 1837 ASSERT(CpuFeatures::IsEnabled(VFP3)); |
| 1837 ASSERT(offset % 4 == 0); | 1838 ASSERT(offset % 4 == 0); |
| 1838 ASSERT((offset / 4) < 256); | 1839 ASSERT((offset / 4) < 256); |
| 1840 ASSERT(offset >= 0); |
| 1839 emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 | | 1841 emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 | |
| 1840 0xA*B8 | ((offset / 4) & 255)); | 1842 0xA*B8 | ((offset / 4) & 255)); |
| 1841 } | 1843 } |
| 1842 | 1844 |
| 1843 | 1845 |
| 1844 void Assembler::vstr(const DwVfpRegister src, | 1846 void Assembler::vstr(const DwVfpRegister src, |
| 1845 const Register base, | 1847 const Register base, |
| 1846 int offset, | 1848 int offset, |
| 1847 const Condition cond) { | 1849 const Condition cond) { |
| 1848 // MEM(Rbase + offset) = Dsrc. | 1850 // MEM(Rbase + offset) = Dsrc. |
| 1849 // Instruction details available in ARM DDI 0406A, A8-786. | 1851 // Instruction details available in ARM DDI 0406A, A8-786. |
| 1850 // cond(31-28) | 1101(27-24)| 1000(23-20) | | Rbase(19-16) | | 1852 // cond(31-28) | 1101(27-24)| 1000(23-20) | | Rbase(19-16) | |
| 1851 // Vsrc(15-12) | 1011(11-8) | (offset/4) | 1853 // Vsrc(15-12) | 1011(11-8) | (offset/4) |
| 1852 ASSERT(CpuFeatures::IsEnabled(VFP3)); | 1854 ASSERT(CpuFeatures::IsEnabled(VFP3)); |
| 1853 ASSERT(offset % 4 == 0); | 1855 ASSERT(offset % 4 == 0); |
| 1854 ASSERT((offset / 4) < 256); | 1856 ASSERT((offset / 4) < 256); |
| 1857 ASSERT(offset >= 0); |
| 1855 emit(cond | 0xD8*B20 | base.code()*B16 | src.code()*B12 | | 1858 emit(cond | 0xD8*B20 | base.code()*B16 | src.code()*B12 | |
| 1856 0xB*B8 | ((offset / 4) & 255)); | 1859 0xB*B8 | ((offset / 4) & 255)); |
| 1857 } | 1860 } |
| 1858 | 1861 |
| 1859 | 1862 |
| 1863 void Assembler::vstr(const SwVfpRegister src, |
| 1864 const Register base, |
| 1865 int offset, |
| 1866 const Condition cond) { |
| 1867 // MEM(Rbase + offset) = SSrc. |
| 1868 // Instruction details available in ARM DDI 0406A, A8-786. |
| 1869 // cond(31-28) | 1101(27-24)| 1000(23-20) | Rbase(19-16) | |
| 1870 // Vdst(15-12) | 1010(11-8) | (offset/4) |
| 1871 ASSERT(CpuFeatures::IsEnabled(VFP3)); |
| 1872 ASSERT(offset % 4 == 0); |
| 1873 ASSERT((offset / 4) < 256); |
| 1874 ASSERT(offset >= 0); |
| 1875 emit(cond | 0xD8*B20 | base.code()*B16 | src.code()*B12 | |
| 1876 0xA*B8 | ((offset / 4) & 255)); |
| 1877 } |
| 1878 |
| 1879 |
| 1860 static void DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { | 1880 static void DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { |
| 1861 uint64_t i; | 1881 uint64_t i; |
| 1862 memcpy(&i, &d, 8); | 1882 memcpy(&i, &d, 8); |
| 1863 | 1883 |
| 1864 *lo = i & 0xffffffff; | 1884 *lo = i & 0xffffffff; |
| 1865 *hi = i >> 32; | 1885 *hi = i >> 32; |
| 1866 } | 1886 } |
| 1867 | 1887 |
| 1868 // Only works for little endian floating point formats. | 1888 // Only works for little endian floating point formats. |
| 1869 // We don't support VFP on the mixed endian floating point platform. | 1889 // We don't support VFP on the mixed endian floating point platform. |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2571 | 2591 |
| 2572 // Since a constant pool was just emitted, move the check offset forward by | 2592 // Since a constant pool was just emitted, move the check offset forward by |
| 2573 // the standard interval. | 2593 // the standard interval. |
| 2574 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 2594 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
| 2575 } | 2595 } |
| 2576 | 2596 |
| 2577 | 2597 |
| 2578 } } // namespace v8::internal | 2598 } } // namespace v8::internal |
| 2579 | 2599 |
| 2580 #endif // V8_TARGET_ARCH_ARM | 2600 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |