| OLD | NEW |
| 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 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/frames.h" | 10 #include "src/frames.h" |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 test(value, Immediate(kSmiTagMask)); | 504 test(value, Immediate(kSmiTagMask)); |
| 505 j(zero, smi_label, distance); | 505 j(zero, smi_label, distance); |
| 506 } | 506 } |
| 507 // Jump if register contain a non-smi. | 507 // Jump if register contain a non-smi. |
| 508 inline void JumpIfNotSmi(Register value, Label* not_smi_label, | 508 inline void JumpIfNotSmi(Register value, Label* not_smi_label, |
| 509 Label::Distance distance = Label::kFar) { | 509 Label::Distance distance = Label::kFar) { |
| 510 test(value, Immediate(kSmiTagMask)); | 510 test(value, Immediate(kSmiTagMask)); |
| 511 j(not_zero, not_smi_label, distance); | 511 j(not_zero, not_smi_label, distance); |
| 512 } | 512 } |
| 513 | 513 |
| 514 // Jump if the value cannot be represented by a smi. | |
| 515 inline void JumpIfNotValidSmiValue(Register value, Register scratch, | |
| 516 Label* on_invalid, | |
| 517 Label::Distance distance = Label::kFar) { | |
| 518 mov(scratch, value); | |
| 519 add(scratch, Immediate(0x40000000U)); | |
| 520 j(sign, on_invalid, distance); | |
| 521 } | |
| 522 | |
| 523 // Jump if the unsigned integer value cannot be represented by a smi. | |
| 524 inline void JumpIfUIntNotValidSmiValue( | |
| 525 Register value, Label* on_invalid, | |
| 526 Label::Distance distance = Label::kFar) { | |
| 527 cmp(value, Immediate(0x40000000U)); | |
| 528 j(above_equal, on_invalid, distance); | |
| 529 } | |
| 530 | |
| 531 void LoadInstanceDescriptors(Register map, Register descriptors); | 514 void LoadInstanceDescriptors(Register map, Register descriptors); |
| 532 void EnumLength(Register dst, Register map); | 515 void EnumLength(Register dst, Register map); |
| 533 void NumberOfOwnDescriptors(Register dst, Register map); | 516 void NumberOfOwnDescriptors(Register dst, Register map); |
| 534 void LoadAccessor(Register dst, Register holder, int accessor_index, | 517 void LoadAccessor(Register dst, Register holder, int accessor_index, |
| 535 AccessorComponent accessor); | 518 AccessorComponent accessor); |
| 536 | 519 |
| 537 template<typename Field> | 520 template<typename Field> |
| 538 void DecodeField(Register reg) { | 521 void DecodeField(Register reg) { |
| 539 static const int shift = Field::kShift; | 522 static const int shift = Field::kShift; |
| 540 static const int mask = Field::kMask >> Field::kShift; | 523 static const int mask = Field::kMask >> Field::kShift; |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 } \ | 1051 } \ |
| 1069 masm-> | 1052 masm-> |
| 1070 #else | 1053 #else |
| 1071 #define ACCESS_MASM(masm) masm-> | 1054 #define ACCESS_MASM(masm) masm-> |
| 1072 #endif | 1055 #endif |
| 1073 | 1056 |
| 1074 } // namespace internal | 1057 } // namespace internal |
| 1075 } // namespace v8 | 1058 } // namespace v8 |
| 1076 | 1059 |
| 1077 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1060 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |