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_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 Loading... |
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 Loading... |
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_ |
OLD | NEW |