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

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: Created 6 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
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/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 2939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2950 __ load_rax(ToExternalReference(LConstantOperand::cast(instr->object()))); 2950 __ load_rax(ToExternalReference(LConstantOperand::cast(instr->object())));
2951 } else { 2951 } else {
2952 Register object = ToRegister(instr->object()); 2952 Register object = ToRegister(instr->object());
2953 __ Load(result, MemOperand(object, offset), access.representation()); 2953 __ Load(result, MemOperand(object, offset), access.representation());
2954 } 2954 }
2955 return; 2955 return;
2956 } 2956 }
2957 2957
2958 Register object = ToRegister(instr->object()); 2958 Register object = ToRegister(instr->object());
2959 if (instr->hydrogen()->representation().IsDouble()) { 2959 if (instr->hydrogen()->representation().IsDouble()) {
2960 ASSERT(access.IsInobject());
2960 XMMRegister result = ToDoubleRegister(instr->result()); 2961 XMMRegister result = ToDoubleRegister(instr->result());
2961 __ movsd(result, FieldOperand(object, offset)); 2962 __ movsd(result, FieldOperand(object, offset));
2962 return; 2963 return;
2963 } 2964 }
2964 2965
2965 Register result = ToRegister(instr->result()); 2966 Register result = ToRegister(instr->result());
2966 if (!access.IsInobject()) { 2967 if (!access.IsInobject()) {
2967 __ movp(result, FieldOperand(object, JSObject::kPropertiesOffset)); 2968 __ movp(result, FieldOperand(object, JSObject::kPropertiesOffset));
2968 object = result; 2969 object = result;
2969 } 2970 }
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
4077 } 4078 }
4078 return; 4079 return;
4079 } 4080 }
4080 4081
4081 Register object = ToRegister(instr->object()); 4082 Register object = ToRegister(instr->object());
4082 __ AssertNotSmi(object); 4083 __ AssertNotSmi(object);
4083 4084
4084 ASSERT(!representation.IsSmi() || 4085 ASSERT(!representation.IsSmi() ||
4085 !instr->value()->IsConstantOperand() || 4086 !instr->value()->IsConstantOperand() ||
4086 IsInteger32Constant(LConstantOperand::cast(instr->value()))); 4087 IsInteger32Constant(LConstantOperand::cast(instr->value())));
4087 if (representation.IsDouble()) { 4088 if (!FLAG_unbox_double_fields && representation.IsDouble()) {
4088 ASSERT(access.IsInobject()); 4089 ASSERT(access.IsInobject());
4089 ASSERT(!hinstr->has_transition()); 4090 ASSERT(!hinstr->has_transition());
4090 ASSERT(!hinstr->NeedsWriteBarrier()); 4091 ASSERT(!hinstr->NeedsWriteBarrier());
4091 XMMRegister value = ToDoubleRegister(instr->value()); 4092 XMMRegister value = ToDoubleRegister(instr->value());
4092 __ movsd(FieldOperand(object, offset), value); 4093 __ movsd(FieldOperand(object, offset), value);
4093 return; 4094 return;
4094 } 4095 }
4095 4096
4096 if (hinstr->has_transition()) { 4097 if (hinstr->has_transition()) {
4097 Handle<Map> transition = hinstr->transition_map(); 4098 Handle<Map> transition = hinstr->transition_map();
(...skipping 29 matching lines...) Expand all
4127 } 4128 }
4128 // Store int value directly to upper half of the smi. 4129 // Store int value directly to upper half of the smi.
4129 STATIC_ASSERT(kSmiTag == 0); 4130 STATIC_ASSERT(kSmiTag == 0);
4130 ASSERT(kSmiTagSize + kSmiShiftSize == 32); 4131 ASSERT(kSmiTagSize + kSmiShiftSize == 32);
4131 offset += kPointerSize / 2; 4132 offset += kPointerSize / 2;
4132 representation = Representation::Integer32(); 4133 representation = Representation::Integer32();
4133 } 4134 }
4134 4135
4135 Operand operand = FieldOperand(write_register, offset); 4136 Operand operand = FieldOperand(write_register, offset);
4136 4137
4137 if (instr->value()->IsRegister()) { 4138 if (FLAG_unbox_double_fields && representation.IsDouble()) {
4139 ASSERT(access.IsInobject());
4140 XMMRegister value = ToDoubleRegister(instr->value());
4141 __ movsd(operand, value);
4142
4143 } else if (instr->value()->IsRegister()) {
4138 Register value = ToRegister(instr->value()); 4144 Register value = ToRegister(instr->value());
4139 __ Store(operand, value, representation); 4145 __ Store(operand, value, representation);
4140 } else { 4146 } else {
4141 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 4147 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
4142 if (IsInteger32Constant(operand_value)) { 4148 if (IsInteger32Constant(operand_value)) {
4143 ASSERT(!hinstr->NeedsWriteBarrier()); 4149 ASSERT(!hinstr->NeedsWriteBarrier());
4144 int32_t value = ToInteger32(operand_value); 4150 int32_t value = ToInteger32(operand_value);
4145 if (representation.IsSmi()) { 4151 if (representation.IsSmi()) {
4146 __ Move(operand, Smi::FromInt(value)); 4152 __ Move(operand, Smi::FromInt(value));
4147 4153
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
5842 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5848 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5843 RecordSafepoint(Safepoint::kNoLazyDeopt); 5849 RecordSafepoint(Safepoint::kNoLazyDeopt);
5844 } 5850 }
5845 5851
5846 5852
5847 #undef __ 5853 #undef __
5848 5854
5849 } } // namespace v8::internal 5855 } } // namespace v8::internal
5850 5856
5851 #endif // V8_TARGET_ARCH_X64 5857 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698