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

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

Issue 12381034: Second codegen test passing on ARM (simulated). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « no previous file | runtime/vm/assembler_arm.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_ASSEMBLER_ARM_H_ 5 #ifndef VM_ASSEMBLER_ARM_H_
6 #define VM_ASSEMBLER_ARM_H_ 6 #define VM_ASSEMBLER_ARM_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_arm.h directly; use assembler.h instead. 9 #error Do not include assembler_arm.h directly; use assembler.h instead.
10 #endif 10 #endif
11 11
12 #include "platform/assert.h" 12 #include "platform/assert.h"
13 #include "platform/utils.h" 13 #include "platform/utils.h"
14 #include "vm/constants_arm.h" 14 #include "vm/constants_arm.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 // Forward declarations.
19 class RuntimeEntry;
20
18 class Label : public ValueObject { 21 class Label : public ValueObject {
19 public: 22 public:
20 Label() : position_(0) { } 23 Label() : position_(0) { }
21 24
22 ~Label() { 25 ~Label() {
23 // Assert if label is being destroyed with unresolved branches pending. 26 // Assert if label is being destroyed with unresolved branches pending.
24 ASSERT(!IsLinked()); 27 ASSERT(!IsLinked());
25 } 28 }
26 29
27 // Returns the position for bound and linked labels. Cannot be used 30 // Returns the position for bound and linked labels. Cannot be used
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 519
517 // Compare rn with signed immediate value. May clobber IP. 520 // Compare rn with signed immediate value. May clobber IP.
518 void CompareImmediate(Register rn, int32_t value, Condition cond = AL); 521 void CompareImmediate(Register rn, int32_t value, Condition cond = AL);
519 522
520 // Load and Store. May clobber IP. 523 // Load and Store. May clobber IP.
521 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); 524 void LoadImmediate(Register rd, int32_t value, Condition cond = AL);
522 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); 525 void LoadSImmediate(SRegister sd, float value, Condition cond = AL);
523 void LoadDImmediate(DRegister dd, double value, 526 void LoadDImmediate(DRegister dd, double value,
524 Register scratch, Condition cond = AL); 527 Register scratch, Condition cond = AL);
525 void MarkExceptionHandler(Label* label); 528 void MarkExceptionHandler(Label* label);
529 void Drop(intptr_t stack_elements);
526 void LoadObject(Register rd, const Object& object); 530 void LoadObject(Register rd, const Object& object);
527 void LoadFromOffset(LoadOperandType type, 531 void LoadFromOffset(LoadOperandType type,
528 Register reg, 532 Register reg,
529 Register base, 533 Register base,
530 int32_t offset, 534 int32_t offset,
531 Condition cond = AL); 535 Condition cond = AL);
532 void StoreToOffset(StoreOperandType type, 536 void StoreToOffset(StoreOperandType type,
533 Register reg, 537 Register reg,
534 Register base, 538 Register base,
535 int32_t offset, 539 int32_t offset,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 void SmiUntag(Register reg, Condition cond = AL) { 578 void SmiUntag(Register reg, Condition cond = AL) {
575 Asr(reg, reg, kSmiTagSize, cond); 579 Asr(reg, reg, kSmiTagSize, cond);
576 } 580 }
577 581
578 // Function frame setup and tear down. 582 // Function frame setup and tear down.
579 void EnterFrame(RegList regs, intptr_t frame_space); 583 void EnterFrame(RegList regs, intptr_t frame_space);
580 void LeaveFrame(RegList regs); 584 void LeaveFrame(RegList regs);
581 void Ret(); 585 void Ret();
582 void ReserveAlignedFrameSpace(intptr_t frame_space); 586 void ReserveAlignedFrameSpace(intptr_t frame_space);
583 587
588 // Create a frame for calling into runtime that preserves all volatile
589 // registers. Frame's SP is guaranteed to be correctly aligned and
590 // frame_space bytes are reserved under it.
591 void EnterCallRuntimeFrame(intptr_t frame_space);
592 void LeaveCallRuntimeFrame();
593
594 void CallRuntime(const RuntimeEntry& entry);
595
584 // Emit data (e.g encoded instruction or immediate) in instruction stream. 596 // Emit data (e.g encoded instruction or immediate) in instruction stream.
585 void Emit(int32_t value); 597 void Emit(int32_t value);
586 598
587 private: 599 private:
588 AssemblerBuffer buffer_; // Contains position independent code. 600 AssemblerBuffer buffer_; // Contains position independent code.
589 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. 601 GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
590 int32_t prologue_offset_; 602 int32_t prologue_offset_;
591 603
592 int32_t AddObject(const Object& obj); 604 int32_t AddObject(const Object& obj);
593 int32_t AddExternalLabel(const ExternalLabel* label); 605 int32_t AddExternalLabel(const ExternalLabel* label);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 return *reg1 - *reg2; 714 return *reg1 - *reg2;
703 } 715 }
704 716
705 DISALLOW_ALLOCATION(); 717 DISALLOW_ALLOCATION();
706 DISALLOW_COPY_AND_ASSIGN(Assembler); 718 DISALLOW_COPY_AND_ASSIGN(Assembler);
707 }; 719 };
708 720
709 } // namespace dart 721 } // namespace dart
710 722
711 #endif // VM_ASSEMBLER_ARM_H_ 723 #endif // VM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698