OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 // All registers are initialized to zero to start with. | 428 // All registers are initialized to zero to start with. |
429 for (int i = 0; i < num_registers; i++) { | 429 for (int i = 0; i < num_registers; i++) { |
430 registers_[i] = 0; | 430 registers_[i] = 0; |
431 } | 431 } |
432 n_flag_ = false; | 432 n_flag_ = false; |
433 z_flag_ = false; | 433 z_flag_ = false; |
434 c_flag_ = false; | 434 c_flag_ = false; |
435 v_flag_ = false; | 435 v_flag_ = false; |
436 | 436 |
437 // Initializing VFP registers. | 437 // Initializing VFP registers. |
438 // All registers are initialized to zero to start with. | 438 // All registers are initialized to zero to start with |
439 // even though s_registers_ & d_registers_ share the same | 439 // even though s_registers_ & d_registers_ share the same |
440 // physical registers in the target | 440 // physical registers in the target. |
441 for (int i = 0; i < num_s_registers; i++) { | 441 for (int i = 0; i < num_s_registers; i++) { |
442 vfp_register[i] = 0; | 442 vfp_register[i] = 0; |
443 } | 443 } |
444 n_flag_FPSCR_ = false; | 444 n_flag_FPSCR_ = false; |
445 z_flag_FPSCR_ = false; | 445 z_flag_FPSCR_ = false; |
446 c_flag_FPSCR_ = false; | 446 c_flag_FPSCR_ = false; |
447 v_flag_FPSCR_ = false; | 447 v_flag_FPSCR_ = false; |
448 | 448 |
449 inv_op_vfp_flag_ = false; | 449 inv_op_vfp_flag_ = false; |
450 div_zero_vfp_flag_ = false; | 450 div_zero_vfp_flag_ = false; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 pc_modified_ = true; | 560 pc_modified_ = true; |
561 registers_[pc] = value; | 561 registers_[pc] = value; |
562 } | 562 } |
563 | 563 |
564 | 564 |
565 // Raw access to the PC register without the special adjustment when reading. | 565 // Raw access to the PC register without the special adjustment when reading. |
566 int32_t Simulator::get_pc() const { | 566 int32_t Simulator::get_pc() const { |
567 return registers_[pc]; | 567 return registers_[pc]; |
568 } | 568 } |
569 | 569 |
| 570 |
570 // Getting from and setting into VFP registers. | 571 // Getting from and setting into VFP registers. |
571 void Simulator::set_s_register(int sreg, unsigned int value) { | 572 void Simulator::set_s_register(int sreg, unsigned int value) { |
572 ASSERT((sreg >= 0) && (sreg < num_s_registers)); | 573 ASSERT((sreg >= 0) && (sreg < num_s_registers)); |
573 vfp_register[sreg] = value; | 574 vfp_register[sreg] = value; |
574 } | 575 } |
575 | 576 |
| 577 |
576 unsigned int Simulator::get_s_register(int sreg) const { | 578 unsigned int Simulator::get_s_register(int sreg) const { |
577 ASSERT((sreg >= 0) && (sreg < num_s_registers)); | 579 ASSERT((sreg >= 0) && (sreg < num_s_registers)); |
578 return vfp_register[sreg]; | 580 return vfp_register[sreg]; |
579 } | 581 } |
580 | 582 |
| 583 |
581 void Simulator::set_s_register_from_float(int sreg, const float flt) { | 584 void Simulator::set_s_register_from_float(int sreg, const float flt) { |
582 ASSERT((sreg >= 0) && (sreg < num_s_registers)); | 585 ASSERT((sreg >= 0) && (sreg < num_s_registers)); |
583 // Read the bits from the single precision floating point value | 586 // Read the bits from the single precision floating point value |
584 // into the unsigned integer element of vfp_register[] given by index=sreg. | 587 // into the unsigned integer element of vfp_register[] given by index=sreg. |
585 char buffer[sizeof(vfp_register[0])]; | 588 char buffer[sizeof(vfp_register[0])]; |
586 memcpy(buffer, &flt, sizeof(vfp_register[0])); | 589 memcpy(buffer, &flt, sizeof(vfp_register[0])); |
587 memcpy(&vfp_register[sreg], buffer, sizeof(vfp_register[0])); | 590 memcpy(&vfp_register[sreg], buffer, sizeof(vfp_register[0])); |
588 } | 591 } |
589 | 592 |
| 593 |
590 void Simulator::set_s_register_from_sinteger(int sreg, const int sint) { | 594 void Simulator::set_s_register_from_sinteger(int sreg, const int sint) { |
591 ASSERT((sreg >= 0) && (sreg < num_s_registers)); | 595 ASSERT((sreg >= 0) && (sreg < num_s_registers)); |
592 // Read the bits from the integer value | 596 // Read the bits from the integer value into the unsigned integer element of |
593 // into the unsigned integer element of vfp_register[] given by index=sreg. | 597 // vfp_register[] given by index=sreg. |
594 char buffer[sizeof(vfp_register[0])]; | 598 char buffer[sizeof(vfp_register[0])]; |
595 memcpy(buffer, &sint, sizeof(vfp_register[0])); | 599 memcpy(buffer, &sint, sizeof(vfp_register[0])); |
596 memcpy(&vfp_register[sreg], buffer, sizeof(vfp_register[0])); | 600 memcpy(&vfp_register[sreg], buffer, sizeof(vfp_register[0])); |
597 } | 601 } |
598 | 602 |
| 603 |
599 void Simulator::set_d_register_from_double(int dreg, const double& dbl) { | 604 void Simulator::set_d_register_from_double(int dreg, const double& dbl) { |
600 ASSERT((dreg >= 0) && (dreg < num_d_registers)); | 605 ASSERT((dreg >= 0) && (dreg < num_d_registers)); |
601 // Read the bits from the double precision floating point value | 606 // Read the bits from the double precision floating point value into the two |
602 // into the two consecutive unsigned integer elements of vfp_register[] | 607 // consecutive unsigned integer elements of vfp_register[] given by index |
603 // given by index 2*sreg and 2*sreg+1. | 608 // 2*sreg and 2*sreg+1. |
604 char buffer[2 * sizeof(vfp_register[0])]; | 609 char buffer[2 * sizeof(vfp_register[0])]; |
605 memcpy(buffer, &dbl, 2 * sizeof(vfp_register[0])); | 610 memcpy(buffer, &dbl, 2 * sizeof(vfp_register[0])); |
606 #ifndef BIG_ENDIAN_FLOATING_POINT | 611 #ifndef BIG_ENDIAN_FLOATING_POINT |
607 memcpy(&vfp_register[dreg * 2], buffer, 2 * sizeof(vfp_register[0])); | 612 memcpy(&vfp_register[dreg * 2], buffer, 2 * sizeof(vfp_register[0])); |
608 #else | 613 #else |
609 memcpy(&vfp_register[dreg * 2], &buffer[4], sizeof(vfp_register[0])); | 614 memcpy(&vfp_register[dreg * 2], &buffer[4], sizeof(vfp_register[0])); |
610 memcpy(&vfp_register[dreg * 2 + 1], &buffer[0], sizeof(vfp_register[0])); | 615 memcpy(&vfp_register[dreg * 2 + 1], &buffer[0], sizeof(vfp_register[0])); |
611 #endif | 616 #endif |
612 } | 617 } |
613 | 618 |
| 619 |
614 float Simulator::get_float_from_s_register(int sreg) { | 620 float Simulator::get_float_from_s_register(int sreg) { |
615 ASSERT((sreg >= 0) && (sreg < num_s_registers)); | 621 ASSERT((sreg >= 0) && (sreg < num_s_registers)); |
616 | 622 |
617 float sm_val = 0.0; | 623 float sm_val = 0.0; |
618 // Read the bits from the unsigned integer vfp_register[] array | 624 // Read the bits from the unsigned integer vfp_register[] array |
619 // into the single precision floating point value and return it. | 625 // into the single precision floating point value and return it. |
620 char buffer[sizeof(vfp_register[0])]; | 626 char buffer[sizeof(vfp_register[0])]; |
621 memcpy(buffer, &vfp_register[sreg], sizeof(vfp_register[0])); | 627 memcpy(buffer, &vfp_register[sreg], sizeof(vfp_register[0])); |
622 memcpy(&sm_val, buffer, sizeof(vfp_register[0])); | 628 memcpy(&sm_val, buffer, sizeof(vfp_register[0])); |
623 return(sm_val); | 629 return(sm_val); |
624 } | 630 } |
625 | 631 |
| 632 |
626 int Simulator::get_sinteger_from_s_register(int sreg) { | 633 int Simulator::get_sinteger_from_s_register(int sreg) { |
627 ASSERT((sreg >= 0) && (sreg < num_s_registers)); | 634 ASSERT((sreg >= 0) && (sreg < num_s_registers)); |
628 | 635 |
629 int sm_val = 0; | 636 int sm_val = 0; |
630 // Read the bits from the unsigned integer vfp_register[] array | 637 // Read the bits from the unsigned integer vfp_register[] array |
631 // into the single precision floating point value and return it. | 638 // into the single precision floating point value and return it. |
632 char buffer[sizeof(vfp_register[0])]; | 639 char buffer[sizeof(vfp_register[0])]; |
633 memcpy(buffer, &vfp_register[sreg], sizeof(vfp_register[0])); | 640 memcpy(buffer, &vfp_register[sreg], sizeof(vfp_register[0])); |
634 memcpy(&sm_val, buffer, sizeof(vfp_register[0])); | 641 memcpy(&sm_val, buffer, sizeof(vfp_register[0])); |
635 return(sm_val); | 642 return(sm_val); |
636 } | 643 } |
637 | 644 |
| 645 |
638 double Simulator::get_double_from_d_register(int dreg) { | 646 double Simulator::get_double_from_d_register(int dreg) { |
639 ASSERT((dreg >= 0) && (dreg < num_d_registers)); | 647 ASSERT((dreg >= 0) && (dreg < num_d_registers)); |
640 | 648 |
641 double dm_val = 0.0; | 649 double dm_val = 0.0; |
642 // Read the bits from the unsigned integer vfp_register[] array | 650 // Read the bits from the unsigned integer vfp_register[] array |
643 // into the double precision floating point value and return it. | 651 // into the double precision floating point value and return it. |
644 char buffer[2 * sizeof(vfp_register[0])]; | 652 char buffer[2 * sizeof(vfp_register[0])]; |
645 #ifndef BIG_ENDIAN_FLOATING_POINT | 653 #ifdef BIG_ENDIAN_FLOATING_POINT |
646 memcpy(buffer, &vfp_register[2 * dreg], 2 * sizeof(vfp_register[0])); | |
647 #else | |
648 memcpy(&buffer[0], &vfp_register[2 * dreg + 1], sizeof(vfp_register[0])); | 654 memcpy(&buffer[0], &vfp_register[2 * dreg + 1], sizeof(vfp_register[0])); |
649 memcpy(&buffer[4], &vfp_register[2 * dreg], sizeof(vfp_register[0])); | 655 memcpy(&buffer[4], &vfp_register[2 * dreg], sizeof(vfp_register[0])); |
| 656 #else |
| 657 memcpy(buffer, &vfp_register[2 * dreg], 2 * sizeof(vfp_register[0])); |
650 #endif | 658 #endif |
651 memcpy(&dm_val, buffer, 2 * sizeof(vfp_register[0])); | 659 memcpy(&dm_val, buffer, 2 * sizeof(vfp_register[0])); |
652 return(dm_val); | 660 return(dm_val); |
653 } | 661 } |
654 | 662 |
655 | 663 |
656 // For use in calls that take two double values, constructed from r0, r1, r2 | 664 // For use in calls that take two double values, constructed from r0, r1, r2 |
657 // and r3. | 665 // and r3. |
658 void Simulator::GetFpArgs(double* x, double* y) { | 666 void Simulator::GetFpArgs(double* x, double* y) { |
659 // We use a char buffer to get around the strict-aliasing rules which | 667 // We use a char buffer to get around the strict-aliasing rules which |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 && ((left < 0 && alu_out >= 0) || (left >= 0 && alu_out < 0)); | 880 && ((left < 0 && alu_out >= 0) || (left >= 0 && alu_out < 0)); |
873 } else { | 881 } else { |
874 // operands have different signs | 882 // operands have different signs |
875 overflow = ((left < 0 && right >= 0) || (left >= 0 && right < 0)) | 883 overflow = ((left < 0 && right >= 0) || (left >= 0 && right < 0)) |
876 // and first operand and result have different signs | 884 // and first operand and result have different signs |
877 && ((left < 0 && alu_out >= 0) || (left >= 0 && alu_out < 0)); | 885 && ((left < 0 && alu_out >= 0) || (left >= 0 && alu_out < 0)); |
878 } | 886 } |
879 return overflow; | 887 return overflow; |
880 } | 888 } |
881 | 889 |
| 890 |
882 // Support for VFP comparisons. | 891 // Support for VFP comparisons. |
883 void Simulator::Compute_FPSCR_Flags(double val1, double val2) { | 892 void Simulator::Compute_FPSCR_Flags(double val1, double val2) { |
884 // All Non-Nan cases | 893 // All non-NaN cases. |
885 if (val1 == val2) { | 894 if (val1 == val2) { |
886 n_flag_FPSCR_ = false; | 895 n_flag_FPSCR_ = false; |
887 z_flag_FPSCR_ = true; | 896 z_flag_FPSCR_ = true; |
888 c_flag_FPSCR_ = true; | 897 c_flag_FPSCR_ = true; |
889 v_flag_FPSCR_ = false; | 898 v_flag_FPSCR_ = false; |
890 } else if (val1 < val2) { | 899 } else if (val1 < val2) { |
891 n_flag_FPSCR_ = true; | 900 n_flag_FPSCR_ = true; |
892 z_flag_FPSCR_ = false; | 901 z_flag_FPSCR_ = false; |
893 c_flag_FPSCR_ = false; | 902 c_flag_FPSCR_ = false; |
894 v_flag_FPSCR_ = false; | 903 v_flag_FPSCR_ = false; |
895 } else { | 904 } else { |
896 // Case when (val1 > val2). | 905 // Case when (val1 > val2). |
897 n_flag_FPSCR_ = false; | 906 n_flag_FPSCR_ = false; |
898 z_flag_FPSCR_ = false; | 907 z_flag_FPSCR_ = false; |
899 c_flag_FPSCR_ = true; | 908 c_flag_FPSCR_ = true; |
900 v_flag_FPSCR_ = false; | 909 v_flag_FPSCR_ = false; |
901 } | 910 } |
902 } | 911 } |
903 | 912 |
904 | 913 |
905 void Simulator::Copy_FPSCR_to_APSR() { | 914 void Simulator::Copy_FPSCR_to_APSR() { |
906 n_flag_ = n_flag_FPSCR_; | 915 n_flag_ = n_flag_FPSCR_; |
907 z_flag_ = z_flag_FPSCR_; | 916 z_flag_ = z_flag_FPSCR_; |
908 c_flag_ = c_flag_FPSCR_; | 917 c_flag_ = c_flag_FPSCR_; |
909 v_flag_ = v_flag_FPSCR_; | 918 v_flag_ = v_flag_FPSCR_; |
910 } | 919 } |
911 | 920 |
912 | 921 |
913 | |
914 // Addressing Mode 1 - Data-processing operands: | 922 // Addressing Mode 1 - Data-processing operands: |
915 // Get the value based on the shifter_operand with register. | 923 // Get the value based on the shifter_operand with register. |
916 int32_t Simulator::GetShiftRm(Instr* instr, bool* carry_out) { | 924 int32_t Simulator::GetShiftRm(Instr* instr, bool* carry_out) { |
917 Shift shift = instr->ShiftField(); | 925 Shift shift = instr->ShiftField(); |
918 int shift_amount = instr->ShiftAmountField(); | 926 int shift_amount = instr->ShiftAmountField(); |
919 int32_t result = get_register(instr->RmField()); | 927 int32_t result = get_register(instr->RmField()); |
920 if (instr->Bit(4) == 0) { | 928 if (instr->Bit(4) == 0) { |
921 // by immediate | 929 // by immediate |
922 if ((shift == ROR) && (shift_amount == 0)) { | 930 if ((shift == ROR) && (shift_amount == 0)) { |
923 UNIMPLEMENTED(); | 931 UNIMPLEMENTED(); |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 hi_res = static_cast<int32_t>(result >> 32); | 1294 hi_res = static_cast<int32_t>(result >> 32); |
1287 lo_res = static_cast<int32_t>(result & 0xffffffff); | 1295 lo_res = static_cast<int32_t>(result & 0xffffffff); |
1288 } | 1296 } |
1289 set_register(rd_lo, lo_res); | 1297 set_register(rd_lo, lo_res); |
1290 set_register(rd_hi, hi_res); | 1298 set_register(rd_hi, hi_res); |
1291 if (instr->HasS()) { | 1299 if (instr->HasS()) { |
1292 UNIMPLEMENTED(); | 1300 UNIMPLEMENTED(); |
1293 } | 1301 } |
1294 } | 1302 } |
1295 } else { | 1303 } else { |
1296 UNIMPLEMENTED(); // not used by V8 | 1304 UNIMPLEMENTED(); // Not used by V8. |
1297 } | 1305 } |
1298 } else { | 1306 } else { |
1299 // extra load/store instructions | 1307 // extra load/store instructions |
1300 int rd = instr->RdField(); | 1308 int rd = instr->RdField(); |
1301 int rn = instr->RnField(); | 1309 int rn = instr->RnField(); |
1302 int32_t rn_val = get_register(rn); | 1310 int32_t rn_val = get_register(rn); |
1303 int32_t addr = 0; | 1311 int32_t addr = 0; |
1304 if (instr->Bit(22) == 0) { | 1312 if (instr->Bit(22) == 0) { |
1305 int rm = instr->RmField(); | 1313 int rm = instr->RmField(); |
1306 int32_t rm_val = get_register(rm); | 1314 int32_t rm_val = get_register(rm); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1945 Compute_FPSCR_Flags(dd_value, dm_value); | 1953 Compute_FPSCR_Flags(dd_value, dm_value); |
1946 } else if ((instr->Bits(23, 20) == 0xF) && | 1954 } else if ((instr->Bits(23, 20) == 0xF) && |
1947 (instr->Bits(19, 16) == 0x1) && | 1955 (instr->Bits(19, 16) == 0x1) && |
1948 (instr->Bits(11, 8) == 0xA) && | 1956 (instr->Bits(11, 8) == 0xA) && |
1949 (instr->Bits(7, 5) == 0x0) && | 1957 (instr->Bits(7, 5) == 0x0) && |
1950 (instr->Bit(4) == 0x1) && | 1958 (instr->Bit(4) == 0x1) && |
1951 (instr->Bits(3, 0) == 0x0)) { | 1959 (instr->Bits(3, 0) == 0x0)) { |
1952 if (instr->Bits(15, 12) == 0xF) | 1960 if (instr->Bits(15, 12) == 0xF) |
1953 Copy_FPSCR_to_APSR(); | 1961 Copy_FPSCR_to_APSR(); |
1954 else | 1962 else |
1955 UNIMPLEMENTED(); // not used by V8 now | 1963 UNIMPLEMENTED(); // Not used by V8. |
1956 } else { | 1964 } else { |
1957 UNIMPLEMENTED(); // not used by V8 now | 1965 UNIMPLEMENTED(); // Not used by V8. |
1958 } | 1966 } |
1959 } else if (instr->Bit(21) == 1) { | 1967 } else if (instr->Bit(21) == 1) { |
1960 if ((instr->Bit(20) == 0x1) && | 1968 if ((instr->Bit(20) == 0x1) && |
1961 (instr->Bits(11, 9) == 0x5) && | 1969 (instr->Bits(11, 9) == 0x5) && |
1962 (instr->Bit(8) == 0x1) && | 1970 (instr->Bit(8) == 0x1) && |
1963 (instr->Bit(6) == 0) && | 1971 (instr->Bit(6) == 0) && |
1964 (instr->Bit(4) == 0)) { | 1972 (instr->Bit(4) == 0)) { |
1965 double dn_value = get_double_from_d_register(vn); | 1973 double dn_value = get_double_from_d_register(vn); |
1966 double dm_value = get_double_from_d_register(vm); | 1974 double dm_value = get_double_from_d_register(vm); |
1967 double dd_value = dn_value + dm_value; | 1975 double dd_value = dn_value + dm_value; |
(...skipping 10 matching lines...) Expand all Loading... |
1978 } else if ((instr->Bit(20) == 0x0) && | 1986 } else if ((instr->Bit(20) == 0x0) && |
1979 (instr->Bits(11, 9) == 0x5) && | 1987 (instr->Bits(11, 9) == 0x5) && |
1980 (instr->Bit(8) == 0x1) && | 1988 (instr->Bit(8) == 0x1) && |
1981 (instr->Bit(6) == 0) && | 1989 (instr->Bit(6) == 0) && |
1982 (instr->Bit(4) == 0)) { | 1990 (instr->Bit(4) == 0)) { |
1983 double dn_value = get_double_from_d_register(vn); | 1991 double dn_value = get_double_from_d_register(vn); |
1984 double dm_value = get_double_from_d_register(vm); | 1992 double dm_value = get_double_from_d_register(vm); |
1985 double dd_value = dn_value * dm_value; | 1993 double dd_value = dn_value * dm_value; |
1986 set_d_register_from_double(vd, dd_value); | 1994 set_d_register_from_double(vd, dd_value); |
1987 } else { | 1995 } else { |
1988 UNIMPLEMENTED(); // not used by V8 now | 1996 UNIMPLEMENTED(); // Not used by V8. |
1989 } | 1997 } |
1990 } else { | 1998 } else { |
1991 if ((instr->Bit(20) == 0x0) && | 1999 if ((instr->Bit(20) == 0x0) && |
1992 (instr->Bits(11, 8) == 0xA) && | 2000 (instr->Bits(11, 8) == 0xA) && |
1993 (instr->Bits(6, 5) == 0x0) && | 2001 (instr->Bits(6, 5) == 0x0) && |
1994 (instr->Bit(4) == 1) && | 2002 (instr->Bit(4) == 1) && |
1995 (instr->Bits(3, 0) == 0x0)) { | 2003 (instr->Bits(3, 0) == 0x0)) { |
1996 int32_t rs_val = get_register(rt); | 2004 int32_t rs_val = get_register(rt); |
1997 set_s_register_from_sinteger(((vn<<1) | instr->NField()), rs_val); | 2005 set_s_register_from_sinteger(((vn<<1) | instr->NField()), rs_val); |
1998 } else if ((instr->Bit(20) == 0x1) && | 2006 } else if ((instr->Bit(20) == 0x1) && |
1999 (instr->Bits(11, 8) == 0xA) && | 2007 (instr->Bits(11, 8) == 0xA) && |
2000 (instr->Bits(6, 5) == 0x0) && | 2008 (instr->Bits(6, 5) == 0x0) && |
2001 (instr->Bit(4) == 1) && | 2009 (instr->Bit(4) == 1) && |
2002 (instr->Bits(3, 0) == 0x0)) { | 2010 (instr->Bits(3, 0) == 0x0)) { |
2003 int32_t int_value = get_sinteger_from_s_register(((vn<<1) | | 2011 int32_t int_value = get_sinteger_from_s_register(((vn<<1) | |
2004 instr->NField())); | 2012 instr->NField())); |
2005 set_register(rt, int_value); | 2013 set_register(rt, int_value); |
2006 } else { | 2014 } else { |
2007 UNIMPLEMENTED(); // not used by V8 now | 2015 UNIMPLEMENTED(); // Not used by V8. |
2008 } | 2016 } |
2009 } | 2017 } |
2010 } | 2018 } |
2011 | 2019 |
2012 | 2020 |
2013 | |
2014 // void Simulator::DecodeType6CoprocessorIns(Instr* instr) | 2021 // void Simulator::DecodeType6CoprocessorIns(Instr* instr) |
2015 // Decode Type 6 coprocessor instructions | 2022 // Decode Type 6 coprocessor instructions. |
2016 // Dm = fmdrr(Rt, Rt2) | 2023 // Dm = fmdrr(Rt, Rt2) |
2017 // <Rt, Rt2> = fmrrd(Dm) | 2024 // <Rt, Rt2> = fmrrd(Dm) |
2018 void Simulator::DecodeType6CoprocessorIns(Instr* instr) { | 2025 void Simulator::DecodeType6CoprocessorIns(Instr* instr) { |
2019 ASSERT((instr->TypeField() == 6)); | 2026 ASSERT((instr->TypeField() == 6)); |
2020 | 2027 |
2021 int rt = instr->RtField(); | 2028 int rt = instr->RtField(); |
2022 int rn = instr->RnField(); | 2029 int rn = instr->RnField(); |
2023 int vm = instr->VmField(); | 2030 int vm = instr->VmField(); |
2024 | 2031 |
2025 if (instr->Bit(23) == 1) { | 2032 if (instr->Bit(23) == 1) { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2248 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); | 2255 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); |
2249 uintptr_t address = *stack_slot; | 2256 uintptr_t address = *stack_slot; |
2250 set_register(sp, current_sp + sizeof(uintptr_t)); | 2257 set_register(sp, current_sp + sizeof(uintptr_t)); |
2251 return address; | 2258 return address; |
2252 } | 2259 } |
2253 | 2260 |
2254 | 2261 |
2255 } } // namespace assembler::arm | 2262 } } // namespace assembler::arm |
2256 | 2263 |
2257 #endif // !defined(__arm__) | 2264 #endif // !defined(__arm__) |
OLD | NEW |