OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 // Make sure the object has no tag before resetting top. | 760 // Make sure the object has no tag before resetting top. |
761 and_(Operand(object), Immediate(~kHeapObjectTagMask)); | 761 and_(Operand(object), Immediate(~kHeapObjectTagMask)); |
762 #ifdef DEBUG | 762 #ifdef DEBUG |
763 cmp(object, Operand::StaticVariable(new_space_allocation_top)); | 763 cmp(object, Operand::StaticVariable(new_space_allocation_top)); |
764 Check(below, "Undo allocation of non allocated memory"); | 764 Check(below, "Undo allocation of non allocated memory"); |
765 #endif | 765 #endif |
766 mov(Operand::StaticVariable(new_space_allocation_top), object); | 766 mov(Operand::StaticVariable(new_space_allocation_top), object); |
767 } | 767 } |
768 | 768 |
769 | 769 |
| 770 void MacroAssembler::AllocateHeapNumber(Register result, |
| 771 Register scratch1, |
| 772 Register scratch2, |
| 773 Label* gc_required) { |
| 774 // Allocate heap number in new space. |
| 775 AllocateInNewSpace(HeapNumber::kSize, |
| 776 result, |
| 777 scratch1, |
| 778 scratch2, |
| 779 gc_required, |
| 780 TAG_OBJECT); |
| 781 |
| 782 // Set the map. |
| 783 mov(FieldOperand(result, HeapObject::kMapOffset), |
| 784 Immediate(Factory::heap_number_map())); |
| 785 } |
| 786 |
| 787 |
770 void MacroAssembler::NegativeZeroTest(CodeGenerator* cgen, | 788 void MacroAssembler::NegativeZeroTest(CodeGenerator* cgen, |
771 Register result, | 789 Register result, |
772 Register op, | 790 Register op, |
773 JumpTarget* then_target) { | 791 JumpTarget* then_target) { |
774 JumpTarget ok; | 792 JumpTarget ok; |
775 test(result, Operand(result)); | 793 test(result, Operand(result)); |
776 ok.Branch(not_zero, taken); | 794 ok.Branch(not_zero, taken); |
777 test(op, Operand(op)); | 795 test(op, Operand(op)); |
778 then_target->Branch(sign, not_taken); | 796 then_target->Branch(sign, not_taken); |
779 ok.Bind(); | 797 ok.Bind(); |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 // Indicate that code has changed. | 1199 // Indicate that code has changed. |
1182 CPU::FlushICache(address_, size_); | 1200 CPU::FlushICache(address_, size_); |
1183 | 1201 |
1184 // Check that the code was patched as expected. | 1202 // Check that the code was patched as expected. |
1185 ASSERT(masm_.pc_ == address_ + size_); | 1203 ASSERT(masm_.pc_ == address_ + size_); |
1186 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1204 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
1187 } | 1205 } |
1188 | 1206 |
1189 | 1207 |
1190 } } // namespace v8::internal | 1208 } } // namespace v8::internal |
OLD | NEW |