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

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

Issue 513213002: Generate some intrinsics using our IR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
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 #ifndef VM_ASSEMBLER_ARM64_H_ 5 #ifndef VM_ASSEMBLER_ARM64_H_
6 #define VM_ASSEMBLER_ARM64_H_ 6 #define VM_ASSEMBLER_ARM64_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_arm64.h directly; use assembler.h instead. 9 #error Do not include assembler_arm64.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 // Index of constant pool entries pointing to debugger stubs. 1140 // Index of constant pool entries pointing to debugger stubs.
1141 static const int kICCallBreakpointCPIndex = 5; 1141 static const int kICCallBreakpointCPIndex = 5;
1142 static const int kClosureCallBreakpointCPIndex = 6; 1142 static const int kClosureCallBreakpointCPIndex = 6;
1143 static const int kRuntimeCallBreakpointCPIndex = 7; 1143 static const int kRuntimeCallBreakpointCPIndex = 7;
1144 1144
1145 enum Patchability { 1145 enum Patchability {
1146 kPatchable, 1146 kPatchable,
1147 kNotPatchable, 1147 kNotPatchable,
1148 }; 1148 };
1149 1149
1150 bool allow_constant_pool() const {
1151 return allow_constant_pool_;
1152 }
1153 void set_allow_constant_pool(bool b) {
1154 allow_constant_pool_ = b;
1155 }
1156
1150 void LoadWordFromPoolOffset(Register dst, Register pp, uint32_t offset); 1157 void LoadWordFromPoolOffset(Register dst, Register pp, uint32_t offset);
1151 void LoadWordFromPoolOffsetFixed(Register dst, Register pp, uint32_t offset); 1158 void LoadWordFromPoolOffsetFixed(Register dst, Register pp, uint32_t offset);
1152 intptr_t FindExternalLabel(const ExternalLabel* label, 1159 intptr_t FindExternalLabel(const ExternalLabel* label,
1153 Patchability patchable); 1160 Patchability patchable);
1154 intptr_t FindObject(const Object& obj, Patchability patchable); 1161 intptr_t FindObject(const Object& obj, Patchability patchable);
1155 intptr_t FindImmediate(int64_t imm); 1162 intptr_t FindImmediate(int64_t imm);
1156 bool CanLoadObjectFromPool(const Object& object); 1163 bool CanLoadObjectFromPool(const Object& object);
1157 bool CanLoadImmediateFromPool(int64_t imm, Register pp); 1164 bool CanLoadImmediateFromPool(int64_t imm, Register pp);
1158 void LoadExternalLabel(Register dst, const ExternalLabel* label, 1165 void LoadExternalLabel(Register dst, const ExternalLabel* label,
1159 Patchability patchable, Register pp); 1166 Patchability patchable, Register pp);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 1315
1309 private: 1316 private:
1310 intptr_t pc_offset_; 1317 intptr_t pc_offset_;
1311 const String& comment_; 1318 const String& comment_;
1312 1319
1313 DISALLOW_COPY_AND_ASSIGN(CodeComment); 1320 DISALLOW_COPY_AND_ASSIGN(CodeComment);
1314 }; 1321 };
1315 1322
1316 GrowableArray<CodeComment*> comments_; 1323 GrowableArray<CodeComment*> comments_;
1317 1324
1325 bool allow_constant_pool_;
1326
1318 void AddSubHelper(OperandSize os, bool set_flags, bool subtract, 1327 void AddSubHelper(OperandSize os, bool set_flags, bool subtract,
1319 Register rd, Register rn, Operand o) { 1328 Register rd, Register rn, Operand o) {
1320 ASSERT((rd != R31) && (rn != R31)); 1329 ASSERT((rd != R31) && (rn != R31));
1321 const Register crd = ConcreteRegister(rd); 1330 const Register crd = ConcreteRegister(rd);
1322 const Register crn = ConcreteRegister(rn); 1331 const Register crn = ConcreteRegister(rn);
1323 if (o.type() == Operand::Immediate) { 1332 if (o.type() == Operand::Immediate) {
1324 ASSERT(rn != ZR); 1333 ASSERT(rn != ZR);
1325 EmitAddSubImmOp(subtract ? SUBI : ADDI, crd, crn, o, os, set_flags); 1334 EmitAddSubImmOp(subtract ? SUBI : ADDI, crd, crn, o, os, set_flags);
1326 } else if (o.type() == Operand::Shifted) { 1335 } else if (o.type() == Operand::Shifted) {
1327 ASSERT((rd != CSP) && (rn != CSP)); 1336 ASSERT((rd != CSP) && (rn != CSP));
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 Register value, 1707 Register value,
1699 Label* no_update); 1708 Label* no_update);
1700 1709
1701 DISALLOW_ALLOCATION(); 1710 DISALLOW_ALLOCATION();
1702 DISALLOW_COPY_AND_ASSIGN(Assembler); 1711 DISALLOW_COPY_AND_ASSIGN(Assembler);
1703 }; 1712 };
1704 1713
1705 } // namespace dart 1714 } // namespace dart
1706 1715
1707 #endif // VM_ASSEMBLER_ARM64_H_ 1716 #endif // VM_ASSEMBLER_ARM64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698