| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2466 } | 2466 } |
| 2467 } | 2467 } |
| 2468 | 2468 |
| 2469 | 2469 |
| 2470 // void Simulator::DecodeTypeVFP(Instruction* instr) | 2470 // void Simulator::DecodeTypeVFP(Instruction* instr) |
| 2471 // The Following ARMv7 VFPv instructions are currently supported. | 2471 // The Following ARMv7 VFPv instructions are currently supported. |
| 2472 // vmov :Sn = Rt | 2472 // vmov :Sn = Rt |
| 2473 // vmov :Rt = Sn | 2473 // vmov :Rt = Sn |
| 2474 // vcvt: Dd = Sm | 2474 // vcvt: Dd = Sm |
| 2475 // vcvt: Sd = Dm | 2475 // vcvt: Sd = Dm |
| 2476 // Dd = vabs(Dm) |
| 2477 // Dd = vneg(Dm) |
| 2476 // Dd = vadd(Dn, Dm) | 2478 // Dd = vadd(Dn, Dm) |
| 2477 // Dd = vsub(Dn, Dm) | 2479 // Dd = vsub(Dn, Dm) |
| 2478 // Dd = vmul(Dn, Dm) | 2480 // Dd = vmul(Dn, Dm) |
| 2479 // Dd = vdiv(Dn, Dm) | 2481 // Dd = vdiv(Dn, Dm) |
| 2480 // vcmp(Dd, Dm) | 2482 // vcmp(Dd, Dm) |
| 2481 // vmrs | 2483 // vmrs |
| 2482 // Dd = vsqrt(Dm) | 2484 // Dd = vsqrt(Dm) |
| 2483 void Simulator::DecodeTypeVFP(Instruction* instr) { | 2485 void Simulator::DecodeTypeVFP(Instruction* instr) { |
| 2484 ASSERT((instr->TypeValue() == 7) && (instr->Bit(24) == 0x0) ); | 2486 ASSERT((instr->TypeValue() == 7) && (instr->Bit(24) == 0x0) ); |
| 2485 ASSERT(instr->Bits(11, 9) == 0x5); | 2487 ASSERT(instr->Bits(11, 9) == 0x5); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2501 } else { | 2503 } else { |
| 2502 int m = instr->VFPMRegValue(kSinglePrecision); | 2504 int m = instr->VFPMRegValue(kSinglePrecision); |
| 2503 int d = instr->VFPDRegValue(kSinglePrecision); | 2505 int d = instr->VFPDRegValue(kSinglePrecision); |
| 2504 set_s_register_from_float(d, get_float_from_s_register(m)); | 2506 set_s_register_from_float(d, get_float_from_s_register(m)); |
| 2505 } | 2507 } |
| 2506 } else if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x3)) { | 2508 } else if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x3)) { |
| 2507 // vabs | 2509 // vabs |
| 2508 double dm_value = get_double_from_d_register(vm); | 2510 double dm_value = get_double_from_d_register(vm); |
| 2509 double dd_value = fabs(dm_value); | 2511 double dd_value = fabs(dm_value); |
| 2510 set_d_register_from_double(vd, dd_value); | 2512 set_d_register_from_double(vd, dd_value); |
| 2513 } else if ((instr->Opc2Value() == 0x1) && (instr->Opc3Value() == 0x1)) { |
| 2514 // vneg |
| 2515 double dm_value = get_double_from_d_register(vm); |
| 2516 double dd_value = -dm_value; |
| 2517 set_d_register_from_double(vd, dd_value); |
| 2511 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) { | 2518 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) { |
| 2512 DecodeVCVTBetweenDoubleAndSingle(instr); | 2519 DecodeVCVTBetweenDoubleAndSingle(instr); |
| 2513 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) { | 2520 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) { |
| 2514 DecodeVCVTBetweenFloatingPointAndInteger(instr); | 2521 DecodeVCVTBetweenFloatingPointAndInteger(instr); |
| 2515 } else if (((instr->Opc2Value() >> 1) == 0x6) && | 2522 } else if (((instr->Opc2Value() >> 1) == 0x6) && |
| 2516 (instr->Opc3Value() & 0x1)) { | 2523 (instr->Opc3Value() & 0x1)) { |
| 2517 DecodeVCVTBetweenFloatingPointAndInteger(instr); | 2524 DecodeVCVTBetweenFloatingPointAndInteger(instr); |
| 2518 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && | 2525 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && |
| 2519 (instr->Opc3Value() & 0x1)) { | 2526 (instr->Opc3Value() & 0x1)) { |
| 2520 DecodeVCMP(instr); | 2527 DecodeVCMP(instr); |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3162 uintptr_t address = *stack_slot; | 3169 uintptr_t address = *stack_slot; |
| 3163 set_register(sp, current_sp + sizeof(uintptr_t)); | 3170 set_register(sp, current_sp + sizeof(uintptr_t)); |
| 3164 return address; | 3171 return address; |
| 3165 } | 3172 } |
| 3166 | 3173 |
| 3167 } } // namespace v8::internal | 3174 } } // namespace v8::internal |
| 3168 | 3175 |
| 3169 #endif // USE_SIMULATOR | 3176 #endif // USE_SIMULATOR |
| 3170 | 3177 |
| 3171 #endif // V8_TARGET_ARCH_ARM | 3178 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |