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

Side by Side Diff: src/arm64/full-codegen-arm64.cc

Issue 216933003: ARM64: Optimize AllocateHeapNumber to use STP. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « src/arm64/codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.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 4702 matching lines...) Expand 10 before | Expand all | Expand 10 after
4713 __ Push(Smi::FromInt(map->instance_size())); 4713 __ Push(Smi::FromInt(map->instance_size()));
4714 __ CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1); 4714 __ CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1);
4715 __ Ldr(context_register(), 4715 __ Ldr(context_register(),
4716 MemOperand(fp, StandardFrameConstants::kContextOffset)); 4716 MemOperand(fp, StandardFrameConstants::kContextOffset));
4717 4717
4718 __ Bind(&allocated); 4718 __ Bind(&allocated);
4719 Register map_reg = x1; 4719 Register map_reg = x1;
4720 Register result_value = x2; 4720 Register result_value = x2;
4721 Register boolean_done = x3; 4721 Register boolean_done = x3;
4722 Register empty_fixed_array = x4; 4722 Register empty_fixed_array = x4;
4723 Register untagged_result = x5;
4723 __ Mov(map_reg, Operand(map)); 4724 __ Mov(map_reg, Operand(map));
4724 __ Pop(result_value); 4725 __ Pop(result_value);
4725 __ Mov(boolean_done, Operand(isolate()->factory()->ToBoolean(done))); 4726 __ Mov(boolean_done, Operand(isolate()->factory()->ToBoolean(done)));
4726 __ Mov(empty_fixed_array, Operand(isolate()->factory()->empty_fixed_array())); 4727 __ Mov(empty_fixed_array, Operand(isolate()->factory()->empty_fixed_array()));
4727 ASSERT_EQ(map->instance_size(), 5 * kPointerSize); 4728 ASSERT_EQ(map->instance_size(), 5 * kPointerSize);
4728 // TODO(jbramley): Use Stp if possible. 4729 STATIC_ASSERT(JSObject::kPropertiesOffset + kPointerSize ==
4729 __ Str(map_reg, FieldMemOperand(result, HeapObject::kMapOffset)); 4730 JSObject::kElementsOffset);
4730 __ Str(empty_fixed_array, 4731 STATIC_ASSERT(JSGeneratorObject::kResultValuePropertyOffset + kPointerSize ==
4731 FieldMemOperand(result, JSObject::kPropertiesOffset)); 4732 JSGeneratorObject::kResultDonePropertyOffset);
4732 __ Str(empty_fixed_array, FieldMemOperand(result, JSObject::kElementsOffset)); 4733 __ ObjectUntag(untagged_result, result);
4733 __ Str(result_value, 4734 __ Str(map_reg, MemOperand(untagged_result, HeapObject::kMapOffset));
4734 FieldMemOperand(result, 4735 __ Stp(empty_fixed_array, empty_fixed_array,
4735 JSGeneratorObject::kResultValuePropertyOffset)); 4736 MemOperand(untagged_result, JSObject::kPropertiesOffset));
4736 __ Str(boolean_done, 4737 __ Stp(result_value, boolean_done,
4737 FieldMemOperand(result, 4738 MemOperand(untagged_result,
4738 JSGeneratorObject::kResultDonePropertyOffset)); 4739 JSGeneratorObject::kResultValuePropertyOffset));
4739 4740
4740 // Only the value field needs a write barrier, as the other values are in the 4741 // Only the value field needs a write barrier, as the other values are in the
4741 // root set. 4742 // root set.
4742 __ RecordWriteField(result, JSGeneratorObject::kResultValuePropertyOffset, 4743 __ RecordWriteField(result, JSGeneratorObject::kResultValuePropertyOffset,
4743 x10, x11, kLRHasBeenSaved, kDontSaveFPRegs); 4744 x10, x11, kLRHasBeenSaved, kDontSaveFPRegs);
4744 } 4745 }
4745 4746
4746 4747
4747 // TODO(all): I don't like this method. 4748 // TODO(all): I don't like this method.
4748 // It seems to me that in too many places x0 is used in place of this. 4749 // It seems to me that in too many places x0 is used in place of this.
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
4986 return previous_; 4987 return previous_;
4987 } 4988 }
4988 4989
4989 4990
4990 #undef __ 4991 #undef __
4991 4992
4992 4993
4993 } } // namespace v8::internal 4994 } } // namespace v8::internal
4994 4995
4995 #endif // V8_TARGET_ARCH_ARM64 4996 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698