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

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

Issue 391693002: In-object double fields unboxing (for 64-bit only). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing Created 6 years, 1 month 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/string-stream.cc ('k') | test/cctest/cctest.gyp » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2958 matching lines...) Expand 10 before | Expand all | Expand 10 after
2969 __ load_rax(ToExternalReference(LConstantOperand::cast(instr->object()))); 2969 __ load_rax(ToExternalReference(LConstantOperand::cast(instr->object())));
2970 } else { 2970 } else {
2971 Register object = ToRegister(instr->object()); 2971 Register object = ToRegister(instr->object());
2972 __ Load(result, MemOperand(object, offset), access.representation()); 2972 __ Load(result, MemOperand(object, offset), access.representation());
2973 } 2973 }
2974 return; 2974 return;
2975 } 2975 }
2976 2976
2977 Register object = ToRegister(instr->object()); 2977 Register object = ToRegister(instr->object());
2978 if (instr->hydrogen()->representation().IsDouble()) { 2978 if (instr->hydrogen()->representation().IsDouble()) {
2979 DCHECK(access.IsInobject());
2979 XMMRegister result = ToDoubleRegister(instr->result()); 2980 XMMRegister result = ToDoubleRegister(instr->result());
2980 __ movsd(result, FieldOperand(object, offset)); 2981 __ movsd(result, FieldOperand(object, offset));
2981 return; 2982 return;
2982 } 2983 }
2983 2984
2984 Register result = ToRegister(instr->result()); 2985 Register result = ToRegister(instr->result());
2985 if (!access.IsInobject()) { 2986 if (!access.IsInobject()) {
2986 __ movp(result, FieldOperand(object, JSObject::kPropertiesOffset)); 2987 __ movp(result, FieldOperand(object, JSObject::kPropertiesOffset));
2987 object = result; 2988 object = result;
2988 } 2989 }
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
4115 } 4116 }
4116 return; 4117 return;
4117 } 4118 }
4118 4119
4119 Register object = ToRegister(instr->object()); 4120 Register object = ToRegister(instr->object());
4120 __ AssertNotSmi(object); 4121 __ AssertNotSmi(object);
4121 4122
4122 DCHECK(!representation.IsSmi() || 4123 DCHECK(!representation.IsSmi() ||
4123 !instr->value()->IsConstantOperand() || 4124 !instr->value()->IsConstantOperand() ||
4124 IsInteger32Constant(LConstantOperand::cast(instr->value()))); 4125 IsInteger32Constant(LConstantOperand::cast(instr->value())));
4125 if (representation.IsDouble()) { 4126 if (!FLAG_unbox_double_fields && representation.IsDouble()) {
4126 DCHECK(access.IsInobject()); 4127 DCHECK(access.IsInobject());
4127 DCHECK(!hinstr->has_transition()); 4128 DCHECK(!hinstr->has_transition());
4128 DCHECK(!hinstr->NeedsWriteBarrier()); 4129 DCHECK(!hinstr->NeedsWriteBarrier());
4129 XMMRegister value = ToDoubleRegister(instr->value()); 4130 XMMRegister value = ToDoubleRegister(instr->value());
4130 __ movsd(FieldOperand(object, offset), value); 4131 __ movsd(FieldOperand(object, offset), value);
4131 return; 4132 return;
4132 } 4133 }
4133 4134
4134 if (hinstr->has_transition()) { 4135 if (hinstr->has_transition()) {
4135 Handle<Map> transition = hinstr->transition_map(); 4136 Handle<Map> transition = hinstr->transition_map();
(...skipping 29 matching lines...) Expand all
4165 } 4166 }
4166 // Store int value directly to upper half of the smi. 4167 // Store int value directly to upper half of the smi.
4167 STATIC_ASSERT(kSmiTag == 0); 4168 STATIC_ASSERT(kSmiTag == 0);
4168 DCHECK(kSmiTagSize + kSmiShiftSize == 32); 4169 DCHECK(kSmiTagSize + kSmiShiftSize == 32);
4169 offset += kPointerSize / 2; 4170 offset += kPointerSize / 2;
4170 representation = Representation::Integer32(); 4171 representation = Representation::Integer32();
4171 } 4172 }
4172 4173
4173 Operand operand = FieldOperand(write_register, offset); 4174 Operand operand = FieldOperand(write_register, offset);
4174 4175
4175 if (instr->value()->IsRegister()) { 4176 if (FLAG_unbox_double_fields && representation.IsDouble()) {
4177 DCHECK(access.IsInobject());
4178 XMMRegister value = ToDoubleRegister(instr->value());
4179 __ movsd(operand, value);
4180
4181 } else if (instr->value()->IsRegister()) {
4176 Register value = ToRegister(instr->value()); 4182 Register value = ToRegister(instr->value());
4177 __ Store(operand, value, representation); 4183 __ Store(operand, value, representation);
4178 } else { 4184 } else {
4179 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 4185 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
4180 if (IsInteger32Constant(operand_value)) { 4186 if (IsInteger32Constant(operand_value)) {
4181 DCHECK(!hinstr->NeedsWriteBarrier()); 4187 DCHECK(!hinstr->NeedsWriteBarrier());
4182 int32_t value = ToInteger32(operand_value); 4188 int32_t value = ToInteger32(operand_value);
4183 if (representation.IsSmi()) { 4189 if (representation.IsSmi()) {
4184 __ Move(operand, Smi::FromInt(value)); 4190 __ Move(operand, Smi::FromInt(value));
4185 4191
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
5883 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5889 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5884 RecordSafepoint(Safepoint::kNoLazyDeopt); 5890 RecordSafepoint(Safepoint::kNoLazyDeopt);
5885 } 5891 }
5886 5892
5887 5893
5888 #undef __ 5894 #undef __
5889 5895
5890 } } // namespace v8::internal 5896 } } // namespace v8::internal
5891 5897
5892 #endif // V8_TARGET_ARCH_X64 5898 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/string-stream.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698