| 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 |
| 514 void LoadInstanceDescriptors(Register map, Register descriptors); | 531 void LoadInstanceDescriptors(Register map, Register descriptors); |
| 515 void EnumLength(Register dst, Register map); | 532 void EnumLength(Register dst, Register map); |
| 516 void NumberOfOwnDescriptors(Register dst, Register map); | 533 void NumberOfOwnDescriptors(Register dst, Register map); |
| 517 void LoadAccessor(Register dst, Register holder, int accessor_index, | 534 void LoadAccessor(Register dst, Register holder, int accessor_index, |
| 518 AccessorComponent accessor); | 535 AccessorComponent accessor); |
| 519 | 536 |
| 520 template<typename Field> | 537 template<typename Field> |
| 521 void DecodeField(Register reg) { | 538 void DecodeField(Register reg) { |
| 522 static const int shift = Field::kShift; | 539 static const int shift = Field::kShift; |
| 523 static const int mask = Field::kMask >> Field::kShift; | 540 static const int mask = Field::kMask >> Field::kShift; |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 } \ | 1064 } \ |
| 1048 masm-> | 1065 masm-> |
| 1049 #else | 1066 #else |
| 1050 #define ACCESS_MASM(masm) masm-> | 1067 #define ACCESS_MASM(masm) masm-> |
| 1051 #endif | 1068 #endif |
| 1052 | 1069 |
| 1053 } // namespace internal | 1070 } // namespace internal |
| 1054 } // namespace v8 | 1071 } // namespace v8 |
| 1055 | 1072 |
| 1056 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1073 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |