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

Side by Side Diff: runtime/vm/intrinsifier_arm.cc

Issue 1213013002: Update Assembler::TryAllocate to support inline allocation tracing (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/object.cc » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 /* R0: potential new object start. */ \ 218 /* R0: potential new object start. */ \
219 /* R1: potential next object start. */ \ 219 /* R1: potential next object start. */ \
220 /* R2: allocation size. */ \ 220 /* R2: allocation size. */ \
221 __ LoadImmediate(R3, heap->EndAddress(space)); \ 221 __ LoadImmediate(R3, heap->EndAddress(space)); \
222 __ ldr(R3, Address(R3, 0)); \ 222 __ ldr(R3, Address(R3, 0)); \
223 __ cmp(R1, Operand(R3)); \ 223 __ cmp(R1, Operand(R3)); \
224 __ b(&fall_through, CS); \ 224 __ b(&fall_through, CS); \
225 \ 225 \
226 /* Successfully allocated the object(s), now update top to point to */ \ 226 /* Successfully allocated the object(s), now update top to point to */ \
227 /* next object start and initialize the object. */ \ 227 /* next object start and initialize the object. */ \
228 __ LoadAllocationStatsAddress(R4, cid, space); \ 228 __ LoadAllocationStatsAddress(R4, cid); \
229 __ LoadImmediate(R3, heap->TopAddress(space)); \ 229 __ LoadImmediate(R3, heap->TopAddress(space)); \
230 __ str(R1, Address(R3, 0)); \ 230 __ str(R1, Address(R3, 0)); \
231 __ AddImmediate(R0, kHeapObjectTag); \ 231 __ AddImmediate(R0, kHeapObjectTag); \
232 /* Initialize the tags. */ \ 232 /* Initialize the tags. */ \
233 /* R0: new object start as a tagged pointer. */ \ 233 /* R0: new object start as a tagged pointer. */ \
234 /* R1: new object end address. */ \ 234 /* R1: new object end address. */ \
235 /* R2: allocation size. */ \ 235 /* R2: allocation size. */ \
236 /* R4: allocation stats address */ \ 236 /* R4: allocation stats address */ \
237 { \ 237 { \
238 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag); \ 238 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag); \
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 // R1: potential next object start. 1786 // R1: potential next object start.
1787 // R2: allocation size. 1787 // R2: allocation size.
1788 // R3: heap->TopAddress(space). 1788 // R3: heap->TopAddress(space).
1789 __ LoadImmediate(R7, heap->EndAddress(space)); 1789 __ LoadImmediate(R7, heap->EndAddress(space));
1790 __ ldr(R7, Address(R7, 0)); 1790 __ ldr(R7, Address(R7, 0));
1791 __ cmp(R1, Operand(R7)); 1791 __ cmp(R1, Operand(R7));
1792 __ b(&fail, CS); 1792 __ b(&fail, CS);
1793 1793
1794 // Successfully allocated the object(s), now update top to point to 1794 // Successfully allocated the object(s), now update top to point to
1795 // next object start and initialize the object. 1795 // next object start and initialize the object.
1796 __ LoadAllocationStatsAddress(R4, cid, space); 1796 __ LoadAllocationStatsAddress(R4, cid);
1797 __ str(R1, Address(R3, 0)); 1797 __ str(R1, Address(R3, 0));
1798 __ AddImmediate(R0, kHeapObjectTag); 1798 __ AddImmediate(R0, kHeapObjectTag);
1799 1799
1800 // Initialize the tags. 1800 // Initialize the tags.
1801 // R0: new object start as a tagged pointer. 1801 // R0: new object start as a tagged pointer.
1802 // R1: new object end address. 1802 // R1: new object end address.
1803 // R2: allocation size. 1803 // R2: allocation size.
1804 // R4: allocation stats address. 1804 // R4: allocation stats address.
1805 { 1805 {
1806 const intptr_t shift = RawObject::kSizeTagPos - kObjectAlignmentLog2; 1806 const intptr_t shift = RawObject::kSizeTagPos - kObjectAlignmentLog2;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 Isolate* isolate = Isolate::Current(); 2060 Isolate* isolate = Isolate::Current();
2061 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); 2061 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate));
2062 // Set return value to Isolate::current_tag_. 2062 // Set return value to Isolate::current_tag_.
2063 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); 2063 __ ldr(R0, Address(R1, Isolate::current_tag_offset()));
2064 __ Ret(); 2064 __ Ret();
2065 } 2065 }
2066 2066
2067 } // namespace dart 2067 } // namespace dart
2068 2068
2069 #endif // defined TARGET_ARCH_ARM 2069 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698