OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_ | 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_ |
6 #define V8_ARM64_ASSEMBLER_ARM64_H_ | 6 #define V8_ARM64_ASSEMBLER_ARM64_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 inline static Instr ImmRotate(unsigned immr, unsigned reg_size); | 1741 inline static Instr ImmRotate(unsigned immr, unsigned reg_size); |
1742 inline static Instr ImmLLiteral(int imm19); | 1742 inline static Instr ImmLLiteral(int imm19); |
1743 inline static Instr BitN(unsigned bitn, unsigned reg_size); | 1743 inline static Instr BitN(unsigned bitn, unsigned reg_size); |
1744 inline static Instr ShiftDP(Shift shift); | 1744 inline static Instr ShiftDP(Shift shift); |
1745 inline static Instr ImmDPShift(unsigned amount); | 1745 inline static Instr ImmDPShift(unsigned amount); |
1746 inline static Instr ExtendMode(Extend extend); | 1746 inline static Instr ExtendMode(Extend extend); |
1747 inline static Instr ImmExtendShift(unsigned left_shift); | 1747 inline static Instr ImmExtendShift(unsigned left_shift); |
1748 inline static Instr ImmCondCmp(unsigned imm); | 1748 inline static Instr ImmCondCmp(unsigned imm); |
1749 inline static Instr Nzcv(StatusFlags nzcv); | 1749 inline static Instr Nzcv(StatusFlags nzcv); |
1750 | 1750 |
| 1751 static bool IsImmAddSub(int64_t immediate); |
| 1752 static bool IsImmLogical(uint64_t value, |
| 1753 unsigned width, |
| 1754 unsigned* n, |
| 1755 unsigned* imm_s, |
| 1756 unsigned* imm_r); |
| 1757 |
1751 // MemOperand offset encoding. | 1758 // MemOperand offset encoding. |
1752 inline static Instr ImmLSUnsigned(int imm12); | 1759 inline static Instr ImmLSUnsigned(int imm12); |
1753 inline static Instr ImmLS(int imm9); | 1760 inline static Instr ImmLS(int imm9); |
1754 inline static Instr ImmLSPair(int imm7, LSDataSize size); | 1761 inline static Instr ImmLSPair(int imm7, LSDataSize size); |
1755 inline static Instr ImmShiftLS(unsigned shift_amount); | 1762 inline static Instr ImmShiftLS(unsigned shift_amount); |
1756 inline static Instr ImmException(int imm16); | 1763 inline static Instr ImmException(int imm16); |
1757 inline static Instr ImmSystemRegister(int imm15); | 1764 inline static Instr ImmSystemRegister(int imm15); |
1758 inline static Instr ImmHint(int imm7); | 1765 inline static Instr ImmHint(int imm7); |
1759 inline static Instr ImmBarrierDomain(int imm2); | 1766 inline static Instr ImmBarrierDomain(int imm2); |
1760 inline static Instr ImmBarrierType(int imm2); | 1767 inline static Instr ImmBarrierType(int imm2); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1854 void Logical(const Register& rd, | 1861 void Logical(const Register& rd, |
1855 const Register& rn, | 1862 const Register& rn, |
1856 const Operand& operand, | 1863 const Operand& operand, |
1857 LogicalOp op); | 1864 LogicalOp op); |
1858 void LogicalImmediate(const Register& rd, | 1865 void LogicalImmediate(const Register& rd, |
1859 const Register& rn, | 1866 const Register& rn, |
1860 unsigned n, | 1867 unsigned n, |
1861 unsigned imm_s, | 1868 unsigned imm_s, |
1862 unsigned imm_r, | 1869 unsigned imm_r, |
1863 LogicalOp op); | 1870 LogicalOp op); |
1864 static bool IsImmLogical(uint64_t value, | |
1865 unsigned width, | |
1866 unsigned* n, | |
1867 unsigned* imm_s, | |
1868 unsigned* imm_r); | |
1869 | 1871 |
1870 void ConditionalCompare(const Register& rn, | 1872 void ConditionalCompare(const Register& rn, |
1871 const Operand& operand, | 1873 const Operand& operand, |
1872 StatusFlags nzcv, | 1874 StatusFlags nzcv, |
1873 Condition cond, | 1875 Condition cond, |
1874 ConditionalCompareOp op); | 1876 ConditionalCompareOp op); |
1875 static bool IsImmConditionalCompare(int64_t immediate); | 1877 static bool IsImmConditionalCompare(int64_t immediate); |
1876 | 1878 |
1877 void AddSubWithCarry(const Register& rd, | 1879 void AddSubWithCarry(const Register& rd, |
1878 const Register& rn, | 1880 const Register& rn, |
(...skipping 10 matching lines...) Expand all Loading... |
1889 void EmitExtendShift(const Register& rd, | 1891 void EmitExtendShift(const Register& rd, |
1890 const Register& rn, | 1892 const Register& rn, |
1891 Extend extend, | 1893 Extend extend, |
1892 unsigned left_shift); | 1894 unsigned left_shift); |
1893 | 1895 |
1894 void AddSub(const Register& rd, | 1896 void AddSub(const Register& rd, |
1895 const Register& rn, | 1897 const Register& rn, |
1896 const Operand& operand, | 1898 const Operand& operand, |
1897 FlagsUpdate S, | 1899 FlagsUpdate S, |
1898 AddSubOp op); | 1900 AddSubOp op); |
1899 static bool IsImmAddSub(int64_t immediate); | |
1900 | 1901 |
1901 static bool IsImmFP32(float imm); | 1902 static bool IsImmFP32(float imm); |
1902 static bool IsImmFP64(double imm); | 1903 static bool IsImmFP64(double imm); |
1903 | 1904 |
1904 // Find an appropriate LoadStoreOp or LoadStorePairOp for the specified | 1905 // Find an appropriate LoadStoreOp or LoadStorePairOp for the specified |
1905 // registers. Only simple loads are supported; sign- and zero-extension (such | 1906 // registers. Only simple loads are supported; sign- and zero-extension (such |
1906 // as in LDPSW_x or LDRB_w) are not supported. | 1907 // as in LDPSW_x or LDRB_w) are not supported. |
1907 static inline LoadStoreOp LoadOpFor(const CPURegister& rt); | 1908 static inline LoadStoreOp LoadOpFor(const CPURegister& rt); |
1908 static inline LoadStorePairOp LoadPairOpFor(const CPURegister& rt, | 1909 static inline LoadStorePairOp LoadPairOpFor(const CPURegister& rt, |
1909 const CPURegister& rt2); | 1910 const CPURegister& rt2); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2225 class EnsureSpace BASE_EMBEDDED { | 2226 class EnsureSpace BASE_EMBEDDED { |
2226 public: | 2227 public: |
2227 explicit EnsureSpace(Assembler* assembler) { | 2228 explicit EnsureSpace(Assembler* assembler) { |
2228 assembler->CheckBufferSpace(); | 2229 assembler->CheckBufferSpace(); |
2229 } | 2230 } |
2230 }; | 2231 }; |
2231 | 2232 |
2232 } } // namespace v8::internal | 2233 } } // namespace v8::internal |
2233 | 2234 |
2234 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2235 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
OLD | NEW |