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

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

Issue 269343010: Adds single-precision and SIMD load/store to arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « runtime/vm/assembler_arm64_test.cc ('k') | runtime/vm/disassembler_arm64.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) 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_CONSTANTS_ARM64_H_ 5 #ifndef VM_CONSTANTS_ARM64_H_
6 #define VM_CONSTANTS_ARM64_H_ 6 #define VM_CONSTANTS_ARM64_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 enum OperandSize { 212 enum OperandSize {
213 kByte, 213 kByte,
214 kUnsignedByte, 214 kUnsignedByte,
215 kHalfword, 215 kHalfword,
216 kUnsignedHalfword, 216 kUnsignedHalfword,
217 kWord, 217 kWord,
218 kUnsignedWord, 218 kUnsignedWord,
219 kDoubleWord, 219 kDoubleWord,
220 kSWord, 220 kSWord,
221 kDWord, 221 kDWord,
222 kQWord,
222 }; 223 };
223 224
224 static inline int Log2OperandSizeBytes(OperandSize os) { 225 static inline int Log2OperandSizeBytes(OperandSize os) {
225 switch (os) { 226 switch (os) {
226 case kByte: 227 case kByte:
227 case kUnsignedByte: 228 case kUnsignedByte:
228 return 0; 229 return 0;
229 case kHalfword: 230 case kHalfword:
230 case kUnsignedHalfword: 231 case kUnsignedHalfword:
231 return 1; 232 return 1;
232 case kWord: 233 case kWord:
233 case kUnsignedWord: 234 case kUnsignedWord:
234 case kSWord: 235 case kSWord:
235 return 2; 236 return 2;
236 case kDoubleWord: 237 case kDoubleWord:
237 case kDWord: 238 case kDWord:
238 return 3; 239 return 3;
240 case kQWord:
241 return 4;
239 default: 242 default:
240 UNREACHABLE(); 243 UNREACHABLE();
241 break; 244 break;
242 } 245 }
243 return -1; 246 return -1;
244 } 247 }
245 248
249 static inline bool IsSignedOperand(OperandSize os) {
250 switch (os) {
251 case kByte:
252 case kHalfword:
253 case kWord:
254 return true;
255 case kUnsignedByte:
256 case kUnsignedHalfword:
257 case kUnsignedWord:
258 case kDoubleWord:
259 case kSWord:
260 case kDWord:
261 case kQWord:
262 return false;
263 default:
264 UNREACHABLE();
265 break;
266 }
267 return false;
268 }
269
246 // Opcodes from C3 270 // Opcodes from C3
247 // C3.1. 271 // C3.1.
248 enum MainOp { 272 enum MainOp {
249 DPImmediateMask = 0x1c000000, 273 DPImmediateMask = 0x1c000000,
250 DPImmediateFixed = B28, 274 DPImmediateFixed = B28,
251 275
252 CompareBranchMask = 0x1c000000, 276 CompareBranchMask = 0x1c000000,
253 CompareBranchFixed = B28 | B26, 277 CompareBranchFixed = B28 | B26,
254 278
255 LoadStoreMask = B27 | B25, 279 LoadStoreMask = B27 | B25,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 LoadRegLiteralFixed = LoadStoreFixed | B28, 354 LoadRegLiteralFixed = LoadStoreFixed | B28,
331 LDRpc = LoadRegLiteralFixed, 355 LDRpc = LoadRegLiteralFixed,
332 }; 356 };
333 357
334 // C3.3.7-10 358 // C3.3.7-10
335 enum LoadStoreRegOp { 359 enum LoadStoreRegOp {
336 LoadStoreRegMask = 0x3a000000, 360 LoadStoreRegMask = 0x3a000000,
337 LoadStoreRegFixed = LoadStoreFixed | B29 | B28, 361 LoadStoreRegFixed = LoadStoreFixed | B29 | B28,
338 STR = LoadStoreRegFixed, 362 STR = LoadStoreRegFixed,
339 LDR = LoadStoreRegFixed | B22, 363 LDR = LoadStoreRegFixed | B22,
364 LDRS = LoadStoreRegFixed | B23,
340 FSTR = STR | B26, 365 FSTR = STR | B26,
341 FLDR = LDR | B26, 366 FLDR = LDR | B26,
367 FSTRQ = STR | B26 | B23,
368 FLDRQ = LDR | B26 | B23,
342 }; 369 };
343 370
344 // C3.4.1 371 // C3.4.1
345 enum AddSubImmOp { 372 enum AddSubImmOp {
346 AddSubImmMask = 0x1f000000, 373 AddSubImmMask = 0x1f000000,
347 AddSubImmFixed = DPImmediateFixed | B24, 374 AddSubImmFixed = DPImmediateFixed | B24,
348 ADDI = AddSubImmFixed, 375 ADDI = AddSubImmFixed,
349 SUBI = AddSubImmFixed | B30, 376 SUBI = AddSubImmFixed | B30,
350 }; 377 };
351 378
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 }; 462 };
436 463
437 // C3.6.25 464 // C3.6.25
438 enum FPOneSourceOp { 465 enum FPOneSourceOp {
439 FPOneSourceMask = 0x5f207c00, 466 FPOneSourceMask = 0x5f207c00,
440 FPOneSourceFixed = FPFixed | B21 | B14, 467 FPOneSourceFixed = FPFixed | B21 | B14,
441 FMOVDD = FPOneSourceFixed | B22, 468 FMOVDD = FPOneSourceFixed | B22,
442 FABSD = FPOneSourceFixed | B22 | B15, 469 FABSD = FPOneSourceFixed | B22 | B15,
443 FNEGD = FPOneSourceFixed | B22 | B16, 470 FNEGD = FPOneSourceFixed | B22 | B16,
444 FSQRTD = FPOneSourceFixed | B22 | B16 | B15, 471 FSQRTD = FPOneSourceFixed | B22 | B16 | B15,
472 FCVTDS = FPOneSourceFixed | B15 | B17,
473 FCVTSD = FPOneSourceFixed | B22 | B17,
445 }; 474 };
446 475
447 // C3.6.26 476 // C3.6.26
448 enum FPTwoSourceOp { 477 enum FPTwoSourceOp {
449 FPTwoSourceMask = 0xff200c00, 478 FPTwoSourceMask = 0xff200c00,
450 FPTwoSourceFixed = FPFixed | B21 | B11, 479 FPTwoSourceFixed = FPFixed | B21 | B11,
451 FMULD = FPTwoSourceFixed | B22, 480 FMULD = FPTwoSourceFixed | B22,
452 FDIVD = FPTwoSourceFixed | B22 | B12, 481 FDIVD = FPTwoSourceFixed | B22 | B12,
453 FADDD = FPTwoSourceFixed | B22 | B13, 482 FADDD = FPTwoSourceFixed | B22 | B13,
454 FSUBD = FPTwoSourceFixed | B22 | B13 | B12, 483 FSUBD = FPTwoSourceFixed | B22 | B13 | B12,
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } 939 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
911 940
912 private: 941 private:
913 DISALLOW_ALLOCATION(); 942 DISALLOW_ALLOCATION();
914 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); 943 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
915 }; 944 };
916 945
917 } // namespace dart 946 } // namespace dart
918 947
919 #endif // VM_CONSTANTS_ARM64_H_ 948 #endif // VM_CONSTANTS_ARM64_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64_test.cc ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698