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_mips_machine_code = NULL; | 44 byte* fast_exp_mips_machine_code = NULL; |
45 double fast_exp_simulator(double x) { | 45 double fast_exp_simulator(double x) { |
46 return Simulator::current(Isolate::Current())->CallFP( | 46 return Simulator::current(Isolate::Current())->CallFP( |
47 fast_exp_mips_machine_code, x, 0); | 47 fast_exp_mips_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 DoubleRegister input = f12; | 62 DoubleRegister input = f12; |
63 DoubleRegister result = f0; | 63 DoubleRegister result = f0; |
64 DoubleRegister double_scratch1 = f4; | 64 DoubleRegister double_scratch1 = f4; |
65 DoubleRegister double_scratch2 = f6; | 65 DoubleRegister double_scratch2 = f6; |
66 Register temp1 = t0; | 66 Register temp1 = t0; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 OS::ProtectCode(buffer, actual_size); | 522 OS::ProtectCode(buffer, actual_size); |
523 return FUNCTION_CAST<OS::MemCopyUint8Function>(buffer); | 523 return FUNCTION_CAST<OS::MemCopyUint8Function>(buffer); |
524 #endif | 524 #endif |
525 } | 525 } |
526 #endif | 526 #endif |
527 | 527 |
528 #undef __ | 528 #undef __ |
529 | 529 |
530 | 530 |
531 UnaryMathFunction CreateSqrtFunction() { | 531 UnaryMathFunction CreateSqrtFunction() { |
532 return &sqrt; | 532 return &std::sqrt; |
533 } | 533 } |
534 | 534 |
535 | 535 |
536 // ------------------------------------------------------------------------- | 536 // ------------------------------------------------------------------------- |
537 // Platform-specific RuntimeCallHelper functions. | 537 // Platform-specific RuntimeCallHelper functions. |
538 | 538 |
539 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { | 539 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { |
540 masm->EnterFrame(StackFrame::INTERNAL); | 540 masm->EnterFrame(StackFrame::INTERNAL); |
541 ASSERT(!masm->has_frame()); | 541 ASSERT(!masm->has_frame()); |
542 masm->set_has_frame(true); | 542 masm->set_has_frame(true); |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 patcher.masm()->nop(); // Pad the empty space. | 1089 patcher.masm()->nop(); // Pad the empty space. |
1090 } | 1090 } |
1091 } | 1091 } |
1092 | 1092 |
1093 | 1093 |
1094 #undef __ | 1094 #undef __ |
1095 | 1095 |
1096 } } // namespace v8::internal | 1096 } } // namespace v8::internal |
1097 | 1097 |
1098 #endif // V8_TARGET_ARCH_MIPS | 1098 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |