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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 DCHECK(!src2.rm().is(no_reg)); | 1791 DCHECK(!src2.rm().is(no_reg)); |
1792 DCHECK(src2.rs().is(no_reg)); | 1792 DCHECK(src2.rs().is(no_reg)); |
1793 DCHECK((src2.shift_imm_ >= 1) && (src2.shift_imm_ <= 32)); | 1793 DCHECK((src2.shift_imm_ >= 1) && (src2.shift_imm_ <= 32)); |
1794 DCHECK(src2.shift_op() == ASR); | 1794 DCHECK(src2.shift_op() == ASR); |
1795 int asr = (src2.shift_imm_ == 32) ? 0 : src2.shift_imm_; | 1795 int asr = (src2.shift_imm_ == 32) ? 0 : src2.shift_imm_; |
1796 emit(cond | 0x68*B20 | src1.code()*B16 | dst.code()*B12 | | 1796 emit(cond | 0x68*B20 | src1.code()*B16 | dst.code()*B12 | |
1797 asr*B7 | B6 | B4 | src2.rm().code()); | 1797 asr*B7 | B6 | B4 | src2.rm().code()); |
1798 } | 1798 } |
1799 | 1799 |
1800 | 1800 |
1801 void Assembler::uxtb(Register dst, | 1801 void Assembler::sxtb(Register dst, Register src, int rotate, Condition cond) { |
1802 const Operand& src, | 1802 // Instruction details available in ARM DDI 0406C.b, A8.8.233. |
1803 Condition cond) { | 1803 // cond(31-28) | 01101010(27-20) | 1111(19-16) | |
| 1804 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
| 1805 DCHECK(!dst.is(pc)); |
| 1806 DCHECK(!src.is(pc)); |
| 1807 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
| 1808 emit(cond | 0x6A * B20 | 0xF * B16 | dst.code() * B12 | |
| 1809 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src.code()); |
| 1810 } |
| 1811 |
| 1812 |
| 1813 void Assembler::sxtab(Register dst, Register src1, Register src2, int rotate, |
| 1814 Condition cond) { |
| 1815 // Instruction details available in ARM DDI 0406C.b, A8.8.233. |
| 1816 // cond(31-28) | 01101010(27-20) | Rn(19-16) | |
| 1817 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
| 1818 DCHECK(!dst.is(pc)); |
| 1819 DCHECK(!src1.is(pc)); |
| 1820 DCHECK(!src2.is(pc)); |
| 1821 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
| 1822 emit(cond | 0x6A * B20 | src1.code() * B16 | dst.code() * B12 | |
| 1823 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src2.code()); |
| 1824 } |
| 1825 |
| 1826 |
| 1827 void Assembler::sxth(Register dst, Register src, int rotate, Condition cond) { |
| 1828 // Instruction details available in ARM DDI 0406C.b, A8.8.235. |
| 1829 // cond(31-28) | 01101011(27-20) | 1111(19-16) | |
| 1830 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
| 1831 DCHECK(!dst.is(pc)); |
| 1832 DCHECK(!src.is(pc)); |
| 1833 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
| 1834 emit(cond | 0x6B * B20 | 0xF * B16 | dst.code() * B12 | |
| 1835 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src.code()); |
| 1836 } |
| 1837 |
| 1838 |
| 1839 void Assembler::sxtah(Register dst, Register src1, Register src2, int rotate, |
| 1840 Condition cond) { |
| 1841 // Instruction details available in ARM DDI 0406C.b, A8.8.235. |
| 1842 // cond(31-28) | 01101011(27-20) | Rn(19-16) | |
| 1843 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
| 1844 DCHECK(!dst.is(pc)); |
| 1845 DCHECK(!src1.is(pc)); |
| 1846 DCHECK(!src2.is(pc)); |
| 1847 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
| 1848 emit(cond | 0x6B * B20 | src1.code() * B16 | dst.code() * B12 | |
| 1849 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src2.code()); |
| 1850 } |
| 1851 |
| 1852 |
| 1853 void Assembler::uxtb(Register dst, Register src, int rotate, Condition cond) { |
1804 // Instruction details available in ARM DDI 0406C.b, A8.8.274. | 1854 // Instruction details available in ARM DDI 0406C.b, A8.8.274. |
1805 // cond(31-28) | 01101110(27-20) | 1111(19-16) | | 1855 // cond(31-28) | 01101110(27-20) | 1111(19-16) | |
1806 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) | 1856 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
1807 DCHECK(!dst.is(pc)); | 1857 DCHECK(!dst.is(pc)); |
1808 DCHECK(!src.rm().is(pc)); | 1858 DCHECK(!src.is(pc)); |
1809 DCHECK(!src.rm().is(no_reg)); | 1859 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
1810 DCHECK(src.rs().is(no_reg)); | 1860 emit(cond | 0x6E * B20 | 0xF * B16 | dst.code() * B12 | |
1811 DCHECK((src.shift_imm_ == 0) || | 1861 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src.code()); |
1812 (src.shift_imm_ == 8) || | |
1813 (src.shift_imm_ == 16) || | |
1814 (src.shift_imm_ == 24)); | |
1815 // Operand maps ROR #0 to LSL #0. | |
1816 DCHECK((src.shift_op() == ROR) || | |
1817 ((src.shift_op() == LSL) && (src.shift_imm_ == 0))); | |
1818 emit(cond | 0x6E*B20 | 0xF*B16 | dst.code()*B12 | | |
1819 ((src.shift_imm_ >> 1)&0xC)*B8 | 7*B4 | src.rm().code()); | |
1820 } | 1862 } |
1821 | 1863 |
1822 | 1864 |
1823 void Assembler::uxtab(Register dst, | 1865 void Assembler::uxtab(Register dst, Register src1, Register src2, int rotate, |
1824 Register src1, | |
1825 const Operand& src2, | |
1826 Condition cond) { | 1866 Condition cond) { |
1827 // Instruction details available in ARM DDI 0406C.b, A8.8.271. | 1867 // Instruction details available in ARM DDI 0406C.b, A8.8.271. |
1828 // cond(31-28) | 01101110(27-20) | Rn(19-16) | | 1868 // cond(31-28) | 01101110(27-20) | Rn(19-16) | |
1829 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) | 1869 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
1830 DCHECK(!dst.is(pc)); | 1870 DCHECK(!dst.is(pc)); |
1831 DCHECK(!src1.is(pc)); | 1871 DCHECK(!src1.is(pc)); |
1832 DCHECK(!src2.rm().is(pc)); | 1872 DCHECK(!src2.is(pc)); |
1833 DCHECK(!src2.rm().is(no_reg)); | 1873 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
1834 DCHECK(src2.rs().is(no_reg)); | 1874 emit(cond | 0x6E * B20 | src1.code() * B16 | dst.code() * B12 | |
1835 DCHECK((src2.shift_imm_ == 0) || | 1875 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src2.code()); |
1836 (src2.shift_imm_ == 8) || | |
1837 (src2.shift_imm_ == 16) || | |
1838 (src2.shift_imm_ == 24)); | |
1839 // Operand maps ROR #0 to LSL #0. | |
1840 DCHECK((src2.shift_op() == ROR) || | |
1841 ((src2.shift_op() == LSL) && (src2.shift_imm_ == 0))); | |
1842 emit(cond | 0x6E*B20 | src1.code()*B16 | dst.code()*B12 | | |
1843 ((src2.shift_imm_ >> 1) &0xC)*B8 | 7*B4 | src2.rm().code()); | |
1844 } | 1876 } |
1845 | 1877 |
1846 | 1878 |
1847 void Assembler::uxtb16(Register dst, | 1879 void Assembler::uxtb16(Register dst, Register src, int rotate, Condition cond) { |
1848 const Operand& src, | |
1849 Condition cond) { | |
1850 // Instruction details available in ARM DDI 0406C.b, A8.8.275. | 1880 // Instruction details available in ARM DDI 0406C.b, A8.8.275. |
1851 // cond(31-28) | 01101100(27-20) | 1111(19-16) | | 1881 // cond(31-28) | 01101100(27-20) | 1111(19-16) | |
1852 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) | 1882 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
1853 DCHECK(!dst.is(pc)); | 1883 DCHECK(!dst.is(pc)); |
1854 DCHECK(!src.rm().is(pc)); | 1884 DCHECK(!src.is(pc)); |
1855 DCHECK(!src.rm().is(no_reg)); | 1885 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
1856 DCHECK(src.rs().is(no_reg)); | 1886 emit(cond | 0x6C * B20 | 0xF * B16 | dst.code() * B12 | |
1857 DCHECK((src.shift_imm_ == 0) || | 1887 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src.code()); |
1858 (src.shift_imm_ == 8) || | |
1859 (src.shift_imm_ == 16) || | |
1860 (src.shift_imm_ == 24)); | |
1861 // Operand maps ROR #0 to LSL #0. | |
1862 DCHECK((src.shift_op() == ROR) || | |
1863 ((src.shift_op() == LSL) && (src.shift_imm_ == 0))); | |
1864 emit(cond | 0x6C*B20 | 0xF*B16 | dst.code()*B12 | | |
1865 ((src.shift_imm_ >> 1)&0xC)*B8 | 7*B4 | src.rm().code()); | |
1866 } | 1888 } |
1867 | 1889 |
1868 | 1890 |
| 1891 void Assembler::uxth(Register dst, Register src, int rotate, Condition cond) { |
| 1892 // Instruction details available in ARM DDI 0406C.b, A8.8.276. |
| 1893 // cond(31-28) | 01101111(27-20) | 1111(19-16) | |
| 1894 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
| 1895 DCHECK(!dst.is(pc)); |
| 1896 DCHECK(!src.is(pc)); |
| 1897 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
| 1898 emit(cond | 0x6F * B20 | 0xF * B16 | dst.code() * B12 | |
| 1899 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src.code()); |
| 1900 } |
| 1901 |
| 1902 |
| 1903 void Assembler::uxtah(Register dst, Register src1, Register src2, int rotate, |
| 1904 Condition cond) { |
| 1905 // Instruction details available in ARM DDI 0406C.b, A8.8.273. |
| 1906 // cond(31-28) | 01101111(27-20) | Rn(19-16) | |
| 1907 // Rd(15-12) | rotate(11-10) | 00(9-8)| 0111(7-4) | Rm(3-0) |
| 1908 DCHECK(!dst.is(pc)); |
| 1909 DCHECK(!src1.is(pc)); |
| 1910 DCHECK(!src2.is(pc)); |
| 1911 DCHECK(rotate == 0 || rotate == 8 || rotate == 16 || rotate == 24); |
| 1912 emit(cond | 0x6F * B20 | src1.code() * B16 | dst.code() * B12 | |
| 1913 ((rotate >> 1) & 0xC) * B8 | 7 * B4 | src2.code()); |
| 1914 } |
| 1915 |
| 1916 |
1869 // Status register access instructions. | 1917 // Status register access instructions. |
1870 void Assembler::mrs(Register dst, SRegister s, Condition cond) { | 1918 void Assembler::mrs(Register dst, SRegister s, Condition cond) { |
1871 DCHECK(!dst.is(pc)); | 1919 DCHECK(!dst.is(pc)); |
1872 emit(cond | B24 | s | 15*B16 | dst.code()*B12); | 1920 emit(cond | B24 | s | 15*B16 | dst.code()*B12); |
1873 } | 1921 } |
1874 | 1922 |
1875 | 1923 |
1876 void Assembler::msr(SRegisterFieldMask fields, const Operand& src, | 1924 void Assembler::msr(SRegisterFieldMask fields, const Operand& src, |
1877 Condition cond) { | 1925 Condition cond) { |
1878 DCHECK(fields >= B16 && fields < B20); // at least one field set | 1926 DCHECK(fields >= B16 && fields < B20); // at least one field set |
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3917 assm->instr_at_put( | 3965 assm->instr_at_put( |
3918 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); | 3966 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); |
3919 } | 3967 } |
3920 } | 3968 } |
3921 } | 3969 } |
3922 | 3970 |
3923 | 3971 |
3924 } } // namespace v8::internal | 3972 } } // namespace v8::internal |
3925 | 3973 |
3926 #endif // V8_TARGET_ARCH_ARM | 3974 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |