Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: src/arm64/macro-assembler-arm64.h

Issue 1990073002: Add {lda,stl}x?r{,b,h} instructions to ARM64 assembler/disassembler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: typo Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/instrument-arm64.cc ('k') | src/arm64/macro-assembler-arm64-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) \
72 V(Ldarb, ldarb) \
73 V(Ldarh, ldarh) \
74 V(Ldar, ldar) \
75 V(Ldaxrb, ldaxrb) \
76 V(Ldaxrh, ldaxrh) \
77 V(Ldaxr, ldaxr) \
78 V(Stlrb, stlrb) \
79 V(Stlrh, stlrh) \
80 V(Stlr, stlr)
81
82 #define STLX_MACRO_LIST(V) \
83 V(Stlxrb, stlxrb) \
84 V(Stlxrh, stlxrh) \
85 V(Stlxr, stlxr)
71 86
72 // ---------------------------------------------------------------------------- 87 // ----------------------------------------------------------------------------
73 // Static helper functions 88 // Static helper functions
74 89
75 // Generate a MemOperand for loading a field from an object. 90 // Generate a MemOperand for loading a field from an object.
76 inline MemOperand FieldMemOperand(Register object, int offset); 91 inline MemOperand FieldMemOperand(Register object, int offset);
77 inline MemOperand UntagSmiFieldMemOperand(Register object, int offset); 92 inline MemOperand UntagSmiFieldMemOperand(Register object, int offset);
78 93
79 // Generate a MemOperand for loading a SMI from memory. 94 // Generate a MemOperand for loading a SMI from memory.
80 inline MemOperand UntagSmiMemOperand(Register object, int offset); 95 inline MemOperand UntagSmiMemOperand(Register object, int offset);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 LoadStoreOp op); 303 LoadStoreOp op);
289 304
290 #define DECLARE_FUNCTION(FN, REGTYPE, REG, REG2, OP) \ 305 #define DECLARE_FUNCTION(FN, REGTYPE, REG, REG2, OP) \
291 inline void FN(const REGTYPE REG, const REGTYPE REG2, const MemOperand& addr); 306 inline void FN(const REGTYPE REG, const REGTYPE REG2, const MemOperand& addr);
292 LSPAIR_MACRO_LIST(DECLARE_FUNCTION) 307 LSPAIR_MACRO_LIST(DECLARE_FUNCTION)
293 #undef DECLARE_FUNCTION 308 #undef DECLARE_FUNCTION
294 309
295 void LoadStorePairMacro(const CPURegister& rt, const CPURegister& rt2, 310 void LoadStorePairMacro(const CPURegister& rt, const CPURegister& rt2,
296 const MemOperand& addr, LoadStorePairOp op); 311 const MemOperand& addr, LoadStorePairOp op);
297 312
313 // Load-acquire/store-release macros.
314 #define DECLARE_FUNCTION(FN, OP) \
315 inline void FN(const Register& rt, const Register& rn);
316 LDA_STL_MACRO_LIST(DECLARE_FUNCTION)
317 #undef DECLARE_FUNCTION
318
319 #define DECLARE_FUNCTION(FN, OP) \
320 inline void FN(const Register& rs, const Register& rt, const Register& rn);
321 STLX_MACRO_LIST(DECLARE_FUNCTION)
322 #undef DECLARE_FUNCTION
323
298 // V8-specific load/store helpers. 324 // V8-specific load/store helpers.
299 void Load(const Register& rt, const MemOperand& addr, Representation r); 325 void Load(const Register& rt, const MemOperand& addr, Representation r);
300 void Store(const Register& rt, const MemOperand& addr, Representation r); 326 void Store(const Register& rt, const MemOperand& addr, Representation r);
301 327
302 enum AdrHint { 328 enum AdrHint {
303 // The target must be within the immediate range of adr. 329 // The target must be within the immediate range of adr.
304 kAdrNear, 330 kAdrNear,
305 // The target may be outside of the immediate range of adr. Additional 331 // The target may be outside of the immediate range of adr. Additional
306 // instructions may be emitted. 332 // instructions may be emitted.
307 kAdrFar 333 kAdrFar
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 #error "Unsupported option" 2312 #error "Unsupported option"
2287 #define CODE_COVERAGE_STRINGIFY(x) #x 2313 #define CODE_COVERAGE_STRINGIFY(x) #x
2288 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2314 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2289 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2315 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2290 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2316 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2291 #else 2317 #else
2292 #define ACCESS_MASM(masm) masm-> 2318 #define ACCESS_MASM(masm) masm->
2293 #endif 2319 #endif
2294 2320
2295 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 2321 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm64/instrument-arm64.cc ('k') | src/arm64/macro-assembler-arm64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698