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 <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 | 1394 |
1395 // Load word pair with sign extension. | 1395 // Load word pair with sign extension. |
1396 void ldpsw(const Register& rt, const Register& rt2, const MemOperand& src); | 1396 void ldpsw(const Register& rt, const Register& rt2, const MemOperand& src); |
1397 | 1397 |
1398 // Load literal to register from a pc relative address. | 1398 // Load literal to register from a pc relative address. |
1399 void ldr_pcrel(const CPURegister& rt, int imm19); | 1399 void ldr_pcrel(const CPURegister& rt, int imm19); |
1400 | 1400 |
1401 // Load literal to register. | 1401 // Load literal to register. |
1402 void ldr(const CPURegister& rt, const Immediate& imm); | 1402 void ldr(const CPURegister& rt, const Immediate& imm); |
1403 | 1403 |
| 1404 // Load-acquire word. |
| 1405 void ldar(const Register& rt, const Register& rn); |
| 1406 |
| 1407 // Load-acquire exclusive word. |
| 1408 void ldaxr(const Register& rt, const Register& rn); |
| 1409 |
| 1410 // Store-release word. |
| 1411 void stlr(const Register& rt, const Register& rn); |
| 1412 |
| 1413 // Store-release exclusive word. |
| 1414 void stlxr(const Register& rs, const Register& rt, const Register& rn); |
| 1415 |
| 1416 // Load-acquire byte. |
| 1417 void ldarb(const Register& rt, const Register& rn); |
| 1418 |
| 1419 // Load-acquire exclusive byte. |
| 1420 void ldaxrb(const Register& rt, const Register& rn); |
| 1421 |
| 1422 // Store-release byte. |
| 1423 void stlrb(const Register& rt, const Register& rn); |
| 1424 |
| 1425 // Store-release exclusive byte. |
| 1426 void stlxrb(const Register& rs, const Register& rt, const Register& rn); |
| 1427 |
| 1428 // Load-acquire half-word. |
| 1429 void ldarh(const Register& rt, const Register& rn); |
| 1430 |
| 1431 // Load-acquire exclusive half-word. |
| 1432 void ldaxrh(const Register& rt, const Register& rn); |
| 1433 |
| 1434 // Store-release half-word. |
| 1435 void stlrh(const Register& rt, const Register& rn); |
| 1436 |
| 1437 // Store-release exclusive half-word. |
| 1438 void stlxrh(const Register& rs, const Register& rt, const Register& rn); |
| 1439 |
1404 // Move instructions. The default shift of -1 indicates that the move | 1440 // Move instructions. The default shift of -1 indicates that the move |
1405 // instruction will calculate an appropriate 16-bit immediate and left shift | 1441 // instruction will calculate an appropriate 16-bit immediate and left shift |
1406 // that is equal to the 64-bit immediate argument. If an explicit left shift | 1442 // that is equal to the 64-bit immediate argument. If an explicit left shift |
1407 // is specified (0, 16, 32 or 48), the immediate must be a 16-bit value. | 1443 // is specified (0, 16, 32 or 48), the immediate must be a 16-bit value. |
1408 // | 1444 // |
1409 // For movk, an explicit shift can be used to indicate which half word should | 1445 // For movk, an explicit shift can be used to indicate which half word should |
1410 // be overwritten, eg. movk(x0, 0, 0) will overwrite the least-significant | 1446 // be overwritten, eg. movk(x0, 0, 0) will overwrite the least-significant |
1411 // half word with zero, whereas movk(x0, 0, 48) will overwrite the | 1447 // half word with zero, whereas movk(x0, 0, 48) will overwrite the |
1412 // most-significant. | 1448 // most-significant. |
1413 | 1449 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 static Instr Rt(CPURegister rt) { | 1724 static Instr Rt(CPURegister rt) { |
1689 DCHECK(rt.code() != kSPRegInternalCode); | 1725 DCHECK(rt.code() != kSPRegInternalCode); |
1690 return rt.code() << Rt_offset; | 1726 return rt.code() << Rt_offset; |
1691 } | 1727 } |
1692 | 1728 |
1693 static Instr Rt2(CPURegister rt2) { | 1729 static Instr Rt2(CPURegister rt2) { |
1694 DCHECK(rt2.code() != kSPRegInternalCode); | 1730 DCHECK(rt2.code() != kSPRegInternalCode); |
1695 return rt2.code() << Rt2_offset; | 1731 return rt2.code() << Rt2_offset; |
1696 } | 1732 } |
1697 | 1733 |
| 1734 static Instr Rs(CPURegister rs) { |
| 1735 DCHECK(rs.code() != kSPRegInternalCode); |
| 1736 return rs.code() << Rs_offset; |
| 1737 } |
| 1738 |
1698 // These encoding functions allow the stack pointer to be encoded, and | 1739 // These encoding functions allow the stack pointer to be encoded, and |
1699 // disallow the zero register. | 1740 // disallow the zero register. |
1700 static Instr RdSP(Register rd) { | 1741 static Instr RdSP(Register rd) { |
1701 DCHECK(!rd.IsZero()); | 1742 DCHECK(!rd.IsZero()); |
1702 return (rd.code() & kRegCodeMask) << Rd_offset; | 1743 return (rd.code() & kRegCodeMask) << Rd_offset; |
1703 } | 1744 } |
1704 | 1745 |
1705 static Instr RnSP(Register rn) { | 1746 static Instr RnSP(Register rn) { |
1706 DCHECK(!rn.IsZero()); | 1747 DCHECK(!rn.IsZero()); |
1707 return (rn.code() & kRegCodeMask) << Rn_offset; | 1748 return (rn.code() & kRegCodeMask) << Rn_offset; |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 public: | 2236 public: |
2196 explicit EnsureSpace(Assembler* assembler) { | 2237 explicit EnsureSpace(Assembler* assembler) { |
2197 assembler->CheckBufferSpace(); | 2238 assembler->CheckBufferSpace(); |
2198 } | 2239 } |
2199 }; | 2240 }; |
2200 | 2241 |
2201 } // namespace internal | 2242 } // namespace internal |
2202 } // namespace v8 | 2243 } // namespace v8 |
2203 | 2244 |
2204 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2245 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
OLD | NEW |