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

Side by Side Diff: runtime/vm/intrinsifier_mips.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/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 __ sw(T1, Address(T3, 0)); 72 __ sw(T1, Address(T3, 0));
73 __ addiu(T0, T0, Immediate(kHeapObjectTag)); 73 __ addiu(T0, T0, Immediate(kHeapObjectTag));
74 __ UpdateAllocationStatsWithSize(kArrayCid, T2, T4); 74 __ UpdateAllocationStatsWithSize(kArrayCid, T2, T4);
75 75
76 // Initialize the tags. 76 // Initialize the tags.
77 // T0: new object start as a tagged pointer. 77 // T0: new object start as a tagged pointer.
78 // T1: new object end address. 78 // T1: new object end address.
79 // T2: allocation size. 79 // T2: allocation size.
80 { 80 {
81 Label overflow, done; 81 Label overflow, done;
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 __ BranchUnsignedGreater(T2, RawObject::SizeTag::kMaxSizeTag, &overflow); 85 __ BranchUnsignedGreater(T2, RawObject::SizeTag::kMaxSizeTag, &overflow);
86 __ b(&done); 86 __ b(&done);
87 __ delay_slot()->sll(T2, T2, shift); 87 __ delay_slot()->sll(T2, T2, shift);
88 __ Bind(&overflow); 88 __ Bind(&overflow);
89 __ mov(T2, ZR); 89 __ mov(T2, ZR);
90 __ Bind(&done); 90 __ Bind(&done);
91 91
92 // Get the class index and insert it into the tags. 92 // Get the class index and insert it into the tags.
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 /* Initialize the tags. */ \ 499 /* Initialize the tags. */ \
500 /* V0: new object start as a tagged pointer. */ \ 500 /* V0: new object start as a tagged pointer. */ \
501 /* T1: new object end address. */ \ 501 /* T1: new object end address. */ \
502 /* T2: allocation size. */ \ 502 /* T2: allocation size. */ \
503 { \ 503 { \
504 Label size_tag_overflow, done; \ 504 Label size_tag_overflow, done; \
505 __ BranchUnsignedGreater(T2, RawObject::SizeTag::kMaxSizeTag, \ 505 __ BranchUnsignedGreater(T2, RawObject::SizeTag::kMaxSizeTag, \
506 &size_tag_overflow); \ 506 &size_tag_overflow); \
507 __ b(&done); \ 507 __ b(&done); \
508 __ delay_slot()->sll(T2, T2, \ 508 __ delay_slot()->sll(T2, T2, \
509 RawObject::kSizeTagBit - kObjectAlignmentLog2); \ 509 RawObject::kSizeTagPos - kObjectAlignmentLog2); \
510 \ 510 \
511 __ Bind(&size_tag_overflow); \ 511 __ Bind(&size_tag_overflow); \
512 __ mov(T2, ZR); \ 512 __ mov(T2, ZR); \
513 __ Bind(&done); \ 513 __ Bind(&done); \
514 \ 514 \
515 /* Get the class index and insert it into the tags. */ \ 515 /* Get the class index and insert it into the tags. */ \
516 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid)); \ 516 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid)); \
517 __ or_(T2, T2, TMP); \ 517 __ or_(T2, T2, TMP); \
518 __ sw(T2, FieldAddress(V0, type_name::tags_offset())); /* Tags. */ \ 518 __ sw(T2, FieldAddress(V0, type_name::tags_offset())); /* Tags. */ \
519 } \ 519 } \
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 __ AddImmediate(V0, kHeapObjectTag); 1597 __ AddImmediate(V0, kHeapObjectTag);
1598 1598
1599 __ UpdateAllocationStatsWithSize(kOneByteStringCid, T2, T3); 1599 __ UpdateAllocationStatsWithSize(kOneByteStringCid, T2, T3);
1600 1600
1601 // Initialize the tags. 1601 // Initialize the tags.
1602 // V0: new object start as a tagged pointer. 1602 // V0: new object start as a tagged pointer.
1603 // T1: new object end address. 1603 // T1: new object end address.
1604 // T2: allocation size. 1604 // T2: allocation size.
1605 { 1605 {
1606 Label overflow, done; 1606 Label overflow, done;
1607 const intptr_t shift = RawObject::kSizeTagBit - kObjectAlignmentLog2; 1607 const intptr_t shift = RawObject::kSizeTagPos - kObjectAlignmentLog2;
1608 const Class& cls = 1608 const Class& cls =
1609 Class::Handle(isolate->object_store()->one_byte_string_class()); 1609 Class::Handle(isolate->object_store()->one_byte_string_class());
1610 1610
1611 __ BranchUnsignedGreater(T2, RawObject::SizeTag::kMaxSizeTag, &overflow); 1611 __ BranchUnsignedGreater(T2, RawObject::SizeTag::kMaxSizeTag, &overflow);
1612 __ b(&done); 1612 __ b(&done);
1613 __ delay_slot()->sll(T2, T2, shift); 1613 __ delay_slot()->sll(T2, T2, shift);
1614 __ Bind(&overflow); 1614 __ Bind(&overflow);
1615 __ mov(T2, ZR); 1615 __ mov(T2, ZR);
1616 __ Bind(&done); 1616 __ Bind(&done);
1617 1617
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 __ LoadImmediate(T0, raw_null); 1818 __ LoadImmediate(T0, raw_null);
1819 __ sw(T0, Address(T1, Isolate::current_tag_offset())); 1819 __ sw(T0, Address(T1, Isolate::current_tag_offset()));
1820 // Clear Isolate::user_tag_. 1820 // Clear Isolate::user_tag_.
1821 __ Ret(); 1821 __ Ret();
1822 __ delay_slot()->sw(ZR, Address(T1, Isolate::user_tag_offset())); 1822 __ delay_slot()->sw(ZR, Address(T1, Isolate::user_tag_offset()));
1823 } 1823 }
1824 1824
1825 } // namespace dart 1825 } // namespace dart
1826 1826
1827 #endif // defined TARGET_ARCH_MIPS 1827 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698