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

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

Issue 7281009: Version 3.4.8... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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/full-codegen-arm.cc » ('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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // Setup the object header. 159 // Setup the object header.
160 __ LoadRoot(r2, Heap::kFunctionContextMapRootIndex); 160 __ LoadRoot(r2, Heap::kFunctionContextMapRootIndex);
161 __ str(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); 161 __ str(r2, FieldMemOperand(r0, HeapObject::kMapOffset));
162 __ mov(r2, Operand(Smi::FromInt(length))); 162 __ mov(r2, Operand(Smi::FromInt(length)));
163 __ str(r2, FieldMemOperand(r0, FixedArray::kLengthOffset)); 163 __ str(r2, FieldMemOperand(r0, FixedArray::kLengthOffset));
164 164
165 // Setup the fixed slots. 165 // Setup the fixed slots.
166 __ mov(r1, Operand(Smi::FromInt(0))); 166 __ mov(r1, Operand(Smi::FromInt(0)));
167 __ str(r3, MemOperand(r0, Context::SlotOffset(Context::CLOSURE_INDEX))); 167 __ str(r3, MemOperand(r0, Context::SlotOffset(Context::CLOSURE_INDEX)));
168 __ str(r0, MemOperand(r0, Context::SlotOffset(Context::FCONTEXT_INDEX)));
169 __ str(cp, MemOperand(r0, Context::SlotOffset(Context::PREVIOUS_INDEX))); 168 __ str(cp, MemOperand(r0, Context::SlotOffset(Context::PREVIOUS_INDEX)));
170 __ str(r1, MemOperand(r0, Context::SlotOffset(Context::EXTENSION_INDEX))); 169 __ str(r1, MemOperand(r0, Context::SlotOffset(Context::EXTENSION_INDEX)));
171 170
172 // Copy the global object from the previous context. 171 // Copy the global object from the previous context.
173 __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 172 __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
174 __ str(r1, MemOperand(r0, Context::SlotOffset(Context::GLOBAL_INDEX))); 173 __ str(r1, MemOperand(r0, Context::SlotOffset(Context::GLOBAL_INDEX)));
175 174
176 // Initialize the rest of the slots to undefined. 175 // Initialize the rest of the slots to undefined.
177 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 176 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
178 for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) { 177 for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
(...skipping 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after
3534 3533
3535 // Called from C, so do not pop argc and args on exit (preserve sp) 3534 // Called from C, so do not pop argc and args on exit (preserve sp)
3536 // No need to save register-passed args 3535 // No need to save register-passed args
3537 // Save callee-saved registers (incl. cp and fp), sp, and lr 3536 // Save callee-saved registers (incl. cp and fp), sp, and lr
3538 __ stm(db_w, sp, kCalleeSaved | lr.bit()); 3537 __ stm(db_w, sp, kCalleeSaved | lr.bit());
3539 3538
3540 if (CpuFeatures::IsSupported(VFP3)) { 3539 if (CpuFeatures::IsSupported(VFP3)) {
3541 CpuFeatures::Scope scope(VFP3); 3540 CpuFeatures::Scope scope(VFP3);
3542 // Save callee-saved vfp registers. 3541 // Save callee-saved vfp registers.
3543 __ vstm(db_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg); 3542 __ vstm(db_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg);
3543 // Set up the reserved register for 0.0.
3544 __ vmov(kDoubleRegZero, 0.0);
3544 } 3545 }
3545 3546
3546 // Get address of argv, see stm above. 3547 // Get address of argv, see stm above.
3547 // r0: code entry 3548 // r0: code entry
3548 // r1: function 3549 // r1: function
3549 // r2: receiver 3550 // r2: receiver
3550 // r3: argc 3551 // r3: argc
3551 3552
3552 // Setup argv in r4. 3553 // Setup argv in r4.
3553 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize; 3554 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize;
(...skipping 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after
6601 __ mov(result, Operand(0)); 6602 __ mov(result, Operand(0));
6602 __ Ret(); 6603 __ Ret();
6603 } 6604 }
6604 6605
6605 6606
6606 #undef __ 6607 #undef __
6607 6608
6608 } } // namespace v8::internal 6609 } } // namespace v8::internal
6609 6610
6610 #endif // V8_TARGET_ARCH_ARM 6611 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698