| 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_INSTRUCTIONS_ARM64_H_ | 5 #ifndef V8_ARM64_INSTRUCTIONS_ARM64_H_ |
| 6 #define V8_ARM64_INSTRUCTIONS_ARM64_H_ | 6 #define V8_ARM64_INSTRUCTIONS_ARM64_H_ |
| 7 | 7 |
| 8 #include "src/arm64/constants-arm64.h" | 8 #include "src/arm64/constants-arm64.h" |
| 9 #include "src/arm64/utils-arm64.h" | 9 #include "src/arm64/utils-arm64.h" |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 Instruction* ImmPCOffsetTarget(); | 345 Instruction* ImmPCOffsetTarget(); |
| 346 | 346 |
| 347 static bool IsValidImmPCOffset(ImmBranchType branch_type, int32_t offset); | 347 static bool IsValidImmPCOffset(ImmBranchType branch_type, int32_t offset); |
| 348 bool IsTargetInImmPCOffsetRange(Instruction* target); | 348 bool IsTargetInImmPCOffsetRange(Instruction* target); |
| 349 // Patch a PC-relative offset to refer to 'target'. 'this' may be a branch or | 349 // Patch a PC-relative offset to refer to 'target'. 'this' may be a branch or |
| 350 // a PC-relative addressing instruction. | 350 // a PC-relative addressing instruction. |
| 351 void SetImmPCOffsetTarget(Instruction* target); | 351 void SetImmPCOffsetTarget(Instruction* target); |
| 352 // Patch a literal load instruction to load from 'source'. | 352 // Patch a literal load instruction to load from 'source'. |
| 353 void SetImmLLiteral(Instruction* source); | 353 void SetImmLLiteral(Instruction* source); |
| 354 | 354 |
| 355 uint8_t* LiteralAddress() { | 355 uintptr_t LiteralAddress() { |
| 356 int offset = ImmLLiteral() << kLoadLiteralScaleLog2; | 356 int offset = ImmLLiteral() << kLoadLiteralScaleLog2; |
| 357 return reinterpret_cast<uint8_t*>(this) + offset; | 357 return reinterpret_cast<uintptr_t>(this) + offset; |
| 358 } | 358 } |
| 359 | 359 |
| 360 enum CheckAlignment { NO_CHECK, CHECK_ALIGNMENT }; | 360 enum CheckAlignment { NO_CHECK, CHECK_ALIGNMENT }; |
| 361 | 361 |
| 362 V8_INLINE Instruction* InstructionAtOffset( | 362 V8_INLINE Instruction* InstructionAtOffset( |
| 363 int64_t offset, | 363 int64_t offset, |
| 364 CheckAlignment check = CHECK_ALIGNMENT) { | 364 CheckAlignment check = CHECK_ALIGNMENT) { |
| 365 Address addr = reinterpret_cast<Address>(this) + offset; | 365 Address addr = reinterpret_cast<Address>(this) + offset; |
| 366 // The FUZZ_disasm test relies on no check being done. | 366 // The FUZZ_disasm test relies on no check being done. |
| 367 DCHECK(check == NO_CHECK || IsAddressAligned(addr, kInstructionSize)); | 367 DCHECK(check == NO_CHECK || IsAddressAligned(addr, kInstructionSize)); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 TRACE_ENABLE = 1 << 6, | 500 TRACE_ENABLE = 1 << 6, |
| 501 TRACE_DISABLE = 2 << 6, | 501 TRACE_DISABLE = 2 << 6, |
| 502 TRACE_OVERRIDE = 3 << 6 | 502 TRACE_OVERRIDE = 3 << 6 |
| 503 }; | 503 }; |
| 504 | 504 |
| 505 | 505 |
| 506 } } // namespace v8::internal | 506 } } // namespace v8::internal |
| 507 | 507 |
| 508 | 508 |
| 509 #endif // V8_ARM64_INSTRUCTIONS_ARM64_H_ | 509 #endif // V8_ARM64_INSTRUCTIONS_ARM64_H_ |
| OLD | NEW |