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

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

Issue 190763012: A64: Implement and use FillFields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Ulan's comments Created 6 years, 9 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/a64/lithium-a64.cc ('k') | src/a64/macro-assembler-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); 1510 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
1511 } else { 1511 } else {
1512 Register size = ToRegister32(instr->size()); 1512 Register size = ToRegister32(instr->size());
1513 __ Sxtw(size.X(), size); 1513 __ Sxtw(size.X(), size);
1514 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); 1514 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags);
1515 } 1515 }
1516 1516
1517 __ Bind(deferred->exit()); 1517 __ Bind(deferred->exit());
1518 1518
1519 if (instr->hydrogen()->MustPrefillWithFiller()) { 1519 if (instr->hydrogen()->MustPrefillWithFiller()) {
1520 Register filler_count = temp1;
1521 Register filler = temp2;
1522 Register untagged_result = ToRegister(instr->temp3());
1523
1520 if (instr->size()->IsConstantOperand()) { 1524 if (instr->size()->IsConstantOperand()) {
1521 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 1525 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
1522 __ Mov(temp1, size - kPointerSize); 1526 __ Mov(filler_count, size / kPointerSize);
1523 } else { 1527 } else {
1524 __ Sub(temp1.W(), ToRegister32(instr->size()), kPointerSize); 1528 __ Lsr(filler_count.W(), ToRegister32(instr->size()), kPointerSizeLog2);
1525 } 1529 }
1526 __ Sub(result, result, kHeapObjectTag);
1527 1530
1528 // TODO(jbramley): Optimize this loop using stp. 1531 __ Sub(untagged_result, result, kHeapObjectTag);
1529 Label loop; 1532 __ Mov(filler, Operand(isolate()->factory()->one_pointer_filler_map()));
1530 __ Bind(&loop); 1533 __ FillFields(untagged_result, filler_count, filler);
1531 __ Mov(temp2, Operand(isolate()->factory()->one_pointer_filler_map())); 1534 } else {
1532 __ Str(temp2, MemOperand(result, temp1)); 1535 ASSERT(instr->temp3() == NULL);
1533 __ Subs(temp1, temp1, kPointerSize);
1534 __ B(ge, &loop);
1535
1536 __ Add(result, result, kHeapObjectTag);
1537 } 1536 }
1538 } 1537 }
1539 1538
1540 1539
1541 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { 1540 void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
1542 // TODO(3095996): Get rid of this. For now, we need to make the 1541 // TODO(3095996): Get rid of this. For now, we need to make the
1543 // result register contain a valid pointer because it is already 1542 // result register contain a valid pointer because it is already
1544 // contained in the register pointer map. 1543 // contained in the register pointer map.
1545 __ Mov(ToRegister(instr->result()), Operand(Smi::FromInt(0))); 1544 __ Mov(ToRegister(instr->result()), Operand(Smi::FromInt(0)));
1546 1545
(...skipping 4305 matching lines...) Expand 10 before | Expand all | Expand 10 after
5852 __ Bind(&out_of_object); 5851 __ Bind(&out_of_object);
5853 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5852 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5854 // Index is equal to negated out of object property index plus 1. 5853 // Index is equal to negated out of object property index plus 1.
5855 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5854 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5856 __ Ldr(result, FieldMemOperand(result, 5855 __ Ldr(result, FieldMemOperand(result,
5857 FixedArray::kHeaderSize - kPointerSize)); 5856 FixedArray::kHeaderSize - kPointerSize));
5858 __ Bind(&done); 5857 __ Bind(&done);
5859 } 5858 }
5860 5859
5861 } } // namespace v8::internal 5860 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698