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

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: 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
« no previous file with comments | « runtime/vm/intrinsifier_dbc.cc ('k') | runtime/vm/locations.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 #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 // DBC does not have an notion of 'address' in its instruction set.
345 #if !defined(TARGET_ARCH_DBC)
344 // Return a memory operand for stack slot locations. 346 // Return a memory operand for stack slot locations.
345 Address ToStackSlotAddress() const; 347 Address ToStackSlotAddress() const;
348 #endif
346 349
347 // Returns the offset from the frame pointer for stack slot locations. 350 // Returns the offset from the frame pointer for stack slot locations.
348 intptr_t ToStackSlotOffset() const; 351 intptr_t ToStackSlotOffset() const;
349 352
350 // Constants. 353 // Constants.
351 static Location RegisterOrConstant(Value* value); 354 static Location RegisterOrConstant(Value* value);
352 static Location RegisterOrSmiConstant(Value* value); 355 static Location RegisterOrSmiConstant(Value* value);
353 static Location WritableRegisterOrSmiConstant(Value* value); 356 static Location WritableRegisterOrSmiConstant(Value* value);
354 static Location FixedRegisterOrConstant(Value* value, Register reg); 357 static Location FixedRegisterOrConstant(Value* value, Register reg);
355 static Location FixedRegisterOrSmiConstant(Value* value, Register reg); 358 static Location FixedRegisterOrSmiConstant(Value* value, Register reg);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 return output_location_; 646 return output_location_;
644 } 647 }
645 648
646 Location* out_slot(intptr_t index) { 649 Location* out_slot(intptr_t index) {
647 ASSERT(index == 0); 650 ASSERT(index == 0);
648 return &output_location_; 651 return &output_location_;
649 } 652 }
650 653
651 void set_out(intptr_t index, Location loc) { 654 void set_out(intptr_t index, Location loc) {
652 ASSERT(index == 0); 655 ASSERT(index == 0);
656 // DBC calls are different from call on other architectures so this
657 // assert doesn't make sense.
658 #if !defined(TARGET_ARCH_DBC)
653 ASSERT(!always_calls() || 659 ASSERT(!always_calls() ||
654 (loc.IsMachineRegister() || loc.IsInvalid() || 660 (loc.IsMachineRegister() || loc.IsInvalid() ||
655 loc.IsPairLocation())); 661 loc.IsPairLocation()));
662 #endif
656 output_location_ = loc; 663 output_location_ = loc;
657 } 664 }
658 665
659 BitmapBuilder* stack_bitmap() { 666 BitmapBuilder* stack_bitmap() {
660 if (stack_bitmap_ == NULL) { 667 if (stack_bitmap_ == NULL) {
661 stack_bitmap_ = new BitmapBuilder(); 668 stack_bitmap_ = new BitmapBuilder();
662 } 669 }
663 return stack_bitmap_; 670 return stack_bitmap_;
664 } 671 }
665 void SetStackBit(intptr_t index) { 672 void SetStackBit(intptr_t index) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 717
711 #if defined(DEBUG) 718 #if defined(DEBUG)
712 intptr_t writable_inputs_; 719 intptr_t writable_inputs_;
713 #endif 720 #endif
714 }; 721 };
715 722
716 723
717 } // namespace dart 724 } // namespace dart
718 725
719 #endif // VM_LOCATIONS_H_ 726 #endif // VM_LOCATIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_dbc.cc ('k') | runtime/vm/locations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698