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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 14121006: ARM: Small copy optimization. Copying 64bits at a time. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5596 matching lines...) Expand 10 before | Expand all | Expand 10 after
5607 __ jmp(&allocated); 5607 __ jmp(&allocated);
5608 5608
5609 __ bind(&runtime_allocate); 5609 __ bind(&runtime_allocate);
5610 __ mov(r0, Operand(Smi::FromInt(size))); 5610 __ mov(r0, Operand(Smi::FromInt(size)));
5611 __ Push(r1, r0); 5611 __ Push(r1, r0);
5612 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr); 5612 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr);
5613 __ pop(r1); 5613 __ pop(r1);
5614 5614
5615 __ bind(&allocated); 5615 __ bind(&allocated);
5616 // Copy the content into the newly allocated memory. 5616 // Copy the content into the newly allocated memory.
5617 // (Unroll copy loop once for better throughput). 5617 __ CopyFields(r0, r1, double_scratch0(), double_scratch0().low(),
5618 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { 5618 size / kPointerSize);
5619 __ ldr(r3, FieldMemOperand(r1, i));
5620 __ ldr(r2, FieldMemOperand(r1, i + kPointerSize));
5621 __ str(r3, FieldMemOperand(r0, i));
5622 __ str(r2, FieldMemOperand(r0, i + kPointerSize));
5623 }
5624 if ((size % (2 * kPointerSize)) != 0) {
5625 __ ldr(r3, FieldMemOperand(r1, size - kPointerSize));
5626 __ str(r3, FieldMemOperand(r0, size - kPointerSize));
5627 }
5628 } 5619 }
5629 5620
5630 5621
5631 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 5622 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
5632 // Use the fast case closure allocation code that allocates in new 5623 // Use the fast case closure allocation code that allocates in new
5633 // space for nested functions that don't need literals cloning. 5624 // space for nested functions that don't need literals cloning.
5634 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); 5625 Handle<SharedFunctionInfo> shared_info = instr->shared_info();
5635 bool pretenure = instr->hydrogen()->pretenure(); 5626 bool pretenure = instr->hydrogen()->pretenure();
5636 if (!pretenure && shared_info->num_literals() == 0) { 5627 if (!pretenure && shared_info->num_literals() == 0) {
5637 FastNewClosureStub stub(shared_info->language_mode(), 5628 FastNewClosureStub stub(shared_info->language_mode(),
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
6012 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 6003 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
6013 __ ldr(result, FieldMemOperand(scratch, 6004 __ ldr(result, FieldMemOperand(scratch,
6014 FixedArray::kHeaderSize - kPointerSize)); 6005 FixedArray::kHeaderSize - kPointerSize));
6015 __ bind(&done); 6006 __ bind(&done);
6016 } 6007 }
6017 6008
6018 6009
6019 #undef __ 6010 #undef __
6020 6011
6021 } } // namespace v8::internal 6012 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698