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_MACRO_ASSEMBLER_ARM64_H_ | 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "src/arm64/assembler-arm64.h" | 10 #include "src/arm64/assembler-arm64.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 V(Ldrsh, Register&, rt, rt.Is64Bits() ? LDRSH_x : LDRSH_w) \ | 61 V(Ldrsh, Register&, rt, rt.Is64Bits() ? LDRSH_x : LDRSH_w) \ |
62 V(Ldr, CPURegister&, rt, LoadOpFor(rt)) \ | 62 V(Ldr, CPURegister&, rt, LoadOpFor(rt)) \ |
63 V(Str, CPURegister&, rt, StoreOpFor(rt)) \ | 63 V(Str, CPURegister&, rt, StoreOpFor(rt)) \ |
64 V(Ldrsw, Register&, rt, LDRSW_x) | 64 V(Ldrsw, Register&, rt, LDRSW_x) |
65 | 65 |
66 #define LSPAIR_MACRO_LIST(V) \ | 66 #define LSPAIR_MACRO_LIST(V) \ |
67 V(Ldp, CPURegister&, rt, rt2, LoadPairOpFor(rt, rt2)) \ | 67 V(Ldp, CPURegister&, rt, rt2, LoadPairOpFor(rt, rt2)) \ |
68 V(Stp, CPURegister&, rt, rt2, StorePairOpFor(rt, rt2)) \ | 68 V(Stp, CPURegister&, rt, rt2, StorePairOpFor(rt, rt2)) \ |
69 V(Ldpsw, CPURegister&, rt, rt2, LDPSW_x) | 69 V(Ldpsw, CPURegister&, rt, rt2, LDPSW_x) |
70 | 70 |
71 #define LDA_STL_MACRO_LIST(V) \ | 71 #define LDX_LDA_STL_MACRO_LIST(V) \ |
72 V(Ldarb, ldarb) \ | 72 V(Ldxrb, ldxrb) \ |
73 V(Ldarh, ldarh) \ | 73 V(Ldxrh, ldxrh) \ |
74 V(Ldar, ldar) \ | 74 V(Ldxr, ldxr) \ |
75 V(Ldaxrb, ldaxrb) \ | 75 V(Ldarb, ldarb) \ |
76 V(Ldaxrh, ldaxrh) \ | 76 V(Ldarh, ldarh) \ |
77 V(Ldaxr, ldaxr) \ | 77 V(Ldar, ldar) \ |
78 V(Stlrb, stlrb) \ | 78 V(Ldaxrb, ldaxrb) \ |
79 V(Stlrh, stlrh) \ | 79 V(Ldaxrh, ldaxrh) \ |
| 80 V(Ldaxr, ldaxr) \ |
| 81 V(Stlrb, stlrb) \ |
| 82 V(Stlrh, stlrh) \ |
80 V(Stlr, stlr) | 83 V(Stlr, stlr) |
81 | 84 |
82 #define STLX_MACRO_LIST(V) \ | 85 #define STX_STLX_MACRO_LIST(V) \ |
83 V(Stlxrb, stlxrb) \ | 86 V(Stxrb, stxrb) \ |
84 V(Stlxrh, stlxrh) \ | 87 V(Stxrh, stxrh) \ |
| 88 V(Stxr, stxr) \ |
| 89 V(Stlxrb, stlxrb) \ |
| 90 V(Stlxrh, stlxrh) \ |
85 V(Stlxr, stlxr) | 91 V(Stlxr, stlxr) |
86 | 92 |
87 // ---------------------------------------------------------------------------- | 93 // ---------------------------------------------------------------------------- |
88 // Static helper functions | 94 // Static helper functions |
89 | 95 |
90 // Generate a MemOperand for loading a field from an object. | 96 // Generate a MemOperand for loading a field from an object. |
91 inline MemOperand FieldMemOperand(Register object, int offset); | 97 inline MemOperand FieldMemOperand(Register object, int offset); |
92 inline MemOperand UntagSmiFieldMemOperand(Register object, int offset); | 98 inline MemOperand UntagSmiFieldMemOperand(Register object, int offset); |
93 | 99 |
94 // Generate a MemOperand for loading a SMI from memory. | 100 // Generate a MemOperand for loading a SMI from memory. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 LoadStoreOp op); | 312 LoadStoreOp op); |
307 | 313 |
308 #define DECLARE_FUNCTION(FN, REGTYPE, REG, REG2, OP) \ | 314 #define DECLARE_FUNCTION(FN, REGTYPE, REG, REG2, OP) \ |
309 inline void FN(const REGTYPE REG, const REGTYPE REG2, const MemOperand& addr); | 315 inline void FN(const REGTYPE REG, const REGTYPE REG2, const MemOperand& addr); |
310 LSPAIR_MACRO_LIST(DECLARE_FUNCTION) | 316 LSPAIR_MACRO_LIST(DECLARE_FUNCTION) |
311 #undef DECLARE_FUNCTION | 317 #undef DECLARE_FUNCTION |
312 | 318 |
313 void LoadStorePairMacro(const CPURegister& rt, const CPURegister& rt2, | 319 void LoadStorePairMacro(const CPURegister& rt, const CPURegister& rt2, |
314 const MemOperand& addr, LoadStorePairOp op); | 320 const MemOperand& addr, LoadStorePairOp op); |
315 | 321 |
316 // Load-acquire/store-release macros. | 322 // Load/store exclusive and load-acquire/store-release macros. |
317 #define DECLARE_FUNCTION(FN, OP) \ | 323 #define DECLARE_FUNCTION(FN, OP) \ |
318 inline void FN(const Register& rt, const Register& rn); | 324 inline void FN(const Register& rt, const Register& rn); |
319 LDA_STL_MACRO_LIST(DECLARE_FUNCTION) | 325 LDX_LDA_STL_MACRO_LIST(DECLARE_FUNCTION) |
320 #undef DECLARE_FUNCTION | 326 #undef DECLARE_FUNCTION |
321 | 327 |
322 #define DECLARE_FUNCTION(FN, OP) \ | 328 #define DECLARE_FUNCTION(FN, OP) \ |
323 inline void FN(const Register& rs, const Register& rt, const Register& rn); | 329 inline void FN(const Register& rs, const Register& rt, const Register& rn); |
324 STLX_MACRO_LIST(DECLARE_FUNCTION) | 330 STX_STLX_MACRO_LIST(DECLARE_FUNCTION) |
325 #undef DECLARE_FUNCTION | 331 #undef DECLARE_FUNCTION |
326 | 332 |
327 // V8-specific load/store helpers. | 333 // V8-specific load/store helpers. |
328 void Load(const Register& rt, const MemOperand& addr, Representation r); | 334 void Load(const Register& rt, const MemOperand& addr, Representation r); |
329 void Store(const Register& rt, const MemOperand& addr, Representation r); | 335 void Store(const Register& rt, const MemOperand& addr, Representation r); |
330 | 336 |
331 enum AdrHint { | 337 enum AdrHint { |
332 // The target must be within the immediate range of adr. | 338 // The target must be within the immediate range of adr. |
333 kAdrNear, | 339 kAdrNear, |
334 // The target may be outside of the immediate range of adr. Additional | 340 // The target may be outside of the immediate range of adr. Additional |
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 class RegisterBits : public BitField<unsigned, 0, 5> {}; | 2156 class RegisterBits : public BitField<unsigned, 0, 5> {}; |
2151 class DeltaBits : public BitField<uint32_t, 5, 32-5> {}; | 2157 class DeltaBits : public BitField<uint32_t, 5, 32-5> {}; |
2152 }; | 2158 }; |
2153 | 2159 |
2154 } // namespace internal | 2160 } // namespace internal |
2155 } // namespace v8 | 2161 } // namespace v8 |
2156 | 2162 |
2157 #define ACCESS_MASM(masm) masm-> | 2163 #define ACCESS_MASM(masm) masm-> |
2158 | 2164 |
2159 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2165 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |