OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3306 // sp: stack pointer (restored as callee's sp after C call) | 3306 // sp: stack pointer (restored as callee's sp after C call) |
3307 // cp: current context (C callee-saved) | 3307 // cp: current context (C callee-saved) |
3308 | 3308 |
3309 // Result returned in r0 or r0+r1 by default. | 3309 // Result returned in r0 or r0+r1 by default. |
3310 | 3310 |
3311 // NOTE: Invocations of builtins may return failure objects | 3311 // NOTE: Invocations of builtins may return failure objects |
3312 // instead of a proper result. The builtin entry handles | 3312 // instead of a proper result. The builtin entry handles |
3313 // this by performing a garbage collection and retrying the | 3313 // this by performing a garbage collection and retrying the |
3314 // builtin once. | 3314 // builtin once. |
3315 | 3315 |
| 3316 // Compute the argv pointer in a callee-saved register. |
| 3317 __ add(r6, sp, Operand(r0, LSL, kPointerSizeLog2)); |
| 3318 __ sub(r6, r6, Operand(kPointerSize)); |
| 3319 |
3316 // Enter the exit frame that transitions from JavaScript to C++. | 3320 // Enter the exit frame that transitions from JavaScript to C++. |
3317 __ EnterExitFrame(save_doubles_); | 3321 __ EnterExitFrame(save_doubles_); |
3318 | 3322 |
| 3323 // Setup argc and the builtin function in callee-saved registers. |
| 3324 __ mov(r4, Operand(r0)); |
| 3325 __ mov(r5, Operand(r1)); |
| 3326 |
3319 // r4: number of arguments (C callee-saved) | 3327 // r4: number of arguments (C callee-saved) |
3320 // r5: pointer to builtin function (C callee-saved) | 3328 // r5: pointer to builtin function (C callee-saved) |
3321 // r6: pointer to first argument (C callee-saved) | 3329 // r6: pointer to first argument (C callee-saved) |
3322 | 3330 |
3323 Label throw_normal_exception; | 3331 Label throw_normal_exception; |
3324 Label throw_termination_exception; | 3332 Label throw_termination_exception; |
3325 Label throw_out_of_memory_exception; | 3333 Label throw_out_of_memory_exception; |
3326 | 3334 |
3327 // Call into the runtime system. | 3335 // Call into the runtime system. |
3328 GenerateCore(masm, | 3336 GenerateCore(masm, |
(...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5710 __ LeaveInternalFrame(); | 5718 __ LeaveInternalFrame(); |
5711 // Compute the entry point of the rewritten stub. | 5719 // Compute the entry point of the rewritten stub. |
5712 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 5720 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
5713 // Restore registers. | 5721 // Restore registers. |
5714 __ pop(lr); | 5722 __ pop(lr); |
5715 __ pop(r0); | 5723 __ pop(r0); |
5716 __ pop(r1); | 5724 __ pop(r1); |
5717 __ Jump(r2); | 5725 __ Jump(r2); |
5718 } | 5726 } |
5719 | 5727 |
| 5728 void DirectCEntryStub::Generate(MacroAssembler* masm) { |
| 5729 __ ldr(pc, MemOperand(sp, 0)); |
| 5730 } |
5720 | 5731 |
5721 #undef __ | 5732 #undef __ |
5722 | 5733 |
5723 } } // namespace v8::internal | 5734 } } // namespace v8::internal |
5724 | 5735 |
5725 #endif // V8_TARGET_ARCH_ARM | 5736 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |