| 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 bind(&correct_result); | 692 bind(&correct_result); |
| 693 } | 693 } |
| 694 } | 694 } |
| 695 | 695 |
| 696 | 696 |
| 697 void MacroAssembler::SmiTryAddConstant(Register dst, | 697 void MacroAssembler::SmiTryAddConstant(Register dst, |
| 698 Register src, | 698 Register src, |
| 699 Smi* constant, | 699 Smi* constant, |
| 700 Label* on_not_smi_result) { | 700 Label* on_not_smi_result) { |
| 701 // Does not assume that src is a smi. | 701 // Does not assume that src is a smi. |
| 702 ASSERT_EQ(static_cast<intptr_t>(1), kSmiTagMask); | 702 ASSERT_EQ(static_cast<int>(1), static_cast<int>(kSmiTagMask)); |
| 703 ASSERT_EQ(0, kSmiTag); | 703 ASSERT_EQ(0, kSmiTag); |
| 704 ASSERT(!dst.is(kScratchRegister)); | 704 ASSERT(!dst.is(kScratchRegister)); |
| 705 ASSERT(!src.is(kScratchRegister)); | 705 ASSERT(!src.is(kScratchRegister)); |
| 706 | 706 |
| 707 JumpIfNotSmi(src, on_not_smi_result); | 707 JumpIfNotSmi(src, on_not_smi_result); |
| 708 Register tmp = (dst.is(src) ? kScratchRegister : dst); | 708 Register tmp = (dst.is(src) ? kScratchRegister : dst); |
| 709 Move(tmp, constant); | 709 Move(tmp, constant); |
| 710 addq(tmp, src); | 710 addq(tmp, src); |
| 711 j(overflow, on_not_smi_result); | 711 j(overflow, on_not_smi_result); |
| 712 if (dst.is(src)) { | 712 if (dst.is(src)) { |
| (...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2263 CodePatcher::~CodePatcher() { | 2263 CodePatcher::~CodePatcher() { |
| 2264 // Indicate that code has changed. | 2264 // Indicate that code has changed. |
| 2265 CPU::FlushICache(address_, size_); | 2265 CPU::FlushICache(address_, size_); |
| 2266 | 2266 |
| 2267 // Check that the code was patched as expected. | 2267 // Check that the code was patched as expected. |
| 2268 ASSERT(masm_.pc_ == address_ + size_); | 2268 ASSERT(masm_.pc_ == address_ + size_); |
| 2269 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2269 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2270 } | 2270 } |
| 2271 | 2271 |
| 2272 } } // namespace v8::internal | 2272 } } // namespace v8::internal |
| OLD | NEW |