OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 if (first.is(second)) { | 574 if (first.is(second)) { |
575 return CheckSmi(first); | 575 return CheckSmi(first); |
576 } | 576 } |
577 movl(kScratchRegister, first); | 577 movl(kScratchRegister, first); |
578 orl(kScratchRegister, second); | 578 orl(kScratchRegister, second); |
579 testb(kScratchRegister, Immediate(kSmiTagMask)); | 579 testb(kScratchRegister, Immediate(kSmiTagMask)); |
580 return zero; | 580 return zero; |
581 } | 581 } |
582 | 582 |
583 | 583 |
| 584 Condition MacroAssembler::CheckEitherSmi(Register first, Register second) { |
| 585 if (first.is(second)) { |
| 586 return CheckSmi(first); |
| 587 } |
| 588 movl(kScratchRegister, first); |
| 589 andl(kScratchRegister, second); |
| 590 testb(kScratchRegister, Immediate(kSmiTagMask)); |
| 591 return zero; |
| 592 } |
| 593 |
| 594 |
584 Condition MacroAssembler::CheckIsMinSmi(Register src) { | 595 Condition MacroAssembler::CheckIsMinSmi(Register src) { |
585 ASSERT(kSmiTag == 0 && kSmiTagSize == 1); | 596 ASSERT(kSmiTag == 0 && kSmiTagSize == 1); |
586 movq(kScratchRegister, src); | 597 movq(kScratchRegister, src); |
587 rol(kScratchRegister, Immediate(1)); | 598 rol(kScratchRegister, Immediate(1)); |
588 cmpq(kScratchRegister, Immediate(1)); | 599 cmpq(kScratchRegister, Immediate(1)); |
589 return equal; | 600 return equal; |
590 } | 601 } |
591 | 602 |
592 | 603 |
593 Condition MacroAssembler::CheckInteger32ValidSmiValue(Register src) { | 604 Condition MacroAssembler::CheckInteger32ValidSmiValue(Register src) { |
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 CodePatcher::~CodePatcher() { | 2411 CodePatcher::~CodePatcher() { |
2401 // Indicate that code has changed. | 2412 // Indicate that code has changed. |
2402 CPU::FlushICache(address_, size_); | 2413 CPU::FlushICache(address_, size_); |
2403 | 2414 |
2404 // Check that the code was patched as expected. | 2415 // Check that the code was patched as expected. |
2405 ASSERT(masm_.pc_ == address_ + size_); | 2416 ASSERT(masm_.pc_ == address_ + size_); |
2406 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2417 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2407 } | 2418 } |
2408 | 2419 |
2409 } } // namespace v8::internal | 2420 } } // namespace v8::internal |
OLD | NEW |