| 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_X87_MACRO_ASSEMBLER_X87_H_ | 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ |
| 6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ | 6 #define V8_X87_MACRO_ASSEMBLER_X87_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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 Label::Distance distance = Label::kFar) { | 461 Label::Distance distance = Label::kFar) { |
| 462 test(value, Immediate(kSmiTagMask)); | 462 test(value, Immediate(kSmiTagMask)); |
| 463 j(zero, smi_label, distance); | 463 j(zero, smi_label, distance); |
| 464 } | 464 } |
| 465 // Jump if register contain a non-smi. | 465 // Jump if register contain a non-smi. |
| 466 inline void JumpIfNotSmi(Register value, Label* not_smi_label, | 466 inline void JumpIfNotSmi(Register value, Label* not_smi_label, |
| 467 Label::Distance distance = Label::kFar) { | 467 Label::Distance distance = Label::kFar) { |
| 468 test(value, Immediate(kSmiTagMask)); | 468 test(value, Immediate(kSmiTagMask)); |
| 469 j(not_zero, not_smi_label, distance); | 469 j(not_zero, not_smi_label, distance); |
| 470 } | 470 } |
| 471 | 471 // Jump if the operand is not a smi. |
| 472 inline void JumpIfNotSmi(Operand value, Label* smi_label, |
| 473 Label::Distance distance = Label::kFar) { |
| 474 test(value, Immediate(kSmiTagMask)); |
| 475 j(not_zero, smi_label, distance); |
| 476 } |
| 472 // Jump if the value cannot be represented by a smi. | 477 // Jump if the value cannot be represented by a smi. |
| 473 inline void JumpIfNotValidSmiValue(Register value, Register scratch, | 478 inline void JumpIfNotValidSmiValue(Register value, Register scratch, |
| 474 Label* on_invalid, | 479 Label* on_invalid, |
| 475 Label::Distance distance = Label::kFar) { | 480 Label::Distance distance = Label::kFar) { |
| 476 mov(scratch, value); | 481 mov(scratch, value); |
| 477 add(scratch, Immediate(0x40000000U)); | 482 add(scratch, Immediate(0x40000000U)); |
| 478 j(sign, on_invalid, distance); | 483 j(sign, on_invalid, distance); |
| 479 } | 484 } |
| 480 | 485 |
| 481 // Jump if the unsigned integer value cannot be represented by a smi. | 486 // Jump if the unsigned integer value cannot be represented by a smi. |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 inline Operand NativeContextOperand() { | 965 inline Operand NativeContextOperand() { |
| 961 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); | 966 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); |
| 962 } | 967 } |
| 963 | 968 |
| 964 #define ACCESS_MASM(masm) masm-> | 969 #define ACCESS_MASM(masm) masm-> |
| 965 | 970 |
| 966 } // namespace internal | 971 } // namespace internal |
| 967 } // namespace v8 | 972 } // namespace v8 |
| 968 | 973 |
| 969 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 974 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
| OLD | NEW |