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

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

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 years, 10 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/x64/full-codegen-x64.cc ('k') | src/x87/full-codegen-x87.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/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2191 DCHECK(!src1.is(kScratchRegister)); 2191 DCHECK(!src1.is(kScratchRegister));
2192 DCHECK(!src2.is(kScratchRegister)); 2192 DCHECK(!src2.is(kScratchRegister));
2193 DCHECK(!dst.is(src1)); 2193 DCHECK(!dst.is(src1));
2194 DCHECK(!dst.is(src2)); 2194 DCHECK(!dst.is(src2));
2195 // Both operands must not be smis. 2195 // Both operands must not be smis.
2196 #ifdef DEBUG 2196 #ifdef DEBUG
2197 Condition not_both_smis = NegateCondition(CheckBothSmi(src1, src2)); 2197 Condition not_both_smis = NegateCondition(CheckBothSmi(src1, src2));
2198 Check(not_both_smis, kBothRegistersWereSmisInSelectNonSmi); 2198 Check(not_both_smis, kBothRegistersWereSmisInSelectNonSmi);
2199 #endif 2199 #endif
2200 STATIC_ASSERT(kSmiTag == 0); 2200 STATIC_ASSERT(kSmiTag == 0);
2201 DCHECK_EQ(0, Smi::FromInt(0)); 2201 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
2202 movl(kScratchRegister, Immediate(kSmiTagMask)); 2202 movl(kScratchRegister, Immediate(kSmiTagMask));
2203 andp(kScratchRegister, src1); 2203 andp(kScratchRegister, src1);
2204 testl(kScratchRegister, src2); 2204 testl(kScratchRegister, src2);
2205 // If non-zero then both are smis. 2205 // If non-zero then both are smis.
2206 j(not_zero, on_not_smis, near_jump); 2206 j(not_zero, on_not_smis, near_jump);
2207 2207
2208 // Exactly one operand is a smi. 2208 // Exactly one operand is a smi.
2209 DCHECK_EQ(1, static_cast<int>(kSmiTagMask)); 2209 DCHECK_EQ(1, static_cast<int>(kSmiTagMask));
2210 // kScratchRegister still holds src1 & kSmiTag, which is either zero or one. 2210 // kScratchRegister still holds src1 & kSmiTag, which is either zero or one.
2211 subp(kScratchRegister, Immediate(1)); 2211 subp(kScratchRegister, Immediate(1));
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after
5191 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5191 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5192 movl(rax, dividend); 5192 movl(rax, dividend);
5193 shrl(rax, Immediate(31)); 5193 shrl(rax, Immediate(31));
5194 addl(rdx, rax); 5194 addl(rdx, rax);
5195 } 5195 }
5196 5196
5197 5197
5198 } } // namespace v8::internal 5198 } } // namespace v8::internal
5199 5199
5200 #endif // V8_TARGET_ARCH_X64 5200 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698