Index: src/ppc/codegen-ppc.cc |
diff --git a/src/ppc/codegen-ppc.cc b/src/ppc/codegen-ppc.cc |
index 412942bad576098277686abea37e49843bb9c53c..d88b589f2d0bdd479b6dd63c674a59feb6c7ad8c 100644 |
--- a/src/ppc/codegen-ppc.cc |
+++ b/src/ppc/codegen-ppc.cc |
@@ -74,16 +74,16 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) { |
} |
-UnaryMathFunction CreateSqrtFunction() { |
+UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { |
#if defined(USE_SIMULATOR) |
- return &std::sqrt; |
+ return nullptr; |
#else |
size_t actual_size; |
byte* buffer = |
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); |
- if (buffer == NULL) return &std::sqrt; |
+ if (buffer == nullptr) return nullptr; |
- MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size), |
+ MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), |
CodeObjectRequired::kNo); |
// Called from C |
@@ -100,9 +100,9 @@ UnaryMathFunction CreateSqrtFunction() { |
DCHECK(!RelocInfo::RequiresRelocation(desc)); |
#endif |
- Assembler::FlushICacheWithoutIsolate(buffer, actual_size); |
+ Assembler::FlushICache(isolate, buffer, actual_size); |
base::OS::ProtectCode(buffer, actual_size); |
- return FUNCTION_CAST<UnaryMathFunction>(buffer); |
+ return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); |
#endif |
} |