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 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 { | 1400 { |
1401 FrameScope scope(masm, StackFrame::INTERNAL); | 1401 FrameScope scope(masm, StackFrame::INTERNAL); |
1402 __ CallRuntime(Runtime::kNotifyOSR, 0); | 1402 __ CallRuntime(Runtime::kNotifyOSR, 0); |
1403 } | 1403 } |
1404 __ MultiPop(saved_regs); | 1404 __ MultiPop(saved_regs); |
1405 __ Ret(); | 1405 __ Ret(); |
1406 } | 1406 } |
1407 | 1407 |
1408 | 1408 |
1409 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { | 1409 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
1410 CpuFeatures::TryForceFeatureScope scope(VFP3); | |
1411 if (!CpuFeatures::IsSupported(FPU)) { | |
1412 __ Abort("Unreachable code: Cannot optimize without FPU support."); | |
1413 return; | |
1414 } | |
1415 | |
1416 // Lookup the function in the JavaScript frame and push it as an | 1410 // Lookup the function in the JavaScript frame and push it as an |
1417 // argument to the on-stack replacement function. | 1411 // argument to the on-stack replacement function. |
1418 __ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1412 __ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1419 { | 1413 { |
1420 FrameScope scope(masm, StackFrame::INTERNAL); | 1414 FrameScope scope(masm, StackFrame::INTERNAL); |
1421 __ push(a0); | 1415 __ push(a0); |
1422 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1); | 1416 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1); |
1423 } | 1417 } |
1424 | 1418 |
1425 // If the result was -1 it means that we couldn't optimize the | 1419 // If the result was -1 it means that we couldn't optimize the |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 __ bind(&dont_adapt_arguments); | 1922 __ bind(&dont_adapt_arguments); |
1929 __ Jump(a3); | 1923 __ Jump(a3); |
1930 } | 1924 } |
1931 | 1925 |
1932 | 1926 |
1933 #undef __ | 1927 #undef __ |
1934 | 1928 |
1935 } } // namespace v8::internal | 1929 } } // namespace v8::internal |
1936 | 1930 |
1937 #endif // V8_TARGET_ARCH_MIPS | 1931 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |