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

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

Issue 1473683004: Lazily initialize fast_sqrt() and pass an Isolate parameter to it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years 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
« no previous file with comments | « src/ppc/codegen-ppc.cc ('k') | src/runtime/runtime-maths.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <cmath> 7 #include <cmath>
8 8
9 #if V8_TARGET_ARCH_PPC 9 #if V8_TARGET_ARCH_PPC
10 10
(...skipping 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 int frt = instr->RTValue(); 2747 int frt = instr->RTValue();
2748 int fra = instr->RAValue(); 2748 int fra = instr->RAValue();
2749 int frb = instr->RBValue(); 2749 int frb = instr->RBValue();
2750 double fra_val = get_double_from_d_register(fra); 2750 double fra_val = get_double_from_d_register(fra);
2751 double frb_val = get_double_from_d_register(frb); 2751 double frb_val = get_double_from_d_register(frb);
2752 double frt_val = fra_val + frb_val; 2752 double frt_val = fra_val + frb_val;
2753 set_d_register_from_double(frt, frt_val); 2753 set_d_register_from_double(frt, frt_val);
2754 return; 2754 return;
2755 } 2755 }
2756 case FSQRT: { 2756 case FSQRT: {
2757 lazily_initialize_fast_sqrt(isolate_);
2757 int frt = instr->RTValue(); 2758 int frt = instr->RTValue();
2758 int frb = instr->RBValue(); 2759 int frb = instr->RBValue();
2759 double frb_val = get_double_from_d_register(frb); 2760 double frb_val = get_double_from_d_register(frb);
2760 double frt_val = fast_sqrt(frb_val); 2761 double frt_val = fast_sqrt(frb_val, isolate_);
2761 set_d_register_from_double(frt, frt_val); 2762 set_d_register_from_double(frt, frt_val);
2762 return; 2763 return;
2763 } 2764 }
2764 case FSEL: { 2765 case FSEL: {
2765 int frt = instr->RTValue(); 2766 int frt = instr->RTValue();
2766 int fra = instr->RAValue(); 2767 int fra = instr->RAValue();
2767 int frb = instr->RBValue(); 2768 int frb = instr->RBValue();
2768 int frc = instr->RCValue(); 2769 int frc = instr->RCValue();
2769 double fra_val = get_double_from_d_register(fra); 2770 double fra_val = get_double_from_d_register(fra);
2770 double frb_val = get_double_from_d_register(frb); 2771 double frb_val = get_double_from_d_register(frb);
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
4007 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); 4008 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp);
4008 uintptr_t address = *stack_slot; 4009 uintptr_t address = *stack_slot;
4009 set_register(sp, current_sp + sizeof(uintptr_t)); 4010 set_register(sp, current_sp + sizeof(uintptr_t));
4010 return address; 4011 return address;
4011 } 4012 }
4012 } // namespace internal 4013 } // namespace internal
4013 } // namespace v8 4014 } // namespace v8
4014 4015
4015 #endif // USE_SIMULATOR 4016 #endif // USE_SIMULATOR
4016 #endif // V8_TARGET_ARCH_PPC 4017 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/codegen-ppc.cc ('k') | src/runtime/runtime-maths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698