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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #if defined(USE_SIMULATOR) | 43 #if defined(USE_SIMULATOR) |
44 byte* fast_exp_arm_machine_code = NULL; | 44 byte* fast_exp_arm_machine_code = NULL; |
45 double fast_exp_simulator(double x) { | 45 double fast_exp_simulator(double x) { |
46 return Simulator::current(Isolate::Current())->CallFPReturnsDouble( | 46 return Simulator::current(Isolate::Current())->CallFPReturnsDouble( |
47 fast_exp_arm_machine_code, x, 0); | 47 fast_exp_arm_machine_code, x, 0); |
48 } | 48 } |
49 #endif | 49 #endif |
50 | 50 |
51 | 51 |
52 UnaryMathFunction CreateExpFunction() { | 52 UnaryMathFunction CreateExpFunction() { |
53 if (!FLAG_fast_math) return &exp; | 53 if (!FLAG_fast_math) return &std::exp; |
54 size_t actual_size; | 54 size_t actual_size; |
55 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); | 55 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); |
56 if (buffer == NULL) return &exp; | 56 if (buffer == NULL) return &std::exp; |
57 ExternalReference::InitializeMathExpData(); | 57 ExternalReference::InitializeMathExpData(); |
58 | 58 |
59 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); | 59 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); |
60 | 60 |
61 { | 61 { |
62 DwVfpRegister input = d0; | 62 DwVfpRegister input = d0; |
63 DwVfpRegister result = d1; | 63 DwVfpRegister result = d1; |
64 DwVfpRegister double_scratch1 = d2; | 64 DwVfpRegister double_scratch1 = d2; |
65 DwVfpRegister double_scratch2 = d3; | 65 DwVfpRegister double_scratch2 = d3; |
66 Register temp1 = r4; | 66 Register temp1 = r4; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 return FUNCTION_CAST<OS::MemCopyUint16Uint8Function>(buffer); | 345 return FUNCTION_CAST<OS::MemCopyUint16Uint8Function>(buffer); |
346 #endif | 346 #endif |
347 } | 347 } |
348 #endif | 348 #endif |
349 | 349 |
350 #undef __ | 350 #undef __ |
351 | 351 |
352 | 352 |
353 UnaryMathFunction CreateSqrtFunction() { | 353 UnaryMathFunction CreateSqrtFunction() { |
354 return &sqrt; | 354 return &std::sqrt; |
355 } | 355 } |
356 | 356 |
357 | 357 |
358 // ------------------------------------------------------------------------- | 358 // ------------------------------------------------------------------------- |
359 // Platform-specific RuntimeCallHelper functions. | 359 // Platform-specific RuntimeCallHelper functions. |
360 | 360 |
361 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { | 361 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { |
362 masm->EnterFrame(StackFrame::INTERNAL); | 362 masm->EnterFrame(StackFrame::INTERNAL); |
363 ASSERT(!masm->has_frame()); | 363 ASSERT(!masm->has_frame()); |
364 masm->set_has_frame(true); | 364 masm->set_has_frame(true); |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 patcher.masm()->add(r0, pc, Operand(-8)); | 888 patcher.masm()->add(r0, pc, Operand(-8)); |
889 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 889 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
890 patcher.masm()->emit_code_stub_address(stub); | 890 patcher.masm()->emit_code_stub_address(stub); |
891 } | 891 } |
892 } | 892 } |
893 | 893 |
894 | 894 |
895 } } // namespace v8::internal | 895 } } // namespace v8::internal |
896 | 896 |
897 #endif // V8_TARGET_ARCH_ARM | 897 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |