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

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

Issue 7241020: Merge r8357 to 3.2 branch (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.2/
Patch Set: Created 9 years, 6 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 3395 matching lines...) Expand 10 before | Expand all | Expand 10 after
3406 // r3: argc 3406 // r3: argc
3407 // [sp+0]: argv 3407 // [sp+0]: argv
3408 3408
3409 Label invoke, exit; 3409 Label invoke, exit;
3410 3410
3411 // Called from C, so do not pop argc and args on exit (preserve sp) 3411 // Called from C, so do not pop argc and args on exit (preserve sp)
3412 // No need to save register-passed args 3412 // No need to save register-passed args
3413 // Save callee-saved registers (incl. cp and fp), sp, and lr 3413 // Save callee-saved registers (incl. cp and fp), sp, and lr
3414 __ stm(db_w, sp, kCalleeSaved | lr.bit()); 3414 __ stm(db_w, sp, kCalleeSaved | lr.bit());
3415 3415
3416 if (CpuFeatures::IsSupported(VFP3)) {
3417 CpuFeatures::Scope scope(VFP3);
3418 // Save callee-saved vfp registers.
3419 __ vstm(db_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg);
3420 }
3421
3416 // Get address of argv, see stm above. 3422 // Get address of argv, see stm above.
3417 // r0: code entry 3423 // r0: code entry
3418 // r1: function 3424 // r1: function
3419 // r2: receiver 3425 // r2: receiver
3420 // r3: argc 3426 // r3: argc
3421 __ ldr(r4, MemOperand(sp, (kNumCalleeSaved + 1) * kPointerSize)); // argv 3427
3428 // Setup argv in r4.
3429 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize;
3430 if (CpuFeatures::IsSupported(VFP3)) {
3431 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize;
3432 }
3433 __ ldr(r4, MemOperand(sp, offset_to_argv));
3422 3434
3423 // Push a frame with special values setup to mark it as an entry frame. 3435 // Push a frame with special values setup to mark it as an entry frame.
3424 // r0: code entry 3436 // r0: code entry
3425 // r1: function 3437 // r1: function
3426 // r2: receiver 3438 // r2: receiver
3427 // r3: argc 3439 // r3: argc
3428 // r4: argv 3440 // r4: argv
3429 Isolate* isolate = masm->isolate(); 3441 Isolate* isolate = masm->isolate();
3430 __ mov(r8, Operand(-1)); // Push a bad frame pointer to fail if it is used. 3442 __ mov(r8, Operand(-1)); // Push a bad frame pointer to fail if it is used.
3431 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY; 3443 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3536 3548
3537 // Reset the stack to the callee saved registers. 3549 // Reset the stack to the callee saved registers.
3538 __ add(sp, sp, Operand(-EntryFrameConstants::kCallerFPOffset)); 3550 __ add(sp, sp, Operand(-EntryFrameConstants::kCallerFPOffset));
3539 3551
3540 // Restore callee-saved registers and return. 3552 // Restore callee-saved registers and return.
3541 #ifdef DEBUG 3553 #ifdef DEBUG
3542 if (FLAG_debug_code) { 3554 if (FLAG_debug_code) {
3543 __ mov(lr, Operand(pc)); 3555 __ mov(lr, Operand(pc));
3544 } 3556 }
3545 #endif 3557 #endif
3558
3559 if (CpuFeatures::IsSupported(VFP3)) {
3560 CpuFeatures::Scope scope(VFP3);
3561 // Restore callee-saved vfp registers.
3562 __ vldm(ia_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg);
3563 }
3564
3546 __ ldm(ia_w, sp, kCalleeSaved | pc.bit()); 3565 __ ldm(ia_w, sp, kCalleeSaved | pc.bit());
3547 } 3566 }
3548 3567
3549 3568
3550 // Uses registers r0 to r4. 3569 // Uses registers r0 to r4.
3551 // Expected input (depending on whether args are in registers or on the stack): 3570 // Expected input (depending on whether args are in registers or on the stack):
3552 // * object: r0 or at sp + 1 * kPointerSize. 3571 // * object: r0 or at sp + 1 * kPointerSize.
3553 // * function: r1 or at sp. 3572 // * function: r1 or at sp.
3554 // 3573 //
3555 // An inlined call site may have been generated before calling this stub. 3574 // An inlined call site may have been generated before calling this stub.
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
5859 __ str(pc, MemOperand(sp, 0)); 5878 __ str(pc, MemOperand(sp, 0));
5860 __ Jump(target); // Call the C++ function. 5879 __ Jump(target); // Call the C++ function.
5861 } 5880 }
5862 5881
5863 5882
5864 #undef __ 5883 #undef __
5865 5884
5866 } } // namespace v8::internal 5885 } } // namespace v8::internal
5867 5886
5868 #endif // V8_TARGET_ARCH_ARM 5887 #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