OLD | NEW |
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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 DMTC1 = ((0 << 3) + 5) << 21, | 463 DMTC1 = ((0 << 3) + 5) << 21, |
464 CTC1 = ((0 << 3) + 6) << 21, | 464 CTC1 = ((0 << 3) + 6) << 21, |
465 MTHC1 = ((0 << 3) + 7) << 21, | 465 MTHC1 = ((0 << 3) + 7) << 21, |
466 BC1 = ((1 << 3) + 0) << 21, | 466 BC1 = ((1 << 3) + 0) << 21, |
467 S = ((2 << 3) + 0) << 21, | 467 S = ((2 << 3) + 0) << 21, |
468 D = ((2 << 3) + 1) << 21, | 468 D = ((2 << 3) + 1) << 21, |
469 W = ((2 << 3) + 4) << 21, | 469 W = ((2 << 3) + 4) << 21, |
470 L = ((2 << 3) + 5) << 21, | 470 L = ((2 << 3) + 5) << 21, |
471 PS = ((2 << 3) + 6) << 21, | 471 PS = ((2 << 3) + 6) << 21, |
472 // COP1 Encoding of Function Field When rs=S. | 472 // COP1 Encoding of Function Field When rs=S. |
| 473 ADD_S = ((0 << 3) + 0), |
| 474 SUB_S = ((0 << 3) + 1), |
| 475 MUL_S = ((0 << 3) + 2), |
| 476 DIV_S = ((0 << 3) + 3), |
| 477 ABS_S = ((0 << 3) + 5), |
| 478 SQRT_S = ((0 << 3) + 4), |
| 479 MOV_S = ((0 << 3) + 6), |
| 480 NEG_S = ((0 << 3) + 7), |
473 ROUND_L_S = ((1 << 3) + 0), | 481 ROUND_L_S = ((1 << 3) + 0), |
474 TRUNC_L_S = ((1 << 3) + 1), | 482 TRUNC_L_S = ((1 << 3) + 1), |
475 CEIL_L_S = ((1 << 3) + 2), | 483 CEIL_L_S = ((1 << 3) + 2), |
476 FLOOR_L_S = ((1 << 3) + 3), | 484 FLOOR_L_S = ((1 << 3) + 3), |
477 ROUND_W_S = ((1 << 3) + 4), | 485 ROUND_W_S = ((1 << 3) + 4), |
478 TRUNC_W_S = ((1 << 3) + 5), | 486 TRUNC_W_S = ((1 << 3) + 5), |
479 CEIL_W_S = ((1 << 3) + 6), | 487 CEIL_W_S = ((1 << 3) + 6), |
480 FLOOR_W_S = ((1 << 3) + 7), | 488 FLOOR_W_S = ((1 << 3) + 7), |
| 489 RECIP_S = ((2 << 3) + 5), |
| 490 RSQRT_S = ((2 << 3) + 6), |
481 CVT_D_S = ((4 << 3) + 1), | 491 CVT_D_S = ((4 << 3) + 1), |
482 CVT_W_S = ((4 << 3) + 4), | 492 CVT_W_S = ((4 << 3) + 4), |
483 CVT_L_S = ((4 << 3) + 5), | 493 CVT_L_S = ((4 << 3) + 5), |
484 CVT_PS_S = ((4 << 3) + 6), | 494 CVT_PS_S = ((4 << 3) + 6), |
485 // COP1 Encoding of Function Field When rs=D. | 495 // COP1 Encoding of Function Field When rs=D. |
486 ADD_D = ((0 << 3) + 0), | 496 ADD_D = ((0 << 3) + 0), |
487 SUB_D = ((0 << 3) + 1), | 497 SUB_D = ((0 << 3) + 1), |
488 MUL_D = ((0 << 3) + 2), | 498 MUL_D = ((0 << 3) + 2), |
489 DIV_D = ((0 << 3) + 3), | 499 DIV_D = ((0 << 3) + 3), |
490 SQRT_D = ((0 << 3) + 4), | 500 SQRT_D = ((0 << 3) + 4), |
491 ABS_D = ((0 << 3) + 5), | 501 ABS_D = ((0 << 3) + 5), |
492 MOV_D = ((0 << 3) + 6), | 502 MOV_D = ((0 << 3) + 6), |
493 NEG_D = ((0 << 3) + 7), | 503 NEG_D = ((0 << 3) + 7), |
494 ROUND_L_D = ((1 << 3) + 0), | 504 ROUND_L_D = ((1 << 3) + 0), |
495 TRUNC_L_D = ((1 << 3) + 1), | 505 TRUNC_L_D = ((1 << 3) + 1), |
496 CEIL_L_D = ((1 << 3) + 2), | 506 CEIL_L_D = ((1 << 3) + 2), |
497 FLOOR_L_D = ((1 << 3) + 3), | 507 FLOOR_L_D = ((1 << 3) + 3), |
498 ROUND_W_D = ((1 << 3) + 4), | 508 ROUND_W_D = ((1 << 3) + 4), |
499 TRUNC_W_D = ((1 << 3) + 5), | 509 TRUNC_W_D = ((1 << 3) + 5), |
500 CEIL_W_D = ((1 << 3) + 6), | 510 CEIL_W_D = ((1 << 3) + 6), |
501 FLOOR_W_D = ((1 << 3) + 7), | 511 FLOOR_W_D = ((1 << 3) + 7), |
502 MIN = ((3 << 3) + 4), | 512 RECIP_D = ((2 << 3) + 5), |
503 MINA = ((3 << 3) + 5), | 513 RSQRT_D = ((2 << 3) + 6), |
504 MAX = ((3 << 3) + 6), | |
505 MAXA = ((3 << 3) + 7), | |
506 CVT_S_D = ((4 << 3) + 0), | 514 CVT_S_D = ((4 << 3) + 0), |
507 CVT_W_D = ((4 << 3) + 4), | 515 CVT_W_D = ((4 << 3) + 4), |
508 CVT_L_D = ((4 << 3) + 5), | 516 CVT_L_D = ((4 << 3) + 5), |
509 C_F_D = ((6 << 3) + 0), | 517 C_F_D = ((6 << 3) + 0), |
510 C_UN_D = ((6 << 3) + 1), | 518 C_UN_D = ((6 << 3) + 1), |
511 C_EQ_D = ((6 << 3) + 2), | 519 C_EQ_D = ((6 << 3) + 2), |
512 C_UEQ_D = ((6 << 3) + 3), | 520 C_UEQ_D = ((6 << 3) + 3), |
513 C_OLT_D = ((6 << 3) + 4), | 521 C_OLT_D = ((6 << 3) + 4), |
514 C_ULT_D = ((6 << 3) + 5), | 522 C_ULT_D = ((6 << 3) + 5), |
515 C_OLE_D = ((6 << 3) + 6), | 523 C_OLE_D = ((6 << 3) + 6), |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 CMP_OGT = ((2 << 3) + 7), // Reserved, not implemented. | 557 CMP_OGT = ((2 << 3) + 7), // Reserved, not implemented. |
550 CMP_SAT = ((3 << 3) + 0), // Reserved, not implemented. | 558 CMP_SAT = ((3 << 3) + 0), // Reserved, not implemented. |
551 CMP_SOR = ((3 << 3) + 1), | 559 CMP_SOR = ((3 << 3) + 1), |
552 CMP_SUNE = ((3 << 3) + 2), | 560 CMP_SUNE = ((3 << 3) + 2), |
553 CMP_SNE = ((3 << 3) + 3), | 561 CMP_SNE = ((3 << 3) + 3), |
554 CMP_SUGE = ((3 << 3) + 4), // Reserved, not implemented. | 562 CMP_SUGE = ((3 << 3) + 4), // Reserved, not implemented. |
555 CMP_SOGE = ((3 << 3) + 5), // Reserved, not implemented. | 563 CMP_SOGE = ((3 << 3) + 5), // Reserved, not implemented. |
556 CMP_SUGT = ((3 << 3) + 6), // Reserved, not implemented. | 564 CMP_SUGT = ((3 << 3) + 6), // Reserved, not implemented. |
557 CMP_SOGT = ((3 << 3) + 7), // Reserved, not implemented. | 565 CMP_SOGT = ((3 << 3) + 7), // Reserved, not implemented. |
558 | 566 |
| 567 MIN = ((3 << 3) + 4), |
| 568 MINA = ((3 << 3) + 5), |
| 569 MAX = ((3 << 3) + 6), |
| 570 MAXA = ((3 << 3) + 7), |
559 SEL = ((2 << 3) + 0), | 571 SEL = ((2 << 3) + 0), |
| 572 MOVF = ((2 << 3) + 1), // Function field for MOVT.fmt and MOVF.fmt |
| 573 MOVZ_C = ((2 << 3) + 2), // COP1 on FPR registers. |
| 574 MOVN_C = ((2 << 3) + 3), // COP1 on FPR registers. |
560 SELEQZ_C = ((2 << 3) + 4), // COP1 on FPR registers. | 575 SELEQZ_C = ((2 << 3) + 4), // COP1 on FPR registers. |
561 SELNEZ_C = ((2 << 3) + 7), // COP1 on FPR registers. | 576 SELNEZ_C = ((2 << 3) + 7), // COP1 on FPR registers. |
562 | 577 |
563 // COP1 Encoding of Function Field When rs=PS. | 578 // COP1 Encoding of Function Field When rs=PS. |
564 // COP1X Encoding of Function Field. | 579 // COP1X Encoding of Function Field. |
565 MADD_D = ((4 << 3) + 1), | 580 MADD_D = ((4 << 3) + 1), |
566 | 581 |
567 NULLSF = 0 | 582 NULLSF = 0 |
568 }; | 583 }; |
569 | 584 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 // TODO(plind): below should be based on kPointerSize | 994 // TODO(plind): below should be based on kPointerSize |
980 // TODO(plind): find all usages and remove the needless instructions for n64. | 995 // TODO(plind): find all usages and remove the needless instructions for n64. |
981 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2; | 996 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2; |
982 | 997 |
983 const int kInvalidStackOffset = -1; | 998 const int kInvalidStackOffset = -1; |
984 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; | 999 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; |
985 | 1000 |
986 } } // namespace v8::internal | 1001 } } // namespace v8::internal |
987 | 1002 |
988 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 1003 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
OLD | NEW |