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

Side by Side Diff: src/x64/assembler-x64.cc

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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/utils.h ('k') | src/x64/codegen-x64.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 // Patch the code at the current PC with a call to the target address. 48 // Patch the code at the current PC with a call to the target address.
49 // Additional guard int3 instructions can be added if required. 49 // Additional guard int3 instructions can be added if required.
50 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { 50 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) {
51 int code_size = Assembler::kCallSequenceLength + guard_bytes; 51 int code_size = Assembler::kCallSequenceLength + guard_bytes;
52 52
53 // Create a code patcher. 53 // Create a code patcher.
54 CodePatcher patcher(pc_, code_size); 54 CodePatcher patcher(pc_, code_size);
55 55
56 // Add a label for checking the size of the code used for returning. 56 // Add a label for checking the size of the code used for returning.
57 #ifdef DEBUG 57 #if DCHECK_IS_ON
58 Label check_codesize; 58 Label check_codesize;
59 patcher.masm()->bind(&check_codesize); 59 patcher.masm()->bind(&check_codesize);
60 #endif 60 #endif
61 61
62 // Patch the code. 62 // Patch the code.
63 patcher.masm()->movp(kScratchRegister, reinterpret_cast<void*>(target), 63 patcher.masm()->movp(kScratchRegister, reinterpret_cast<void*>(target),
64 Assembler::RelocInfoNone()); 64 Assembler::RelocInfoNone());
65 patcher.masm()->call(kScratchRegister); 65 patcher.masm()->call(kScratchRegister);
66 66
67 // Check that the size of the code generated is as expected. 67 // Check that the size of the code generated is as expected.
(...skipping 3282 matching lines...) Expand 10 before | Expand all | Expand 10 after
3350 3350
3351 3351
3352 bool RelocInfo::IsInConstantPool() { 3352 bool RelocInfo::IsInConstantPool() {
3353 return false; 3353 return false;
3354 } 3354 }
3355 3355
3356 3356
3357 } } // namespace v8::internal 3357 } } // namespace v8::internal
3358 3358
3359 #endif // V8_TARGET_ARCH_X64 3359 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/utils.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698