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

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

Issue 66553004: Revert "Add signed/unsigned 8-bit and 16-bit Representations to Crankshaft" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/arm/macro-assembler-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3062 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 3073
3074 3074
3075 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 3075 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
3076 HObjectAccess access = instr->hydrogen()->access(); 3076 HObjectAccess access = instr->hydrogen()->access();
3077 int offset = access.offset(); 3077 int offset = access.offset();
3078 Register object = ToRegister(instr->object()); 3078 Register object = ToRegister(instr->object());
3079 3079
3080 if (access.IsExternalMemory()) { 3080 if (access.IsExternalMemory()) {
3081 Register result = ToRegister(instr->result()); 3081 Register result = ToRegister(instr->result());
3082 MemOperand operand = MemOperand(object, offset); 3082 MemOperand operand = MemOperand(object, offset);
3083 __ Load(result, operand, access.representation()); 3083 if (access.representation().IsByte()) {
3084 __ ldrb(result, operand);
3085 } else {
3086 __ ldr(result, operand);
3087 }
3084 return; 3088 return;
3085 } 3089 }
3086 3090
3087 if (instr->hydrogen()->representation().IsDouble()) { 3091 if (instr->hydrogen()->representation().IsDouble()) {
3088 DwVfpRegister result = ToDoubleRegister(instr->result()); 3092 DwVfpRegister result = ToDoubleRegister(instr->result());
3089 __ vldr(result, FieldMemOperand(object, offset)); 3093 __ vldr(result, FieldMemOperand(object, offset));
3090 return; 3094 return;
3091 } 3095 }
3092 3096
3093 Register result = ToRegister(instr->result()); 3097 Register result = ToRegister(instr->result());
3094 if (!access.IsInobject()) { 3098 if (!access.IsInobject()) {
3095 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 3099 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
3096 object = result; 3100 object = result;
3097 } 3101 }
3098 MemOperand operand = FieldMemOperand(object, offset); 3102 MemOperand operand = FieldMemOperand(object, offset);
3099 __ Load(result, operand, access.representation()); 3103 if (access.representation().IsByte()) {
3104 __ ldrb(result, operand);
3105 } else {
3106 __ ldr(result, operand);
3107 }
3100 } 3108 }
3101 3109
3102 3110
3103 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3111 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3104 ASSERT(ToRegister(instr->context()).is(cp)); 3112 ASSERT(ToRegister(instr->context()).is(cp));
3105 ASSERT(ToRegister(instr->object()).is(r0)); 3113 ASSERT(ToRegister(instr->object()).is(r0));
3106 ASSERT(ToRegister(instr->result()).is(r0)); 3114 ASSERT(ToRegister(instr->result()).is(r0));
3107 3115
3108 // Name is always in r2. 3116 // Name is always in r2.
3109 __ mov(r2, Operand(instr->name())); 3117 __ mov(r2, Operand(instr->name()));
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
4192 Representation representation = instr->representation(); 4200 Representation representation = instr->representation();
4193 4201
4194 Register object = ToRegister(instr->object()); 4202 Register object = ToRegister(instr->object());
4195 Register scratch = scratch0(); 4203 Register scratch = scratch0();
4196 HObjectAccess access = instr->hydrogen()->access(); 4204 HObjectAccess access = instr->hydrogen()->access();
4197 int offset = access.offset(); 4205 int offset = access.offset();
4198 4206
4199 if (access.IsExternalMemory()) { 4207 if (access.IsExternalMemory()) {
4200 Register value = ToRegister(instr->value()); 4208 Register value = ToRegister(instr->value());
4201 MemOperand operand = MemOperand(object, offset); 4209 MemOperand operand = MemOperand(object, offset);
4202 __ Store(value, operand, representation); 4210 if (representation.IsByte()) {
4211 __ strb(value, operand);
4212 } else {
4213 __ str(value, operand);
4214 }
4203 return; 4215 return;
4204 } 4216 }
4205 4217
4206 Handle<Map> transition = instr->transition(); 4218 Handle<Map> transition = instr->transition();
4207 4219
4208 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { 4220 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
4209 Register value = ToRegister(instr->value()); 4221 Register value = ToRegister(instr->value());
4210 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 4222 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
4211 __ SmiTst(value); 4223 __ SmiTst(value);
4212 DeoptimizeIf(eq, instr->environment()); 4224 DeoptimizeIf(eq, instr->environment());
(...skipping 25 matching lines...) Expand all
4238 } 4250 }
4239 4251
4240 // Do the store. 4252 // Do the store.
4241 Register value = ToRegister(instr->value()); 4253 Register value = ToRegister(instr->value());
4242 ASSERT(!object.is(value)); 4254 ASSERT(!object.is(value));
4243 SmiCheck check_needed = 4255 SmiCheck check_needed =
4244 instr->hydrogen()->value()->IsHeapObject() 4256 instr->hydrogen()->value()->IsHeapObject()
4245 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 4257 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
4246 if (access.IsInobject()) { 4258 if (access.IsInobject()) {
4247 MemOperand operand = FieldMemOperand(object, offset); 4259 MemOperand operand = FieldMemOperand(object, offset);
4248 __ Store(value, operand, representation); 4260 if (representation.IsByte()) {
4261 __ strb(value, operand);
4262 } else {
4263 __ str(value, operand);
4264 }
4249 if (instr->hydrogen()->NeedsWriteBarrier()) { 4265 if (instr->hydrogen()->NeedsWriteBarrier()) {
4250 // Update the write barrier for the object for in-object properties. 4266 // Update the write barrier for the object for in-object properties.
4251 __ RecordWriteField(object, 4267 __ RecordWriteField(object,
4252 offset, 4268 offset,
4253 value, 4269 value,
4254 scratch, 4270 scratch,
4255 GetLinkRegisterState(), 4271 GetLinkRegisterState(),
4256 kSaveFPRegs, 4272 kSaveFPRegs,
4257 EMIT_REMEMBERED_SET, 4273 EMIT_REMEMBERED_SET,
4258 check_needed); 4274 check_needed);
4259 } 4275 }
4260 } else { 4276 } else {
4261 __ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); 4277 __ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset));
4262 MemOperand operand = FieldMemOperand(scratch, offset); 4278 MemOperand operand = FieldMemOperand(scratch, offset);
4263 __ Store(value, operand, representation); 4279 if (representation.IsByte()) {
4280 __ strb(value, operand);
4281 } else {
4282 __ str(value, operand);
4283 }
4264 if (instr->hydrogen()->NeedsWriteBarrier()) { 4284 if (instr->hydrogen()->NeedsWriteBarrier()) {
4265 // Update the write barrier for the properties array. 4285 // Update the write barrier for the properties array.
4266 // object is used as a scratch register. 4286 // object is used as a scratch register.
4267 __ RecordWriteField(scratch, 4287 __ RecordWriteField(scratch,
4268 offset, 4288 offset,
4269 value, 4289 value,
4270 object, 4290 object,
4271 GetLinkRegisterState(), 4291 GetLinkRegisterState(),
4272 kSaveFPRegs, 4292 kSaveFPRegs,
4273 EMIT_REMEMBERED_SET, 4293 EMIT_REMEMBERED_SET,
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
5870 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5890 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5871 __ ldr(result, FieldMemOperand(scratch, 5891 __ ldr(result, FieldMemOperand(scratch,
5872 FixedArray::kHeaderSize - kPointerSize)); 5892 FixedArray::kHeaderSize - kPointerSize));
5873 __ bind(&done); 5893 __ bind(&done);
5874 } 5894 }
5875 5895
5876 5896
5877 #undef __ 5897 #undef __
5878 5898
5879 } } // namespace v8::internal 5899 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698