| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 __ Ret(); | 1847 __ Ret(); |
| 1848 | 1848 |
| 1849 // Do the runtime call to allocate the arguments object. | 1849 // Do the runtime call to allocate the arguments object. |
| 1850 __ bind(&runtime); | 1850 __ bind(&runtime); |
| 1851 __ Push(r1, r3, r2); | 1851 __ Push(r1, r3, r2); |
| 1852 __ TailCallRuntime(Runtime::kNewStrictArguments); | 1852 __ TailCallRuntime(Runtime::kNewStrictArguments); |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 | 1855 |
| 1856 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | 1856 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 1857 // Stack layout on entry. | 1857 // r2 : number of parameters (tagged) |
| 1858 // sp[0] : language mode | 1858 // r3 : parameters pointer |
| 1859 // sp[4] : index of rest parameter | 1859 // r4 : rest parameter index (tagged) |
| 1860 // sp[8] : number of parameters | 1860 // r1 : language mode (tagged) |
| 1861 // sp[12] : receiver displacement | |
| 1862 | 1861 |
| 1863 Label runtime; | 1862 Label runtime; |
| 1864 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 1863 __ ldr(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 1865 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | 1864 __ ldr(r0, MemOperand(r5, StandardFrameConstants::kContextOffset)); |
| 1866 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 1865 __ cmp(r0, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 1867 __ b(ne, &runtime); | 1866 __ b(ne, &runtime); |
| 1868 | 1867 |
| 1869 // Patch the arguments.length and the parameters pointer. | 1868 // Patch the arguments.length and the parameters pointer. |
| 1870 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 1869 __ ldr(r2, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 1871 __ str(r1, MemOperand(sp, 2 * kPointerSize)); | 1870 __ add(r3, r5, Operand::PointerOffsetFromSmiKey(r2)); |
| 1872 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); | |
| 1873 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); | 1871 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 1874 __ str(r3, MemOperand(sp, 3 * kPointerSize)); | |
| 1875 | 1872 |
| 1876 __ bind(&runtime); | 1873 __ bind(&runtime); |
| 1874 __ Push(r2, r3, r4, r1); |
| 1877 __ TailCallRuntime(Runtime::kNewRestParam); | 1875 __ TailCallRuntime(Runtime::kNewRestParam); |
| 1878 } | 1876 } |
| 1879 | 1877 |
| 1880 | 1878 |
| 1881 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1879 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 1882 // Just jump directly to runtime if native RegExp is not selected at compile | 1880 // Just jump directly to runtime if native RegExp is not selected at compile |
| 1883 // time or if regexp entry in generated code is turned off runtime switch or | 1881 // time or if regexp entry in generated code is turned off runtime switch or |
| 1884 // at compilation. | 1882 // at compilation. |
| 1885 #ifdef V8_INTERPRETED_REGEXP | 1883 #ifdef V8_INTERPRETED_REGEXP |
| 1886 __ TailCallRuntime(Runtime::kRegExpExec); | 1884 __ TailCallRuntime(Runtime::kRegExpExec); |
| (...skipping 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5387 MemOperand(fp, 6 * kPointerSize), NULL); | 5385 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5388 } | 5386 } |
| 5389 | 5387 |
| 5390 | 5388 |
| 5391 #undef __ | 5389 #undef __ |
| 5392 | 5390 |
| 5393 } // namespace internal | 5391 } // namespace internal |
| 5394 } // namespace v8 | 5392 } // namespace v8 |
| 5395 | 5393 |
| 5396 #endif // V8_TARGET_ARCH_ARM | 5394 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |