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

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

Issue 99763003: MIPS: Fix HInnerAllocatedObject to use an HValue for the offset. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/mips/lithium-mips.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 4075 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 __ Addu(code_object, code_object, 4086 __ Addu(code_object, code_object,
4087 Operand(Code::kHeaderSize - kHeapObjectTag)); 4087 Operand(Code::kHeaderSize - kHeapObjectTag));
4088 __ sw(code_object, 4088 __ sw(code_object,
4089 FieldMemOperand(function, JSFunction::kCodeEntryOffset)); 4089 FieldMemOperand(function, JSFunction::kCodeEntryOffset));
4090 } 4090 }
4091 4091
4092 4092
4093 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { 4093 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) {
4094 Register result = ToRegister(instr->result()); 4094 Register result = ToRegister(instr->result());
4095 Register base = ToRegister(instr->base_object()); 4095 Register base = ToRegister(instr->base_object());
4096 __ Addu(result, base, Operand(instr->offset())); 4096 if (instr->offset()->IsConstantOperand()) {
4097 LConstantOperand* offset = LConstantOperand::cast(instr->offset());
4098 __ Addu(result, base, Operand(ToInteger32(offset)));
4099 } else {
4100 Register offset = ToRegister(instr->offset());
4101 __ Addu(result, base, offset);
4102 }
4097 } 4103 }
4098 4104
4099 4105
4100 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4106 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4101 Representation representation = instr->representation(); 4107 Representation representation = instr->representation();
4102 4108
4103 Register object = ToRegister(instr->object()); 4109 Register object = ToRegister(instr->object());
4104 Register scratch = scratch0(); 4110 Register scratch = scratch0();
4105 HObjectAccess access = instr->hydrogen()->access(); 4111 HObjectAccess access = instr->hydrogen()->access();
4106 int offset = access.offset(); 4112 int offset = access.offset();
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
5869 __ Subu(scratch, result, scratch); 5875 __ Subu(scratch, result, scratch);
5870 __ lw(result, FieldMemOperand(scratch, 5876 __ lw(result, FieldMemOperand(scratch,
5871 FixedArray::kHeaderSize - kPointerSize)); 5877 FixedArray::kHeaderSize - kPointerSize));
5872 __ bind(&done); 5878 __ bind(&done);
5873 } 5879 }
5874 5880
5875 5881
5876 #undef __ 5882 #undef __
5877 5883
5878 } } // namespace v8::internal 5884 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698