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

Side by Side Diff: runtime/vm/stub_code_arm64.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/stub_code_arm.cc ('k') | runtime/vm/stub_code_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 __ StoreIntoObjectNoBarrier( 453 __ StoreIntoObjectNoBarrier(
454 R0, 454 R0,
455 FieldAddress(R0, Array::length_offset()), 455 FieldAddress(R0, Array::length_offset()),
456 R2); 456 R2);
457 457
458 // Calculate the size tag. 458 // Calculate the size tag.
459 // R0: new object start as a tagged pointer. 459 // R0: new object start as a tagged pointer.
460 // R2: array length as Smi. 460 // R2: array length as Smi.
461 // R3: array size. 461 // R3: array size.
462 // R7: new object end address. 462 // R7: new object end address.
463 const intptr_t shift = RawObject::kSizeTagBit - kObjectAlignmentLog2; 463 const intptr_t shift = RawObject::kSizeTagPos - kObjectAlignmentLog2;
464 __ CompareImmediate(R3, RawObject::SizeTag::kMaxSizeTag, kNoPP); 464 __ CompareImmediate(R3, RawObject::SizeTag::kMaxSizeTag, kNoPP);
465 // If no size tag overflow, shift R1 left, else set R1 to zero. 465 // If no size tag overflow, shift R1 left, else set R1 to zero.
466 __ Lsl(TMP, R3, shift); 466 __ Lsl(TMP, R3, shift);
467 __ csel(R1, TMP, R1, LS); 467 __ csel(R1, TMP, R1, LS);
468 __ csel(R1, ZR, R1, HI); 468 __ csel(R1, ZR, R1, HI);
469 469
470 // Get the class index and insert it into the tags. 470 // Get the class index and insert it into the tags.
471 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(kArrayCid), kNoPP); 471 __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(kArrayCid), kNoPP);
472 __ orr(R1, R1, Operand(TMP)); 472 __ orr(R1, R1, Operand(TMP));
473 __ StoreFieldToOffset(R1, R0, Array::tags_offset()); 473 __ StoreFieldToOffset(R1, R0, Array::tags_offset());
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 // R2: object size. 715 // R2: object size.
716 // R3: next object start. 716 // R3: next object start.
717 __ str(R3, Address(R5)); 717 __ str(R3, Address(R5));
718 __ add(R0, R0, Operand(kHeapObjectTag)); 718 __ add(R0, R0, Operand(kHeapObjectTag));
719 __ UpdateAllocationStatsWithSize(context_class.id(), R2, R5, kNoPP); 719 __ UpdateAllocationStatsWithSize(context_class.id(), R2, R5, kNoPP);
720 720
721 // Calculate the size tag. 721 // Calculate the size tag.
722 // R0: new object. 722 // R0: new object.
723 // R1: number of context variables. 723 // R1: number of context variables.
724 // R2: object size. 724 // R2: object size.
725 const intptr_t shift = RawObject::kSizeTagBit - kObjectAlignmentLog2; 725 const intptr_t shift = RawObject::kSizeTagPos - kObjectAlignmentLog2;
726 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag, kNoPP); 726 __ CompareImmediate(R2, RawObject::SizeTag::kMaxSizeTag, kNoPP);
727 // If no size tag overflow, shift R2 left, else set R2 to zero. 727 // If no size tag overflow, shift R2 left, else set R2 to zero.
728 __ Lsl(TMP, R2, shift); 728 __ Lsl(TMP, R2, shift);
729 __ csel(R2, TMP, R2, LS); 729 __ csel(R2, TMP, R2, LS);
730 __ csel(R2, ZR, R2, HI); 730 __ csel(R2, ZR, R2, HI);
731 731
732 // Get the class index and insert it into the tags. 732 // Get the class index and insert it into the tags.
733 // R2: size and bit tags. 733 // R2: size and bit tags.
734 __ LoadImmediate( 734 __ LoadImmediate(
735 TMP, RawObject::ClassIdTag::encode(context_class.id()), kNoPP); 735 TMP, RawObject::ClassIdTag::encode(context_class.id()), kNoPP);
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 1504
1505 1505
1506 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub( 1506 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub(
1507 Assembler* assembler) { 1507 Assembler* assembler) {
1508 __ Stop("GenerateOptimizedIdenticalWithNumberCheckStub"); 1508 __ Stop("GenerateOptimizedIdenticalWithNumberCheckStub");
1509 } 1509 }
1510 1510
1511 } // namespace dart 1511 } // namespace dart
1512 1512
1513 #endif // defined TARGET_ARCH_ARM64 1513 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698