Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 173568: Add allocation support to x64 macro assembler (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 void MacroAssembler::AllocateObjectInNewSpace( 662 void MacroAssembler::AllocateObjectInNewSpace(
663 int object_size, 663 int object_size,
664 Register result, 664 Register result,
665 Register result_end, 665 Register result_end,
666 Register scratch, 666 Register scratch,
667 Label* gc_required, 667 Label* gc_required,
668 bool result_contains_top_on_entry) { 668 bool result_contains_top_on_entry) {
669 ASSERT(!result.is(result_end)); 669 ASSERT(!result.is(result_end));
670 670
671 // Load address of new object into result. 671 // Load address of new object into result.
672 ExternalReference new_space_allocation_limit =
673 ExternalReference::new_space_allocation_limit_address();
674 LoadAllocationTopHelper(result, 672 LoadAllocationTopHelper(result,
675 result_end, 673 result_end,
676 scratch, 674 scratch,
677 result_contains_top_on_entry); 675 result_contains_top_on_entry);
678 676
679 // Calculate new top and bail out if new space is exhausted. 677 // Calculate new top and bail out if new space is exhausted.
678 ExternalReference new_space_allocation_limit =
679 ExternalReference::new_space_allocation_limit_address();
680 lea(result_end, Operand(result, object_size)); 680 lea(result_end, Operand(result, object_size));
681 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit)); 681 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit));
682 j(above, gc_required, not_taken); 682 j(above, gc_required, not_taken);
683 683
684 // Update allocation top. 684 // Update allocation top.
685 UpdateAllocationTopHelper(result_end, scratch); 685 UpdateAllocationTopHelper(result_end, scratch);
686 } 686 }
687 687
688 688
689 void MacroAssembler::AllocateObjectInNewSpace( 689 void MacroAssembler::AllocateObjectInNewSpace(
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 // Indicate that code has changed. 1175 // Indicate that code has changed.
1176 CPU::FlushICache(address_, size_); 1176 CPU::FlushICache(address_, size_);
1177 1177
1178 // Check that the code was patched as expected. 1178 // Check that the code was patched as expected.
1179 ASSERT(masm_.pc_ == address_ + size_); 1179 ASSERT(masm_.pc_ == address_ + size_);
1180 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1180 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1181 } 1181 }
1182 1182
1183 1183
1184 } } // namespace v8::internal 1184 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698