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

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

Issue 378503003: ARM64: Use UntagSmi helpers and clean up assertions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Replace one '32' with 'kWRegSizeInBits'. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.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 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_ASSEMBLER_ARM64_INL_H_ 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_INL_H_
6 #define V8_ARM64_ASSEMBLER_ARM64_INL_H_ 6 #define V8_ARM64_ASSEMBLER_ARM64_INL_H_
7 7
8 #include "src/arm64/assembler-arm64.h" 8 #include "src/arm64/assembler-arm64.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 424
425 425
426 unsigned Operand::shift_amount() const { 426 unsigned Operand::shift_amount() const {
427 ASSERT(IsShiftedRegister() || IsExtendedRegister()); 427 ASSERT(IsShiftedRegister() || IsExtendedRegister());
428 return shift_amount_; 428 return shift_amount_;
429 } 429 }
430 430
431 431
432 Operand Operand::UntagSmi(Register smi) { 432 Operand Operand::UntagSmi(Register smi) {
433 STATIC_ASSERT((kSmiShift + kSmiValueSize) == kXRegSizeInBits);
433 ASSERT(smi.Is64Bits()); 434 ASSERT(smi.Is64Bits());
434 return Operand(smi, ASR, kSmiShift); 435 return Operand(smi, ASR, kSmiShift);
435 } 436 }
436 437
437 438
438 Operand Operand::UntagSmiAndScale(Register smi, int scale) { 439 Operand Operand::UntagSmiAndScale(Register smi, int scale) {
440 STATIC_ASSERT((kSmiShift + kSmiValueSize) == kXRegSizeInBits);
439 ASSERT(smi.Is64Bits()); 441 ASSERT(smi.Is64Bits());
440 ASSERT((scale >= 0) && (scale <= (64 - kSmiValueSize))); 442 ASSERT((scale >= 0) && (scale <= (64 - kSmiValueSize)));
441 if (scale > kSmiShift) { 443 if (scale > kSmiShift) {
442 return Operand(smi, LSL, scale - kSmiShift); 444 return Operand(smi, LSL, scale - kSmiShift);
443 } else if (scale < kSmiShift) { 445 } else if (scale < kSmiShift) {
444 return Operand(smi, ASR, kSmiShift - scale); 446 return Operand(smi, ASR, kSmiShift - scale);
445 } 447 }
446 return Operand(smi); 448 return Operand(smi);
447 } 449 }
448 450
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 1257
1256 1258
1257 void Assembler::ClearRecordedAstId() { 1259 void Assembler::ClearRecordedAstId() {
1258 recorded_ast_id_ = TypeFeedbackId::None(); 1260 recorded_ast_id_ = TypeFeedbackId::None();
1259 } 1261 }
1260 1262
1261 1263
1262 } } // namespace v8::internal 1264 } } // namespace v8::internal
1263 1265
1264 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ 1266 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698