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

Side by Side Diff: runtime/vm/locations.h

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 4 years, 8 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
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 #ifndef VM_LOCATIONS_H_ 5 #ifndef VM_LOCATIONS_H_
6 #define VM_LOCATIONS_H_ 6 #define VM_LOCATIONS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 intptr_t stack_index() const { 334 intptr_t stack_index() const {
335 ASSERT(HasStackIndex()); 335 ASSERT(HasStackIndex());
336 // Decode stack index manually to preserve sign. 336 // Decode stack index manually to preserve sign.
337 return StackIndexField::decode(payload()) - kStackIndexBias; 337 return StackIndexField::decode(payload()) - kStackIndexBias;
338 } 338 }
339 339
340 bool HasStackIndex() const { 340 bool HasStackIndex() const {
341 return IsStackSlot() || IsDoubleStackSlot() || IsQuadStackSlot(); 341 return IsStackSlot() || IsDoubleStackSlot() || IsQuadStackSlot();
342 } 342 }
343 343
344 #if !defined(TARGET_ARCH_DBC)
zra 2016/04/14 18:27:49 Why?
Vyacheslav Egorov (Google) 2016/04/18 15:56:42 There was a comment in the CC file explaining. Cop
344 // Return a memory operand for stack slot locations. 345 // Return a memory operand for stack slot locations.
345 Address ToStackSlotAddress() const; 346 Address ToStackSlotAddress() const;
347 #endif
346 348
347 // Returns the offset from the frame pointer for stack slot locations. 349 // Returns the offset from the frame pointer for stack slot locations.
348 intptr_t ToStackSlotOffset() const; 350 intptr_t ToStackSlotOffset() const;
349 351
350 // Constants. 352 // Constants.
351 static Location RegisterOrConstant(Value* value); 353 static Location RegisterOrConstant(Value* value);
352 static Location RegisterOrSmiConstant(Value* value); 354 static Location RegisterOrSmiConstant(Value* value);
353 static Location WritableRegisterOrSmiConstant(Value* value); 355 static Location WritableRegisterOrSmiConstant(Value* value);
354 static Location FixedRegisterOrConstant(Value* value, Register reg); 356 static Location FixedRegisterOrConstant(Value* value, Register reg);
355 static Location FixedRegisterOrSmiConstant(Value* value, Register reg); 357 static Location FixedRegisterOrSmiConstant(Value* value, Register reg);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 return output_location_; 645 return output_location_;
644 } 646 }
645 647
646 Location* out_slot(intptr_t index) { 648 Location* out_slot(intptr_t index) {
647 ASSERT(index == 0); 649 ASSERT(index == 0);
648 return &output_location_; 650 return &output_location_;
649 } 651 }
650 652
651 void set_out(intptr_t index, Location loc) { 653 void set_out(intptr_t index, Location loc) {
652 ASSERT(index == 0); 654 ASSERT(index == 0);
655 // DBC calls are different from call on other architectures so this
656 // assert doesn't make sense.
657 #if !defined(TARGET_ARCH_DBC)
653 ASSERT(!always_calls() || 658 ASSERT(!always_calls() ||
654 (loc.IsMachineRegister() || loc.IsInvalid() || 659 (loc.IsMachineRegister() || loc.IsInvalid() ||
655 loc.IsPairLocation())); 660 loc.IsPairLocation()));
661 #endif
656 output_location_ = loc; 662 output_location_ = loc;
657 } 663 }
658 664
659 BitmapBuilder* stack_bitmap() { 665 BitmapBuilder* stack_bitmap() {
660 if (stack_bitmap_ == NULL) { 666 if (stack_bitmap_ == NULL) {
661 stack_bitmap_ = new BitmapBuilder(); 667 stack_bitmap_ = new BitmapBuilder();
662 } 668 }
663 return stack_bitmap_; 669 return stack_bitmap_;
664 } 670 }
665 void SetStackBit(intptr_t index) { 671 void SetStackBit(intptr_t index) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 716
711 #if defined(DEBUG) 717 #if defined(DEBUG)
712 intptr_t writable_inputs_; 718 intptr_t writable_inputs_;
713 #endif 719 #endif
714 }; 720 };
715 721
716 722
717 } // namespace dart 723 } // namespace dart
718 724
719 #endif // VM_LOCATIONS_H_ 725 #endif // VM_LOCATIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698