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

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

Issue 25679008: Revert "Add support to load/store byte fields." and "MIPS: Add support to load/store byte fields.". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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/property-details.h ('k') | src/x64/lithium-x64.cc » ('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 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 2718
2719 __ bind(&skip_assignment); 2719 __ bind(&skip_assignment);
2720 } 2720 }
2721 2721
2722 2722
2723 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 2723 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
2724 HObjectAccess access = instr->hydrogen()->access(); 2724 HObjectAccess access = instr->hydrogen()->access();
2725 int offset = access.offset(); 2725 int offset = access.offset();
2726 2726
2727 if (access.IsExternalMemory()) { 2727 if (access.IsExternalMemory()) {
2728 ASSERT(!access.representation().IsInteger32());
2728 Register result = ToRegister(instr->result()); 2729 Register result = ToRegister(instr->result());
2729 if (instr->object()->IsConstantOperand()) { 2730 if (instr->object()->IsConstantOperand()) {
2730 ASSERT(result.is(rax)); 2731 ASSERT(result.is(rax));
2731 __ load_rax(ToExternalReference(LConstantOperand::cast(instr->object()))); 2732 __ load_rax(ToExternalReference(LConstantOperand::cast(instr->object())));
2732 } else { 2733 } else {
2733 Register object = ToRegister(instr->object()); 2734 Register object = ToRegister(instr->object());
2734 __ Load(result, MemOperand(object, offset), access.representation()); 2735 __ movq(result, MemOperand(object, offset));
2735 } 2736 }
2736 return; 2737 return;
2737 } 2738 }
2738 2739
2739 Register object = ToRegister(instr->object()); 2740 Register object = ToRegister(instr->object());
2740 if (FLAG_track_double_fields && 2741 if (FLAG_track_double_fields &&
2741 instr->hydrogen()->representation().IsDouble()) { 2742 instr->hydrogen()->representation().IsDouble()) {
2742 XMMRegister result = ToDoubleRegister(instr->result()); 2743 XMMRegister result = ToDoubleRegister(instr->result());
2743 __ movsd(result, FieldOperand(object, offset)); 2744 __ movsd(result, FieldOperand(object, offset));
2744 return; 2745 return;
2745 } 2746 }
2746 2747
2747 Register result = ToRegister(instr->result()); 2748 Register result = ToRegister(instr->result());
2748 if (!access.IsInobject()) { 2749 if (access.IsInobject()) {
2750 if (access.representation().IsInteger32()) {
2751 __ movl(result, FieldOperand(object, offset));
2752 } else {
2753 __ movq(result, FieldOperand(object, offset));
2754 }
2755 } else {
2749 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); 2756 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset));
2750 object = result; 2757 if (access.representation().IsInteger32()) {
2758 __ movl(result, FieldOperand(result, offset));
2759 } else {
2760 __ movq(result, FieldOperand(result, offset));
2761 }
2751 } 2762 }
2752 __ Load(result, FieldOperand(object, offset), access.representation());
2753 } 2763 }
2754 2764
2755 2765
2756 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2766 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2757 ASSERT(ToRegister(instr->object()).is(rax)); 2767 ASSERT(ToRegister(instr->object()).is(rax));
2758 ASSERT(ToRegister(instr->result()).is(rax)); 2768 ASSERT(ToRegister(instr->result()).is(rax));
2759 2769
2760 __ Move(rcx, instr->name()); 2770 __ Move(rcx, instr->name());
2761 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 2771 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2762 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2772 CallCode(ic, RelocInfo::CODE_TARGET, instr);
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3864 } 3874 }
3865 3875
3866 3876
3867 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 3877 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
3868 Representation representation = instr->representation(); 3878 Representation representation = instr->representation();
3869 3879
3870 HObjectAccess access = instr->hydrogen()->access(); 3880 HObjectAccess access = instr->hydrogen()->access();
3871 int offset = access.offset(); 3881 int offset = access.offset();
3872 3882
3873 if (access.IsExternalMemory()) { 3883 if (access.IsExternalMemory()) {
3884 ASSERT(!access.representation().IsInteger32());
3874 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3885 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3875 Register value = ToRegister(instr->value()); 3886 Register value = ToRegister(instr->value());
3876 if (instr->object()->IsConstantOperand()) { 3887 if (instr->object()->IsConstantOperand()) {
3877 ASSERT(value.is(rax)); 3888 ASSERT(value.is(rax));
3878 ASSERT(!access.representation().IsSpecialization());
3879 LConstantOperand* object = LConstantOperand::cast(instr->object()); 3889 LConstantOperand* object = LConstantOperand::cast(instr->object());
3880 __ store_rax(ToExternalReference(object)); 3890 __ store_rax(ToExternalReference(object));
3881 } else { 3891 } else {
3882 Register object = ToRegister(instr->object()); 3892 Register object = ToRegister(instr->object());
3883 __ Store(MemOperand(object, offset), value, representation); 3893 __ movq(MemOperand(object, offset), value);
3884 } 3894 }
3885 return; 3895 return;
3886 } 3896 }
3887 3897
3888 Register object = ToRegister(instr->object()); 3898 Register object = ToRegister(instr->object());
3889 Handle<Map> transition = instr->transition(); 3899 Handle<Map> transition = instr->transition();
3890 3900
3891 if (FLAG_track_fields && representation.IsSmi()) { 3901 if (FLAG_track_fields && representation.IsSmi()) {
3892 if (instr->value()->IsConstantOperand()) { 3902 if (instr->value()->IsConstantOperand()) {
3893 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 3903 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3942 3952
3943 Register write_register = object; 3953 Register write_register = object;
3944 if (!access.IsInobject()) { 3954 if (!access.IsInobject()) {
3945 write_register = ToRegister(instr->temp()); 3955 write_register = ToRegister(instr->temp());
3946 __ movq(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); 3956 __ movq(write_register, FieldOperand(object, JSObject::kPropertiesOffset));
3947 } 3957 }
3948 3958
3949 if (instr->value()->IsConstantOperand()) { 3959 if (instr->value()->IsConstantOperand()) {
3950 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); 3960 LConstantOperand* operand_value = LConstantOperand::cast(instr->value());
3951 if (operand_value->IsRegister()) { 3961 if (operand_value->IsRegister()) {
3952 Register value = ToRegister(operand_value); 3962 if (access.representation().IsInteger32()) {
3953 __ Store(FieldOperand(write_register, offset), value, representation); 3963 __ movl(FieldOperand(write_register, offset),
3964 ToRegister(operand_value));
3965 } else {
3966 __ movq(FieldOperand(write_register, offset),
3967 ToRegister(operand_value));
3968 }
3954 } else { 3969 } else {
3955 Handle<Object> handle_value = ToHandle(operand_value); 3970 Handle<Object> handle_value = ToHandle(operand_value);
3956 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3971 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3957 __ Move(FieldOperand(write_register, offset), handle_value); 3972 __ Move(FieldOperand(write_register, offset), handle_value);
3958 } 3973 }
3959 } else { 3974 } else {
3960 Register value = ToRegister(instr->value()); 3975 if (access.representation().IsInteger32()) {
3961 __ Store(FieldOperand(write_register, offset), value, representation); 3976 __ movl(FieldOperand(write_register, offset), ToRegister(instr->value()));
3977 } else {
3978 __ movq(FieldOperand(write_register, offset), ToRegister(instr->value()));
3979 }
3962 } 3980 }
3963 3981
3964 if (instr->hydrogen()->NeedsWriteBarrier()) { 3982 if (instr->hydrogen()->NeedsWriteBarrier()) {
3965 Register value = ToRegister(instr->value()); 3983 Register value = ToRegister(instr->value());
3966 Register temp = access.IsInobject() ? ToRegister(instr->temp()) : object; 3984 Register temp = access.IsInobject() ? ToRegister(instr->temp()) : object;
3967 // Update the write barrier for the object for in-object properties. 3985 // Update the write barrier for the object for in-object properties.
3968 __ RecordWriteField(write_register, 3986 __ RecordWriteField(write_register,
3969 offset, 3987 offset,
3970 value, 3988 value,
3971 temp, 3989 temp,
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
5443 FixedArray::kHeaderSize - kPointerSize)); 5461 FixedArray::kHeaderSize - kPointerSize));
5444 __ bind(&done); 5462 __ bind(&done);
5445 } 5463 }
5446 5464
5447 5465
5448 #undef __ 5466 #undef __
5449 5467
5450 } } // namespace v8::internal 5468 } } // namespace v8::internal
5451 5469
5452 #endif // V8_TARGET_ARCH_X64 5470 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/property-details.h ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698