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

Side by Side Diff: src/arm/simulator-arm.cc

Issue 11293061: Emit VMLA for multiply-add on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | test/cctest/test-assembler-arm.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 // 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 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 } else if ((instr->Opc1Value() == 0x2) && !(instr->Opc3Value() & 0x1)) { 2771 } else if ((instr->Opc1Value() == 0x2) && !(instr->Opc3Value() & 0x1)) {
2772 // vmul 2772 // vmul
2773 if (instr->SzValue() != 0x1) { 2773 if (instr->SzValue() != 0x1) {
2774 UNREACHABLE(); // Not used by V8. 2774 UNREACHABLE(); // Not used by V8.
2775 } 2775 }
2776 2776
2777 double dn_value = get_double_from_d_register(vn); 2777 double dn_value = get_double_from_d_register(vn);
2778 double dm_value = get_double_from_d_register(vm); 2778 double dm_value = get_double_from_d_register(vm);
2779 double dd_value = dn_value * dm_value; 2779 double dd_value = dn_value * dm_value;
2780 set_d_register_from_double(vd, dd_value); 2780 set_d_register_from_double(vd, dd_value);
2781 } else if ((instr->Opc1Value() == 0x0) && !(instr->Opc3Value() & 0x1)) {
2782 // vmla
2783 if (instr->SzValue() != 0x1) {
2784 UNREACHABLE(); // Not used by V8.
2785 }
2786
2787 double dd_value = get_double_from_d_register(vd);
2788 double dn_value = get_double_from_d_register(vn);
2789 double dm_value = get_double_from_d_register(vm);
2790
2791 // Note: we do the mul and add in separate steps to avoid getting a result
2792 // with too high precision.
2793 set_d_register_from_double(vd, dn_value * dm_value);
2794 set_d_register_from_double(vd, get_double_from_d_register(vd) + dd_value);
2781 } else if ((instr->Opc1Value() == 0x4) && !(instr->Opc3Value() & 0x1)) { 2795 } else if ((instr->Opc1Value() == 0x4) && !(instr->Opc3Value() & 0x1)) {
2782 // vdiv 2796 // vdiv
2783 if (instr->SzValue() != 0x1) { 2797 if (instr->SzValue() != 0x1) {
2784 UNREACHABLE(); // Not used by V8. 2798 UNREACHABLE(); // Not used by V8.
2785 } 2799 }
2786 2800
2787 double dn_value = get_double_from_d_register(vn); 2801 double dn_value = get_double_from_d_register(vn);
2788 double dm_value = get_double_from_d_register(vm); 2802 double dm_value = get_double_from_d_register(vm);
2789 double dd_value = dn_value / dm_value; 2803 double dd_value = dn_value / dm_value;
2790 div_zero_vfp_flag_ = (dm_value == 0); 2804 div_zero_vfp_flag_ = (dm_value == 0);
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
3392 uintptr_t address = *stack_slot; 3406 uintptr_t address = *stack_slot;
3393 set_register(sp, current_sp + sizeof(uintptr_t)); 3407 set_register(sp, current_sp + sizeof(uintptr_t));
3394 return address; 3408 return address;
3395 } 3409 }
3396 3410
3397 } } // namespace v8::internal 3411 } } // namespace v8::internal
3398 3412
3399 #endif // USE_SIMULATOR 3413 #endif // USE_SIMULATOR
3400 3414
3401 #endif // V8_TARGET_ARCH_ARM 3415 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698