OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2776 } else if ((instr->Opc1Value() == 0x2) && !(instr->Opc3Value() & 0x1)) { | 2776 } else if ((instr->Opc1Value() == 0x2) && !(instr->Opc3Value() & 0x1)) { |
2777 // vmul | 2777 // vmul |
2778 if (instr->SzValue() != 0x1) { | 2778 if (instr->SzValue() != 0x1) { |
2779 UNREACHABLE(); // Not used by V8. | 2779 UNREACHABLE(); // Not used by V8. |
2780 } | 2780 } |
2781 | 2781 |
2782 double dn_value = get_double_from_d_register(vn); | 2782 double dn_value = get_double_from_d_register(vn); |
2783 double dm_value = get_double_from_d_register(vm); | 2783 double dm_value = get_double_from_d_register(vm); |
2784 double dd_value = dn_value * dm_value; | 2784 double dd_value = dn_value * dm_value; |
2785 set_d_register_from_double(vd, dd_value); | 2785 set_d_register_from_double(vd, dd_value); |
2786 } else if ((instr->Opc1Value() == 0x0) && !(instr->Opc3Value() & 0x1)) { | 2786 } else if ((instr->Opc1Value() == 0x0)) { |
2787 // vmla | 2787 // vmla, vmls |
2788 const bool op = (instr->Opc3Value() & 0x1); | |
Rodolph Perfetta
2013/02/26 13:19:23
Use a more explicit name for op.
hans
2013/02/26 13:47:32
Done.
hans
2013/02/26 13:47:32
Done.
| |
2789 | |
2788 if (instr->SzValue() != 0x1) { | 2790 if (instr->SzValue() != 0x1) { |
2789 UNREACHABLE(); // Not used by V8. | 2791 UNREACHABLE(); // Not used by V8. |
2790 } | 2792 } |
2791 | 2793 |
2792 double dd_value = get_double_from_d_register(vd); | 2794 const double dd_val = get_double_from_d_register(vd); |
2793 double dn_value = get_double_from_d_register(vn); | 2795 const double dn_val = get_double_from_d_register(vn); |
2794 double dm_value = get_double_from_d_register(vm); | 2796 const double dm_val = get_double_from_d_register(vm); |
2795 | 2797 |
2796 // Note: we do the mul and add in separate steps to avoid getting a result | 2798 // Note: we do the mul and add/sub in separate steps to avoid getting a |
2797 // with too high precision. | 2799 // result with too high precision. |
2798 set_d_register_from_double(vd, dn_value * dm_value); | 2800 set_d_register_from_double(vd, dn_val * dm_val); |
2799 set_d_register_from_double(vd, get_double_from_d_register(vd) + dd_value); | 2801 if (op) |
Rodolph Perfetta
2013/02/26 13:19:23
in the rest of the file curly brackets tend to be
hans
2013/02/26 13:47:32
Done.
| |
2802 set_d_register_from_double(vd, dd_val - get_double_from_d_register(vd)); | |
2803 else | |
2804 set_d_register_from_double(vd, dd_val + get_double_from_d_register(vd)); | |
2800 } else if ((instr->Opc1Value() == 0x4) && !(instr->Opc3Value() & 0x1)) { | 2805 } else if ((instr->Opc1Value() == 0x4) && !(instr->Opc3Value() & 0x1)) { |
2801 // vdiv | 2806 // vdiv |
2802 if (instr->SzValue() != 0x1) { | 2807 if (instr->SzValue() != 0x1) { |
2803 UNREACHABLE(); // Not used by V8. | 2808 UNREACHABLE(); // Not used by V8. |
2804 } | 2809 } |
2805 | 2810 |
2806 double dn_value = get_double_from_d_register(vn); | 2811 double dn_value = get_double_from_d_register(vn); |
2807 double dm_value = get_double_from_d_register(vm); | 2812 double dm_value = get_double_from_d_register(vm); |
2808 double dd_value = dn_value / dm_value; | 2813 double dd_value = dn_value / dm_value; |
2809 div_zero_vfp_flag_ = (dm_value == 0); | 2814 div_zero_vfp_flag_ = (dm_value == 0); |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3460 uintptr_t address = *stack_slot; | 3465 uintptr_t address = *stack_slot; |
3461 set_register(sp, current_sp + sizeof(uintptr_t)); | 3466 set_register(sp, current_sp + sizeof(uintptr_t)); |
3462 return address; | 3467 return address; |
3463 } | 3468 } |
3464 | 3469 |
3465 } } // namespace v8::internal | 3470 } } // namespace v8::internal |
3466 | 3471 |
3467 #endif // USE_SIMULATOR | 3472 #endif // USE_SIMULATOR |
3468 | 3473 |
3469 #endif // V8_TARGET_ARCH_ARM | 3474 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |