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

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

Issue 1270803003: VM: More abstract interface for generating stub calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/assembler_arm64.cc ('k') | runtime/vm/assembler_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) 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_IA32_H_ 5 #ifndef VM_ASSEMBLER_IA32_H_
6 #define VM_ASSEMBLER_IA32_H_ 6 #define VM_ASSEMBLER_IA32_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_ia32.h directly; use assembler.h instead. 9 #error Do not include assembler_ia32.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_ia32.h" 14 #include "vm/constants_ia32.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 // Forward declarations. 18 // Forward declarations.
19 class RuntimeEntry; 19 class RuntimeEntry;
20 class StubEntry;
20 21
21 class Immediate : public ValueObject { 22 class Immediate : public ValueObject {
22 public: 23 public:
23 explicit Immediate(int32_t value) : value_(value) { } 24 explicit Immediate(int32_t value) : value_(value) { }
24 25
25 Immediate(const Immediate& other) : ValueObject(), value_(other.value_) { } 26 Immediate(const Immediate& other) : ValueObject(), value_(other.value_) { }
26 27
27 int32_t value() const { return value_; } 28 int32_t value() const { return value_; }
28 29
29 bool is_int8() const { return Utils::IsInt(8, value_); } 30 bool is_int8() const { return Utils::IsInt(8, value_); }
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 void ReserveAlignedFrameSpace(intptr_t frame_space); 725 void ReserveAlignedFrameSpace(intptr_t frame_space);
725 726
726 // Create a frame for calling into runtime that preserves all volatile 727 // Create a frame for calling into runtime that preserves all volatile
727 // registers. Frame's RSP is guaranteed to be correctly aligned and 728 // registers. Frame's RSP is guaranteed to be correctly aligned and
728 // frame_space bytes are reserved under it. 729 // frame_space bytes are reserved under it.
729 void EnterCallRuntimeFrame(intptr_t frame_space); 730 void EnterCallRuntimeFrame(intptr_t frame_space);
730 void LeaveCallRuntimeFrame(); 731 void LeaveCallRuntimeFrame();
731 732
732 void CallRuntime(const RuntimeEntry& entry, intptr_t argument_count); 733 void CallRuntime(const RuntimeEntry& entry, intptr_t argument_count);
733 734
735 void Call(const StubEntry& stub_entry);
736
737 void Jmp(const StubEntry& stub_entry);
738 void J(Condition condition, const StubEntry& stub_entry);
739
734 /* 740 /*
735 * Loading and comparing classes of objects. 741 * Loading and comparing classes of objects.
736 */ 742 */
737 void LoadClassId(Register result, Register object); 743 void LoadClassId(Register result, Register object);
738 744
739 void LoadClassById(Register result, Register class_id); 745 void LoadClassById(Register result, Register class_id);
740 746
741 void LoadClass(Register result, Register object, Register scratch); 747 void LoadClass(Register result, Register object, Register scratch);
742 748
743 void CompareClassId(Register object, intptr_t class_id, Register scratch); 749 void CompareClassId(Register object, intptr_t class_id, Register scratch);
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 } 1049 }
1044 1050
1045 1051
1046 inline void Assembler::EmitOperandSizeOverride() { 1052 inline void Assembler::EmitOperandSizeOverride() {
1047 EmitUint8(0x66); 1053 EmitUint8(0x66);
1048 } 1054 }
1049 1055
1050 } // namespace dart 1056 } // namespace dart
1051 1057
1052 #endif // VM_ASSEMBLER_IA32_H_ 1058 #endif // VM_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698