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

Side by Side Diff: src/arm64/decoder-arm64-inl.h

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/decoder-arm64.cc ('k') | src/arm64/delayed-masm-arm64.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ARM64_DECODER_ARM64_INL_H_ 5 #ifndef V8_ARM64_DECODER_ARM64_INL_H_
6 #define V8_ARM64_DECODER_ARM64_INL_H_ 6 #define V8_ARM64_DECODER_ARM64_INL_H_
7 7
8 #include "src/arm64/decoder-arm64.h" 8 #include "src/arm64/decoder-arm64.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/utils.h" 10 #include "src/utils.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Advanced SIMD. 89 // Advanced SIMD.
90 case 0xE: 90 case 0xE:
91 case 0xF: DecodeFP(instr); break; 91 case 0xF: DecodeFP(instr); break;
92 } 92 }
93 } 93 }
94 } 94 }
95 95
96 96
97 template<typename V> 97 template<typename V>
98 void Decoder<V>::DecodePCRelAddressing(Instruction* instr) { 98 void Decoder<V>::DecodePCRelAddressing(Instruction* instr) {
99 ASSERT(instr->Bits(27, 24) == 0x0); 99 DCHECK(instr->Bits(27, 24) == 0x0);
100 // We know bit 28 is set, as <b28:b27> = 0 is filtered out at the top level 100 // We know bit 28 is set, as <b28:b27> = 0 is filtered out at the top level
101 // decode. 101 // decode.
102 ASSERT(instr->Bit(28) == 0x1); 102 DCHECK(instr->Bit(28) == 0x1);
103 V::VisitPCRelAddressing(instr); 103 V::VisitPCRelAddressing(instr);
104 } 104 }
105 105
106 106
107 template<typename V> 107 template<typename V>
108 void Decoder<V>::DecodeBranchSystemException(Instruction* instr) { 108 void Decoder<V>::DecodeBranchSystemException(Instruction* instr) {
109 ASSERT((instr->Bits(27, 24) == 0x4) || 109 DCHECK((instr->Bits(27, 24) == 0x4) ||
110 (instr->Bits(27, 24) == 0x5) || 110 (instr->Bits(27, 24) == 0x5) ||
111 (instr->Bits(27, 24) == 0x6) || 111 (instr->Bits(27, 24) == 0x6) ||
112 (instr->Bits(27, 24) == 0x7) ); 112 (instr->Bits(27, 24) == 0x7) );
113 113
114 switch (instr->Bits(31, 29)) { 114 switch (instr->Bits(31, 29)) {
115 case 0: 115 case 0:
116 case 4: { 116 case 4: {
117 V::VisitUnconditionalBranch(instr); 117 V::VisitUnconditionalBranch(instr);
118 break; 118 break;
119 } 119 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 case 7: { 201 case 7: {
202 V::VisitUnallocated(instr); 202 V::VisitUnallocated(instr);
203 break; 203 break;
204 } 204 }
205 } 205 }
206 } 206 }
207 207
208 208
209 template<typename V> 209 template<typename V>
210 void Decoder<V>::DecodeLoadStore(Instruction* instr) { 210 void Decoder<V>::DecodeLoadStore(Instruction* instr) {
211 ASSERT((instr->Bits(27, 24) == 0x8) || 211 DCHECK((instr->Bits(27, 24) == 0x8) ||
212 (instr->Bits(27, 24) == 0x9) || 212 (instr->Bits(27, 24) == 0x9) ||
213 (instr->Bits(27, 24) == 0xC) || 213 (instr->Bits(27, 24) == 0xC) ||
214 (instr->Bits(27, 24) == 0xD) ); 214 (instr->Bits(27, 24) == 0xD) );
215 215
216 if (instr->Bit(24) == 0) { 216 if (instr->Bit(24) == 0) {
217 if (instr->Bit(28) == 0) { 217 if (instr->Bit(28) == 0) {
218 if (instr->Bit(29) == 0) { 218 if (instr->Bit(29) == 0) {
219 if (instr->Bit(26) == 0) { 219 if (instr->Bit(26) == 0) {
220 // TODO(all): VisitLoadStoreExclusive. 220 // TODO(all): VisitLoadStoreExclusive.
221 V::VisitUnimplemented(instr); 221 V::VisitUnimplemented(instr);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 V::VisitLoadStoreUnsignedOffset(instr); 321 V::VisitLoadStoreUnsignedOffset(instr);
322 } 322 }
323 } 323 }
324 } 324 }
325 } 325 }
326 } 326 }
327 327
328 328
329 template<typename V> 329 template<typename V>
330 void Decoder<V>::DecodeLogical(Instruction* instr) { 330 void Decoder<V>::DecodeLogical(Instruction* instr) {
331 ASSERT(instr->Bits(27, 24) == 0x2); 331 DCHECK(instr->Bits(27, 24) == 0x2);
332 332
333 if (instr->Mask(0x80400000) == 0x00400000) { 333 if (instr->Mask(0x80400000) == 0x00400000) {
334 V::VisitUnallocated(instr); 334 V::VisitUnallocated(instr);
335 } else { 335 } else {
336 if (instr->Bit(23) == 0) { 336 if (instr->Bit(23) == 0) {
337 V::VisitLogicalImmediate(instr); 337 V::VisitLogicalImmediate(instr);
338 } else { 338 } else {
339 if (instr->Bits(30, 29) == 0x1) { 339 if (instr->Bits(30, 29) == 0x1) {
340 V::VisitUnallocated(instr); 340 V::VisitUnallocated(instr);
341 } else { 341 } else {
342 V::VisitMoveWideImmediate(instr); 342 V::VisitMoveWideImmediate(instr);
343 } 343 }
344 } 344 }
345 } 345 }
346 } 346 }
347 347
348 348
349 template<typename V> 349 template<typename V>
350 void Decoder<V>::DecodeBitfieldExtract(Instruction* instr) { 350 void Decoder<V>::DecodeBitfieldExtract(Instruction* instr) {
351 ASSERT(instr->Bits(27, 24) == 0x3); 351 DCHECK(instr->Bits(27, 24) == 0x3);
352 352
353 if ((instr->Mask(0x80400000) == 0x80000000) || 353 if ((instr->Mask(0x80400000) == 0x80000000) ||
354 (instr->Mask(0x80400000) == 0x00400000) || 354 (instr->Mask(0x80400000) == 0x00400000) ||
355 (instr->Mask(0x80008000) == 0x00008000)) { 355 (instr->Mask(0x80008000) == 0x00008000)) {
356 V::VisitUnallocated(instr); 356 V::VisitUnallocated(instr);
357 } else if (instr->Bit(23) == 0) { 357 } else if (instr->Bit(23) == 0) {
358 if ((instr->Mask(0x80200000) == 0x00200000) || 358 if ((instr->Mask(0x80200000) == 0x00200000) ||
359 (instr->Mask(0x60000000) == 0x60000000)) { 359 (instr->Mask(0x60000000) == 0x60000000)) {
360 V::VisitUnallocated(instr); 360 V::VisitUnallocated(instr);
361 } else { 361 } else {
362 V::VisitBitfield(instr); 362 V::VisitBitfield(instr);
363 } 363 }
364 } else { 364 } else {
365 if ((instr->Mask(0x60200000) == 0x00200000) || 365 if ((instr->Mask(0x60200000) == 0x00200000) ||
366 (instr->Mask(0x60000000) != 0x00000000)) { 366 (instr->Mask(0x60000000) != 0x00000000)) {
367 V::VisitUnallocated(instr); 367 V::VisitUnallocated(instr);
368 } else { 368 } else {
369 V::VisitExtract(instr); 369 V::VisitExtract(instr);
370 } 370 }
371 } 371 }
372 } 372 }
373 373
374 374
375 template<typename V> 375 template<typename V>
376 void Decoder<V>::DecodeAddSubImmediate(Instruction* instr) { 376 void Decoder<V>::DecodeAddSubImmediate(Instruction* instr) {
377 ASSERT(instr->Bits(27, 24) == 0x1); 377 DCHECK(instr->Bits(27, 24) == 0x1);
378 if (instr->Bit(23) == 1) { 378 if (instr->Bit(23) == 1) {
379 V::VisitUnallocated(instr); 379 V::VisitUnallocated(instr);
380 } else { 380 } else {
381 V::VisitAddSubImmediate(instr); 381 V::VisitAddSubImmediate(instr);
382 } 382 }
383 } 383 }
384 384
385 385
386 template<typename V> 386 template<typename V>
387 void Decoder<V>::DecodeDataProcessing(Instruction* instr) { 387 void Decoder<V>::DecodeDataProcessing(Instruction* instr) {
388 ASSERT((instr->Bits(27, 24) == 0xA) || 388 DCHECK((instr->Bits(27, 24) == 0xA) ||
389 (instr->Bits(27, 24) == 0xB) ); 389 (instr->Bits(27, 24) == 0xB) );
390 390
391 if (instr->Bit(24) == 0) { 391 if (instr->Bit(24) == 0) {
392 if (instr->Bit(28) == 0) { 392 if (instr->Bit(28) == 0) {
393 if (instr->Mask(0x80008000) == 0x00008000) { 393 if (instr->Mask(0x80008000) == 0x00008000) {
394 V::VisitUnallocated(instr); 394 V::VisitUnallocated(instr);
395 } else { 395 } else {
396 V::VisitLogicalShifted(instr); 396 V::VisitLogicalShifted(instr);
397 } 397 }
398 } else { 398 } else {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } else { 494 } else {
495 V::VisitDataProcessing3Source(instr); 495 V::VisitDataProcessing3Source(instr);
496 } 496 }
497 } 497 }
498 } 498 }
499 } 499 }
500 500
501 501
502 template<typename V> 502 template<typename V>
503 void Decoder<V>::DecodeFP(Instruction* instr) { 503 void Decoder<V>::DecodeFP(Instruction* instr) {
504 ASSERT((instr->Bits(27, 24) == 0xE) || 504 DCHECK((instr->Bits(27, 24) == 0xE) ||
505 (instr->Bits(27, 24) == 0xF) ); 505 (instr->Bits(27, 24) == 0xF) );
506 506
507 if (instr->Bit(28) == 0) { 507 if (instr->Bit(28) == 0) {
508 DecodeAdvSIMDDataProcessing(instr); 508 DecodeAdvSIMDDataProcessing(instr);
509 } else { 509 } else {
510 if (instr->Bit(29) == 1) { 510 if (instr->Bit(29) == 1) {
511 V::VisitUnallocated(instr); 511 V::VisitUnallocated(instr);
512 } else { 512 } else {
513 if (instr->Bits(31, 30) == 0x3) { 513 if (instr->Bits(31, 30) == 0x3) {
514 V::VisitUnallocated(instr); 514 V::VisitUnallocated(instr);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 V::VisitFPConditionalSelect(instr); 607 V::VisitFPConditionalSelect(instr);
608 break; 608 break;
609 } 609 }
610 default: UNREACHABLE(); 610 default: UNREACHABLE();
611 } 611 }
612 } 612 }
613 } 613 }
614 } 614 }
615 } else { 615 } else {
616 // Bit 30 == 1 has been handled earlier. 616 // Bit 30 == 1 has been handled earlier.
617 ASSERT(instr->Bit(30) == 0); 617 DCHECK(instr->Bit(30) == 0);
618 if (instr->Mask(0xA0800000) != 0) { 618 if (instr->Mask(0xA0800000) != 0) {
619 V::VisitUnallocated(instr); 619 V::VisitUnallocated(instr);
620 } else { 620 } else {
621 V::VisitFPDataProcessing3Source(instr); 621 V::VisitFPDataProcessing3Source(instr);
622 } 622 }
623 } 623 }
624 } 624 }
625 } 625 }
626 } 626 }
627 } 627 }
628 628
629 629
630 template<typename V> 630 template<typename V>
631 void Decoder<V>::DecodeAdvSIMDLoadStore(Instruction* instr) { 631 void Decoder<V>::DecodeAdvSIMDLoadStore(Instruction* instr) {
632 // TODO(all): Implement Advanced SIMD load/store instruction decode. 632 // TODO(all): Implement Advanced SIMD load/store instruction decode.
633 ASSERT(instr->Bits(29, 25) == 0x6); 633 DCHECK(instr->Bits(29, 25) == 0x6);
634 V::VisitUnimplemented(instr); 634 V::VisitUnimplemented(instr);
635 } 635 }
636 636
637 637
638 template<typename V> 638 template<typename V>
639 void Decoder<V>::DecodeAdvSIMDDataProcessing(Instruction* instr) { 639 void Decoder<V>::DecodeAdvSIMDDataProcessing(Instruction* instr) {
640 // TODO(all): Implement Advanced SIMD data processing instruction decode. 640 // TODO(all): Implement Advanced SIMD data processing instruction decode.
641 ASSERT(instr->Bits(27, 25) == 0x7); 641 DCHECK(instr->Bits(27, 25) == 0x7);
642 V::VisitUnimplemented(instr); 642 V::VisitUnimplemented(instr);
643 } 643 }
644 644
645 645
646 } } // namespace v8::internal 646 } } // namespace v8::internal
647 647
648 #endif // V8_ARM64_DECODER_ARM64_INL_H_ 648 #endif // V8_ARM64_DECODER_ARM64_INL_H_
OLDNEW
« no previous file with comments | « src/arm64/decoder-arm64.cc ('k') | src/arm64/delayed-masm-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698