| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 __ stm(db_w, sp, kJSCallerSaved | kCalleeSaved | lr.bit() | fp.bit()); | 1166 __ stm(db_w, sp, kJSCallerSaved | kCalleeSaved | lr.bit() | fp.bit()); |
| 1167 __ EnterInternalFrame(); | 1167 __ EnterInternalFrame(); |
| 1168 __ CallRuntime(Runtime::kNotifyOSR, 0); | 1168 __ CallRuntime(Runtime::kNotifyOSR, 0); |
| 1169 __ LeaveInternalFrame(); | 1169 __ LeaveInternalFrame(); |
| 1170 __ ldm(ia_w, sp, kJSCallerSaved | kCalleeSaved | lr.bit() | fp.bit()); | 1170 __ ldm(ia_w, sp, kJSCallerSaved | kCalleeSaved | lr.bit() | fp.bit()); |
| 1171 __ Ret(); | 1171 __ Ret(); |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 | 1174 |
| 1175 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { | 1175 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
| 1176 CpuFeatures::TryForceFeatureScope scope(VFP3); | 1176 // Probe the CPU to set the supported features, because this builtin |
| 1177 if (!CpuFeatures::IsSupported(VFP3)) { | 1177 // may be called before the initialization performs CPU setup. |
| 1178 __ Abort("Unreachable code: Cannot optimize without VFP3 support."); | 1178 masm->isolate()->cpu_features()->Probe(false); |
| 1179 return; | |
| 1180 } | |
| 1181 | 1179 |
| 1182 // Lookup the function in the JavaScript frame and push it as an | 1180 // Lookup the function in the JavaScript frame and push it as an |
| 1183 // argument to the on-stack replacement function. | 1181 // argument to the on-stack replacement function. |
| 1184 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1182 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1185 __ EnterInternalFrame(); | 1183 __ EnterInternalFrame(); |
| 1186 __ push(r0); | 1184 __ push(r0); |
| 1187 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1); | 1185 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1); |
| 1188 __ LeaveInternalFrame(); | 1186 __ LeaveInternalFrame(); |
| 1189 | 1187 |
| 1190 // If the result was -1 it means that we couldn't optimize the | 1188 // If the result was -1 it means that we couldn't optimize the |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 __ bind(&dont_adapt_arguments); | 1623 __ bind(&dont_adapt_arguments); |
| 1626 __ Jump(r3); | 1624 __ Jump(r3); |
| 1627 } | 1625 } |
| 1628 | 1626 |
| 1629 | 1627 |
| 1630 #undef __ | 1628 #undef __ |
| 1631 | 1629 |
| 1632 } } // namespace v8::internal | 1630 } } // namespace v8::internal |
| 1633 | 1631 |
| 1634 #endif // V8_TARGET_ARCH_ARM | 1632 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |