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

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

Issue 259393002: Enums cleanup. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intrinsifier_ia32.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // next object start and initialize the object. 72 // next object start and initialize the object.
73 __ str(R1, Address(R6, 0)); 73 __ str(R1, Address(R6, 0));
74 __ add(R0, R0, ShifterOperand(kHeapObjectTag)); 74 __ add(R0, R0, ShifterOperand(kHeapObjectTag));
75 __ UpdateAllocationStatsWithSize(kArrayCid, R2, R4); 75 __ UpdateAllocationStatsWithSize(kArrayCid, R2, R4);
76 76
77 // Initialize the tags. 77 // Initialize the tags.
78 // R0: new object start as a tagged pointer. 78 // R0: new object start as a tagged pointer.
79 // R1: new object end address. 79 // R1: new object end address.
80 // R2: allocation size. 80 // R2: allocation size.
81 { 81 {
82 const intptr_t shift = RawObject::kSizeTagBit - kObjectAlignmentLog2; 82 const intptr_t shift = RawObject::kSizeTagPos - kObjectAlignmentLog2;
83 const Class& cls = Class::Handle(isolate->object_store()->array_class()); 83 const Class& cls = Class::Handle(isolate->object_store()->array_class());
84 84
85 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag); 85 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag);
86 __ mov(R2, ShifterOperand(R2, LSL, shift), LS); 86 __ mov(R2, ShifterOperand(R2, LSL, shift), LS);
87 __ mov(R2, ShifterOperand(0), HI); 87 __ mov(R2, ShifterOperand(0), HI);
88 88
89 // Get the class index and insert it into the tags. 89 // Get the class index and insert it into the tags.
90 // R2: size and bit tags. 90 // R2: size and bit tags.
91 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cls.id())); 91 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cls.id()));
92 __ orr(R2, R2, ShifterOperand(TMP)); 92 __ orr(R2, R2, ShifterOperand(TMP));
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 __ str(R1, Address(R3, 0)); \ 492 __ str(R1, Address(R3, 0)); \
493 __ AddImmediate(R0, kHeapObjectTag); \ 493 __ AddImmediate(R0, kHeapObjectTag); \
494 __ UpdateAllocationStatsWithSize(cid, R2, R4); \ 494 __ UpdateAllocationStatsWithSize(cid, R2, R4); \
495 /* Initialize the tags. */ \ 495 /* Initialize the tags. */ \
496 /* R0: new object start as a tagged pointer. */ \ 496 /* R0: new object start as a tagged pointer. */ \
497 /* R1: new object end address. */ \ 497 /* R1: new object end address. */ \
498 /* R2: allocation size. */ \ 498 /* R2: allocation size. */ \
499 { \ 499 { \
500 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag); \ 500 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag); \
501 __ mov(R2, ShifterOperand(R2, LSL, \ 501 __ mov(R2, ShifterOperand(R2, LSL, \
502 RawObject::kSizeTagBit - kObjectAlignmentLog2), LS); \ 502 RawObject::kSizeTagPos - kObjectAlignmentLog2), LS); \
503 __ mov(R2, ShifterOperand(0), HI); \ 503 __ mov(R2, ShifterOperand(0), HI); \
504 \ 504 \
505 /* Get the class index and insert it into the tags. */ \ 505 /* Get the class index and insert it into the tags. */ \
506 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid)); \ 506 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid)); \
507 __ orr(R2, R2, ShifterOperand(TMP)); \ 507 __ orr(R2, R2, ShifterOperand(TMP)); \
508 __ str(R2, FieldAddress(R0, type_name::tags_offset())); /* Tags. */ \ 508 __ str(R2, FieldAddress(R0, type_name::tags_offset())); /* Tags. */ \
509 } \ 509 } \
510 /* Set the length field. */ \ 510 /* Set the length field. */ \
511 /* R0: new object start as a tagged pointer. */ \ 511 /* R0: new object start as a tagged pointer. */ \
512 /* R1: new object end address. */ \ 512 /* R1: new object end address. */ \
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 // next object start and initialize the object. 1524 // next object start and initialize the object.
1525 __ str(R1, Address(R3, 0)); 1525 __ str(R1, Address(R3, 0));
1526 __ AddImmediate(R0, kHeapObjectTag); 1526 __ AddImmediate(R0, kHeapObjectTag);
1527 __ UpdateAllocationStatsWithSize(kOneByteStringCid, R2, R3); 1527 __ UpdateAllocationStatsWithSize(kOneByteStringCid, R2, R3);
1528 1528
1529 // Initialize the tags. 1529 // Initialize the tags.
1530 // R0: new object start as a tagged pointer. 1530 // R0: new object start as a tagged pointer.
1531 // R1: new object end address. 1531 // R1: new object end address.
1532 // R2: allocation size. 1532 // R2: allocation size.
1533 { 1533 {
1534 const intptr_t shift = RawObject::kSizeTagBit - kObjectAlignmentLog2; 1534 const intptr_t shift = RawObject::kSizeTagPos - kObjectAlignmentLog2;
1535 const Class& cls = 1535 const Class& cls =
1536 Class::Handle(isolate->object_store()->one_byte_string_class()); 1536 Class::Handle(isolate->object_store()->one_byte_string_class());
1537 1537
1538 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag); 1538 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag);
1539 __ mov(R2, ShifterOperand(R2, LSL, shift), LS); 1539 __ mov(R2, ShifterOperand(R2, LSL, shift), LS);
1540 __ mov(R2, ShifterOperand(0), HI); 1540 __ mov(R2, ShifterOperand(0), HI);
1541 1541
1542 // Get the class index and insert it into the tags. 1542 // Get the class index and insert it into the tags.
1543 // R2: size and bit tags. 1543 // R2: size and bit tags.
1544 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cls.id())); 1544 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cls.id()));
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 __ str(R2, Address(R1, Isolate::current_tag_offset())); 1760 __ str(R2, Address(R1, Isolate::current_tag_offset()));
1761 // Clear Isolate::user_tag_. 1761 // Clear Isolate::user_tag_.
1762 __ eor(R2, R2, ShifterOperand(R2)); 1762 __ eor(R2, R2, ShifterOperand(R2));
1763 __ str(R2, Address(R1, Isolate::user_tag_offset())); 1763 __ str(R2, Address(R1, Isolate::user_tag_offset()));
1764 __ Ret(); 1764 __ Ret();
1765 } 1765 }
1766 1766
1767 } // namespace dart 1767 } // namespace dart
1768 1768
1769 #endif // defined TARGET_ARCH_ARM 1769 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698