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

Side by Side Diff: src/mips64/constants-mips64.h

Issue 1145223002: MIPS: Add float instructions and test coverage, part two (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 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
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | src/mips64/constants-mips64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS_CONSTANTS_H_ 5 #ifndef V8_MIPS_CONSTANTS_H_
6 #define V8_MIPS_CONSTANTS_H_ 6 #define V8_MIPS_CONSTANTS_H_
7 7
8 // UNIMPLEMENTED_ macro for MIPS. 8 // UNIMPLEMENTED_ macro for MIPS.
9 #ifdef DEBUG 9 #ifdef DEBUG
10 #define UNIMPLEMENTED_MIPS() \ 10 #define UNIMPLEMENTED_MIPS() \
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // SPECIAL3 Encoding of Function Field. 436 // SPECIAL3 Encoding of Function Field.
437 EXT = ((0 << 3) + 0), 437 EXT = ((0 << 3) + 0),
438 DEXTM = ((0 << 3) + 1), 438 DEXTM = ((0 << 3) + 1),
439 DEXTU = ((0 << 3) + 2), 439 DEXTU = ((0 << 3) + 2),
440 DEXT = ((0 << 3) + 3), 440 DEXT = ((0 << 3) + 3),
441 INS = ((0 << 3) + 4), 441 INS = ((0 << 3) + 4),
442 DINSM = ((0 << 3) + 5), 442 DINSM = ((0 << 3) + 5),
443 DINSU = ((0 << 3) + 6), 443 DINSU = ((0 << 3) + 6),
444 DINS = ((0 << 3) + 7), 444 DINS = ((0 << 3) + 7),
445 445
446 BITSWAP = ((4 << 3) + 0),
447 DBITSWAP = ((4 << 3) + 4),
446 DSBH = ((4 << 3) + 4), 448 DSBH = ((4 << 3) + 4),
447 449
450 // SPECIAL3 Encoding of sa Field.
451 DBITSWAP_SA = ((0 << 3) + 0) << kSaShift,
452
448 // REGIMM encoding of rt Field. 453 // REGIMM encoding of rt Field.
449 BLTZ = ((0 << 3) + 0) << 16, 454 BLTZ = ((0 << 3) + 0) << 16,
450 BGEZ = ((0 << 3) + 1) << 16, 455 BGEZ = ((0 << 3) + 1) << 16,
451 BLTZAL = ((2 << 3) + 0) << 16, 456 BLTZAL = ((2 << 3) + 0) << 16,
452 BGEZAL = ((2 << 3) + 1) << 16, 457 BGEZAL = ((2 << 3) + 1) << 16,
453 BGEZALL = ((2 << 3) + 3) << 16, 458 BGEZALL = ((2 << 3) + 3) << 16,
454 DAHI = ((0 << 3) + 6) << 16, 459 DAHI = ((0 << 3) + 6) << 16,
455 DATI = ((3 << 3) + 6) << 16, 460 DATI = ((3 << 3) + 6) << 16,
456 461
457 // COP1 Encoding of rs Field. 462 // COP1 Encoding of rs Field.
458 MFC1 = ((0 << 3) + 0) << 21, 463 MFC1 = ((0 << 3) + 0) << 21,
459 DMFC1 = ((0 << 3) + 1) << 21, 464 DMFC1 = ((0 << 3) + 1) << 21,
460 CFC1 = ((0 << 3) + 2) << 21, 465 CFC1 = ((0 << 3) + 2) << 21,
461 MFHC1 = ((0 << 3) + 3) << 21, 466 MFHC1 = ((0 << 3) + 3) << 21,
462 MTC1 = ((0 << 3) + 4) << 21, 467 MTC1 = ((0 << 3) + 4) << 21,
463 DMTC1 = ((0 << 3) + 5) << 21, 468 DMTC1 = ((0 << 3) + 5) << 21,
464 CTC1 = ((0 << 3) + 6) << 21, 469 CTC1 = ((0 << 3) + 6) << 21,
465 MTHC1 = ((0 << 3) + 7) << 21, 470 MTHC1 = ((0 << 3) + 7) << 21,
466 BC1 = ((1 << 3) + 0) << 21, 471 BC1 = ((1 << 3) + 0) << 21,
467 S = ((2 << 3) + 0) << 21, 472 S = ((2 << 3) + 0) << 21,
468 D = ((2 << 3) + 1) << 21, 473 D = ((2 << 3) + 1) << 21,
469 W = ((2 << 3) + 4) << 21, 474 W = ((2 << 3) + 4) << 21,
470 L = ((2 << 3) + 5) << 21, 475 L = ((2 << 3) + 5) << 21,
471 PS = ((2 << 3) + 6) << 21, 476 PS = ((2 << 3) + 6) << 21,
472 // COP1 Encoding of Function Field When rs=S. 477 // COP1 Encoding of Function Field When rs=S.
478
473 ADD_S = ((0 << 3) + 0), 479 ADD_S = ((0 << 3) + 0),
474 SUB_S = ((0 << 3) + 1), 480 SUB_S = ((0 << 3) + 1),
475 MUL_S = ((0 << 3) + 2), 481 MUL_S = ((0 << 3) + 2),
476 DIV_S = ((0 << 3) + 3), 482 DIV_S = ((0 << 3) + 3),
477 ABS_S = ((0 << 3) + 5), 483 ABS_S = ((0 << 3) + 5),
478 SQRT_S = ((0 << 3) + 4), 484 SQRT_S = ((0 << 3) + 4),
479 MOV_S = ((0 << 3) + 6), 485 MOV_S = ((0 << 3) + 6),
480 NEG_S = ((0 << 3) + 7), 486 NEG_S = ((0 << 3) + 7),
481 ROUND_L_S = ((1 << 3) + 0), 487 ROUND_L_S = ((1 << 3) + 0),
482 TRUNC_L_S = ((1 << 3) + 1), 488 TRUNC_L_S = ((1 << 3) + 1),
483 CEIL_L_S = ((1 << 3) + 2), 489 CEIL_L_S = ((1 << 3) + 2),
484 FLOOR_L_S = ((1 << 3) + 3), 490 FLOOR_L_S = ((1 << 3) + 3),
485 ROUND_W_S = ((1 << 3) + 4), 491 ROUND_W_S = ((1 << 3) + 4),
486 TRUNC_W_S = ((1 << 3) + 5), 492 TRUNC_W_S = ((1 << 3) + 5),
487 CEIL_W_S = ((1 << 3) + 6), 493 CEIL_W_S = ((1 << 3) + 6),
488 FLOOR_W_S = ((1 << 3) + 7), 494 FLOOR_W_S = ((1 << 3) + 7),
489 RECIP_S = ((2 << 3) + 5), 495 RECIP_S = ((2 << 3) + 5),
490 RSQRT_S = ((2 << 3) + 6), 496 RSQRT_S = ((2 << 3) + 6),
497 CLASS_S = ((3 << 3) + 3),
491 CVT_D_S = ((4 << 3) + 1), 498 CVT_D_S = ((4 << 3) + 1),
492 CVT_W_S = ((4 << 3) + 4), 499 CVT_W_S = ((4 << 3) + 4),
493 CVT_L_S = ((4 << 3) + 5), 500 CVT_L_S = ((4 << 3) + 5),
494 CVT_PS_S = ((4 << 3) + 6), 501 CVT_PS_S = ((4 << 3) + 6),
495 // COP1 Encoding of Function Field When rs=D. 502 // COP1 Encoding of Function Field When rs=D.
496 ADD_D = ((0 << 3) + 0), 503 ADD_D = ((0 << 3) + 0),
497 SUB_D = ((0 << 3) + 1), 504 SUB_D = ((0 << 3) + 1),
498 MUL_D = ((0 << 3) + 2), 505 MUL_D = ((0 << 3) + 2),
499 DIV_D = ((0 << 3) + 3), 506 DIV_D = ((0 << 3) + 3),
500 SQRT_D = ((0 << 3) + 4), 507 SQRT_D = ((0 << 3) + 4),
501 ABS_D = ((0 << 3) + 5), 508 ABS_D = ((0 << 3) + 5),
502 MOV_D = ((0 << 3) + 6), 509 MOV_D = ((0 << 3) + 6),
503 NEG_D = ((0 << 3) + 7), 510 NEG_D = ((0 << 3) + 7),
504 ROUND_L_D = ((1 << 3) + 0), 511 ROUND_L_D = ((1 << 3) + 0),
505 TRUNC_L_D = ((1 << 3) + 1), 512 TRUNC_L_D = ((1 << 3) + 1),
506 CEIL_L_D = ((1 << 3) + 2), 513 CEIL_L_D = ((1 << 3) + 2),
507 FLOOR_L_D = ((1 << 3) + 3), 514 FLOOR_L_D = ((1 << 3) + 3),
508 ROUND_W_D = ((1 << 3) + 4), 515 ROUND_W_D = ((1 << 3) + 4),
509 TRUNC_W_D = ((1 << 3) + 5), 516 TRUNC_W_D = ((1 << 3) + 5),
510 CEIL_W_D = ((1 << 3) + 6), 517 CEIL_W_D = ((1 << 3) + 6),
511 FLOOR_W_D = ((1 << 3) + 7), 518 FLOOR_W_D = ((1 << 3) + 7),
512 RECIP_D = ((2 << 3) + 5), 519 RECIP_D = ((2 << 3) + 5),
513 RSQRT_D = ((2 << 3) + 6), 520 RSQRT_D = ((2 << 3) + 6),
521 CLASS_D = ((3 << 3) + 3),
522 MIN = ((3 << 3) + 4),
523 MINA = ((3 << 3) + 5),
524 MAX = ((3 << 3) + 6),
525 MAXA = ((3 << 3) + 7),
514 CVT_S_D = ((4 << 3) + 0), 526 CVT_S_D = ((4 << 3) + 0),
515 CVT_W_D = ((4 << 3) + 4), 527 CVT_W_D = ((4 << 3) + 4),
516 CVT_L_D = ((4 << 3) + 5), 528 CVT_L_D = ((4 << 3) + 5),
517 C_F_D = ((6 << 3) + 0), 529 C_F_D = ((6 << 3) + 0),
518 C_UN_D = ((6 << 3) + 1), 530 C_UN_D = ((6 << 3) + 1),
519 C_EQ_D = ((6 << 3) + 2), 531 C_EQ_D = ((6 << 3) + 2),
520 C_UEQ_D = ((6 << 3) + 3), 532 C_UEQ_D = ((6 << 3) + 3),
521 C_OLT_D = ((6 << 3) + 4), 533 C_OLT_D = ((6 << 3) + 4),
522 C_ULT_D = ((6 << 3) + 5), 534 C_ULT_D = ((6 << 3) + 5),
523 C_OLE_D = ((6 << 3) + 6), 535 C_OLE_D = ((6 << 3) + 6),
524 C_ULE_D = ((6 << 3) + 7), 536 C_ULE_D = ((6 << 3) + 7),
537
525 // COP1 Encoding of Function Field When rs=W or L. 538 // COP1 Encoding of Function Field When rs=W or L.
526 CVT_S_W = ((4 << 3) + 0), 539 CVT_S_W = ((4 << 3) + 0),
527 CVT_D_W = ((4 << 3) + 1), 540 CVT_D_W = ((4 << 3) + 1),
528 CVT_S_L = ((4 << 3) + 0), 541 CVT_S_L = ((4 << 3) + 0),
529 CVT_D_L = ((4 << 3) + 1), 542 CVT_D_L = ((4 << 3) + 1),
530 BC1EQZ = ((2 << 2) + 1) << 21, 543 BC1EQZ = ((2 << 2) + 1) << 21,
531 BC1NEZ = ((3 << 2) + 1) << 21, 544 BC1NEZ = ((3 << 2) + 1) << 21,
532 // COP1 CMP positive predicates Bit 5..4 = 00. 545 // COP1 CMP positive predicates Bit 5..4 = 00.
533 CMP_AF = ((0 << 3) + 0), 546 CMP_AF = ((0 << 3) + 0),
534 CMP_UN = ((0 << 3) + 1), 547 CMP_UN = ((0 << 3) + 1),
(...skipping 22 matching lines...) Expand all
557 CMP_OGT = ((2 << 3) + 7), // Reserved, not implemented. 570 CMP_OGT = ((2 << 3) + 7), // Reserved, not implemented.
558 CMP_SAT = ((3 << 3) + 0), // Reserved, not implemented. 571 CMP_SAT = ((3 << 3) + 0), // Reserved, not implemented.
559 CMP_SOR = ((3 << 3) + 1), 572 CMP_SOR = ((3 << 3) + 1),
560 CMP_SUNE = ((3 << 3) + 2), 573 CMP_SUNE = ((3 << 3) + 2),
561 CMP_SNE = ((3 << 3) + 3), 574 CMP_SNE = ((3 << 3) + 3),
562 CMP_SUGE = ((3 << 3) + 4), // Reserved, not implemented. 575 CMP_SUGE = ((3 << 3) + 4), // Reserved, not implemented.
563 CMP_SOGE = ((3 << 3) + 5), // Reserved, not implemented. 576 CMP_SOGE = ((3 << 3) + 5), // Reserved, not implemented.
564 CMP_SUGT = ((3 << 3) + 6), // Reserved, not implemented. 577 CMP_SUGT = ((3 << 3) + 6), // Reserved, not implemented.
565 CMP_SOGT = ((3 << 3) + 7), // Reserved, not implemented. 578 CMP_SOGT = ((3 << 3) + 7), // Reserved, not implemented.
566 579
567 MIN = ((3 << 3) + 4),
568 MINA = ((3 << 3) + 5),
569 MAX = ((3 << 3) + 6),
570 MAXA = ((3 << 3) + 7),
571 SEL = ((2 << 3) + 0), 580 SEL = ((2 << 3) + 0),
572 MOVF = ((2 << 3) + 1), // Function field for MOVT.fmt and MOVF.fmt 581 MOVF = ((2 << 3) + 1), // Function field for MOVT.fmt and MOVF.fmt
573 MOVZ_C = ((2 << 3) + 2), // COP1 on FPR registers. 582 MOVZ_C = ((2 << 3) + 2), // COP1 on FPR registers.
574 MOVN_C = ((2 << 3) + 3), // COP1 on FPR registers. 583 MOVN_C = ((2 << 3) + 3), // COP1 on FPR registers.
575 SELEQZ_C = ((2 << 3) + 4), // COP1 on FPR registers. 584 SELEQZ_C = ((2 << 3) + 4), // COP1 on FPR registers.
576 SELNEZ_C = ((2 << 3) + 7), // COP1 on FPR registers. 585 SELNEZ_C = ((2 << 3) + 7), // COP1 on FPR registers.
577 586
578 // COP1 Encoding of Function Field When rs=PS. 587 // COP1 Encoding of Function Field When rs=PS.
579 // COP1X Encoding of Function Field. 588 // COP1X Encoding of Function Field.
580 MADD_D = ((4 << 3) + 1), 589 MADD_D = ((4 << 3) + 1),
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 default: 714 default:
706 return cc; 715 return cc;
707 } 716 }
708 } 717 }
709 718
710 719
711 // ----- Coprocessor conditions. 720 // ----- Coprocessor conditions.
712 enum FPUCondition { 721 enum FPUCondition {
713 kNoFPUCondition = -1, 722 kNoFPUCondition = -1,
714 723
715 F = 0, // False. 724 F = 0x00, // False.
716 UN = 1, // Unordered. 725 UN = 0x01, // Unordered.
717 EQ = 2, // Equal. 726 EQ = 0x02, // Equal.
718 UEQ = 3, // Unordered or Equal. 727 UEQ = 0x03, // Unordered or Equal.
719 OLT = 4, // Ordered or Less Than. 728 OLT = 0x04, // Ordered or Less Than, on Mips release < 6.
720 ULT = 5, // Unordered or Less Than. 729 LT = 0x04, // Ordered or Less Than, on Mips release >= 6.
721 OLE = 6, // Ordered or Less Than or Equal. 730 ULT = 0x05, // Unordered or Less Than.
722 ULE = 7 // Unordered or Less Than or Equal. 731 OLE = 0x06, // Ordered or Less Than or Equal, on Mips release < 6.
732 LE = 0x06, // Ordered or Less Than or Equal, on Mips release >= 6.
733 ULE = 0x07, // Unordered or Less Than or Equal.
734
735 // Following constants are available on Mips release >= 6 only.
736 ORD = 0x11, // Ordered, on Mips release >= 6.
737 UNE = 0x12, // Not equal, on Mips release >= 6.
738 NE = 0x13, // Ordered Greater Than or Less Than. on Mips >= 6 only.
723 }; 739 };
724 740
725 741
726 // FPU rounding modes. 742 // FPU rounding modes.
727 enum FPURoundingMode { 743 enum FPURoundingMode {
728 RN = 0 << 0, // Round to Nearest. 744 RN = 0 << 0, // Round to Nearest.
729 RZ = 1 << 0, // Round towards zero. 745 RZ = 1 << 0, // Round towards zero.
730 RP = 2 << 0, // Round towards Plus Infinity. 746 RP = 2 << 0, // Round towards Plus Infinity.
731 RM = 3 << 0, // Round towards Minus Infinity. 747 RM = 3 << 0, // Round towards Minus Infinity.
732 748
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 // TODO(plind): below should be based on kPointerSize 1010 // TODO(plind): below should be based on kPointerSize
995 // TODO(plind): find all usages and remove the needless instructions for n64. 1011 // TODO(plind): find all usages and remove the needless instructions for n64.
996 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2; 1012 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2;
997 1013
998 const int kInvalidStackOffset = -1; 1014 const int kInvalidStackOffset = -1;
999 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; 1015 const int kBranchReturnOffset = 2 * Instruction::kInstrSize;
1000 1016
1001 } } // namespace v8::internal 1017 } } // namespace v8::internal
1002 1018
1003 #endif // #ifndef V8_MIPS_CONSTANTS_H_ 1019 #endif // #ifndef V8_MIPS_CONSTANTS_H_
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | src/mips64/constants-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698