| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 Label::Distance distance = Label::kFar) { | 469 Label::Distance distance = Label::kFar) { |
| 470 test(value, Immediate(kSmiTagMask)); | 470 test(value, Immediate(kSmiTagMask)); |
| 471 j(zero, smi_label, distance); | 471 j(zero, smi_label, distance); |
| 472 } | 472 } |
| 473 // Jump if register contain a non-smi. | 473 // Jump if register contain a non-smi. |
| 474 inline void JumpIfNotSmi(Register value, Label* not_smi_label, | 474 inline void JumpIfNotSmi(Register value, Label* not_smi_label, |
| 475 Label::Distance distance = Label::kFar) { | 475 Label::Distance distance = Label::kFar) { |
| 476 test(value, Immediate(kSmiTagMask)); | 476 test(value, Immediate(kSmiTagMask)); |
| 477 j(not_zero, not_smi_label, distance); | 477 j(not_zero, not_smi_label, distance); |
| 478 } | 478 } |
| 479 | 479 // Jump if the operand is not a smi. |
| 480 inline void JumpIfNotSmi(Operand value, Label* smi_label, |
| 481 Label::Distance distance = Label::kFar) { |
| 482 test(value, Immediate(kSmiTagMask)); |
| 483 j(not_zero, smi_label, distance); |
| 484 } |
| 480 // Jump if the value cannot be represented by a smi. | 485 // Jump if the value cannot be represented by a smi. |
| 481 inline void JumpIfNotValidSmiValue(Register value, Register scratch, | 486 inline void JumpIfNotValidSmiValue(Register value, Register scratch, |
| 482 Label* on_invalid, | 487 Label* on_invalid, |
| 483 Label::Distance distance = Label::kFar) { | 488 Label::Distance distance = Label::kFar) { |
| 484 mov(scratch, value); | 489 mov(scratch, value); |
| 485 add(scratch, Immediate(0x40000000U)); | 490 add(scratch, Immediate(0x40000000U)); |
| 486 j(sign, on_invalid, distance); | 491 j(sign, on_invalid, distance); |
| 487 } | 492 } |
| 488 | 493 |
| 489 // Jump if the unsigned integer value cannot be represented by a smi. | 494 // Jump if the unsigned integer value cannot be represented by a smi. |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 inline Operand NativeContextOperand() { | 985 inline Operand NativeContextOperand() { |
| 981 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); | 986 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); |
| 982 } | 987 } |
| 983 | 988 |
| 984 #define ACCESS_MASM(masm) masm-> | 989 #define ACCESS_MASM(masm) masm-> |
| 985 | 990 |
| 986 } // namespace internal | 991 } // namespace internal |
| 987 } // namespace v8 | 992 } // namespace v8 |
| 988 | 993 |
| 989 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 994 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |