Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 7240023: Merge r8357 to 3.3 branch (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.3/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/frames-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 // r3: argc 3545 // r3: argc
3546 // [sp+0]: argv 3546 // [sp+0]: argv
3547 3547
3548 Label invoke, exit; 3548 Label invoke, exit;
3549 3549
3550 // Called from C, so do not pop argc and args on exit (preserve sp) 3550 // Called from C, so do not pop argc and args on exit (preserve sp)
3551 // No need to save register-passed args 3551 // No need to save register-passed args
3552 // Save callee-saved registers (incl. cp and fp), sp, and lr 3552 // Save callee-saved registers (incl. cp and fp), sp, and lr
3553 __ stm(db_w, sp, kCalleeSaved | lr.bit()); 3553 __ stm(db_w, sp, kCalleeSaved | lr.bit());
3554 3554
3555 if (CpuFeatures::IsSupported(VFP3)) {
3556 CpuFeatures::Scope scope(VFP3);
3557 // Save callee-saved vfp registers.
3558 __ vstm(db_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg);
3559 }
3560
3555 // Get address of argv, see stm above. 3561 // Get address of argv, see stm above.
3556 // r0: code entry 3562 // r0: code entry
3557 // r1: function 3563 // r1: function
3558 // r2: receiver 3564 // r2: receiver
3559 // r3: argc 3565 // r3: argc
3560 __ ldr(r4, MemOperand(sp, (kNumCalleeSaved + 1) * kPointerSize)); // argv 3566
3567 // Setup argv in r4.
3568 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize;
3569 if (CpuFeatures::IsSupported(VFP3)) {
3570 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize;
3571 }
3572 __ ldr(r4, MemOperand(sp, offset_to_argv));
3561 3573
3562 // Push a frame with special values setup to mark it as an entry frame. 3574 // Push a frame with special values setup to mark it as an entry frame.
3563 // r0: code entry 3575 // r0: code entry
3564 // r1: function 3576 // r1: function
3565 // r2: receiver 3577 // r2: receiver
3566 // r3: argc 3578 // r3: argc
3567 // r4: argv 3579 // r4: argv
3568 Isolate* isolate = masm->isolate(); 3580 Isolate* isolate = masm->isolate();
3569 __ mov(r8, Operand(-1)); // Push a bad frame pointer to fail if it is used. 3581 __ mov(r8, Operand(-1)); // Push a bad frame pointer to fail if it is used.
3570 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY; 3582 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 3687
3676 // Reset the stack to the callee saved registers. 3688 // Reset the stack to the callee saved registers.
3677 __ add(sp, sp, Operand(-EntryFrameConstants::kCallerFPOffset)); 3689 __ add(sp, sp, Operand(-EntryFrameConstants::kCallerFPOffset));
3678 3690
3679 // Restore callee-saved registers and return. 3691 // Restore callee-saved registers and return.
3680 #ifdef DEBUG 3692 #ifdef DEBUG
3681 if (FLAG_debug_code) { 3693 if (FLAG_debug_code) {
3682 __ mov(lr, Operand(pc)); 3694 __ mov(lr, Operand(pc));
3683 } 3695 }
3684 #endif 3696 #endif
3697
3698 if (CpuFeatures::IsSupported(VFP3)) {
3699 CpuFeatures::Scope scope(VFP3);
3700 // Restore callee-saved vfp registers.
3701 __ vldm(ia_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg);
3702 }
3703
3685 __ ldm(ia_w, sp, kCalleeSaved | pc.bit()); 3704 __ ldm(ia_w, sp, kCalleeSaved | pc.bit());
3686 } 3705 }
3687 3706
3688 3707
3689 // Uses registers r0 to r4. 3708 // Uses registers r0 to r4.
3690 // Expected input (depending on whether args are in registers or on the stack): 3709 // Expected input (depending on whether args are in registers or on the stack):
3691 // * object: r0 or at sp + 1 * kPointerSize. 3710 // * object: r0 or at sp + 1 * kPointerSize.
3692 // * function: r1 or at sp. 3711 // * function: r1 or at sp.
3693 // 3712 //
3694 // An inlined call site may have been generated before calling this stub. 3713 // An inlined call site may have been generated before calling this stub.
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after
6393 __ mov(result, Operand(0)); 6412 __ mov(result, Operand(0));
6394 __ Ret(); 6413 __ Ret();
6395 } 6414 }
6396 6415
6397 6416
6398 #undef __ 6417 #undef __
6399 6418
6400 } } // namespace v8::internal 6419 } } // namespace v8::internal
6401 6420
6402 #endif // V8_TARGET_ARCH_ARM 6421 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/frames-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698