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/mips/lithium-gap-resolver-mips.cc

Issue 9032005: MIPS: Avoid embedding new space objects into code objects in the lithium gap resolver. (Closed)
Patch Set: Rebased on r10334. Created 8 years, 11 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
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 __ lw(at, source_operand); 245 __ lw(at, source_operand);
246 __ sw(at, destination_operand); 246 __ sw(at, destination_operand);
247 } 247 }
248 } else { 248 } else {
249 __ lw(kSavedValueRegister, source_operand); 249 __ lw(kSavedValueRegister, source_operand);
250 __ sw(kSavedValueRegister, destination_operand); 250 __ sw(kSavedValueRegister, destination_operand);
251 } 251 }
252 } 252 }
253 253
254 } else if (source->IsConstantOperand()) { 254 } else if (source->IsConstantOperand()) {
255 Operand source_operand = cgen_->ToOperand(source); 255 LConstantOperand* constant_source = LConstantOperand::cast(source);
256 if (destination->IsRegister()) { 256 if (destination->IsRegister()) {
257 __ li(cgen_->ToRegister(destination), source_operand); 257 Register dst = cgen_->ToRegister(destination);
258 if (cgen_->IsInteger32(constant_source)) {
259 __ li(dst, Operand(cgen_->ToInteger32(constant_source)));
260 } else {
261 __ LoadObject(dst, cgen_->ToHandle(constant_source));
262 }
258 } else { 263 } else {
259 ASSERT(destination->IsStackSlot()); 264 ASSERT(destination->IsStackSlot());
260 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone. 265 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone.
261 MemOperand destination_operand = cgen_->ToMemOperand(destination); 266 if (cgen_->IsInteger32(constant_source)) {
262 __ li(kSavedValueRegister, source_operand); 267 __ li(kSavedValueRegister,
268 Operand(cgen_->ToInteger32(constant_source)));
269 } else {
270 __ LoadObject(kSavedValueRegister,
271 cgen_->ToHandle(constant_source));
272 }
263 __ sw(kSavedValueRegister, cgen_->ToMemOperand(destination)); 273 __ sw(kSavedValueRegister, cgen_->ToMemOperand(destination));
264 } 274 }
265 275
266 } else if (source->IsDoubleRegister()) { 276 } else if (source->IsDoubleRegister()) {
267 DoubleRegister source_register = cgen_->ToDoubleRegister(source); 277 DoubleRegister source_register = cgen_->ToDoubleRegister(source);
268 if (destination->IsDoubleRegister()) { 278 if (destination->IsDoubleRegister()) {
269 __ mov_d(cgen_->ToDoubleRegister(destination), source_register); 279 __ mov_d(cgen_->ToDoubleRegister(destination), source_register);
270 } else { 280 } else {
271 ASSERT(destination->IsDoubleStackSlot()); 281 ASSERT(destination->IsDoubleStackSlot());
272 MemOperand destination_operand = cgen_->ToMemOperand(destination); 282 MemOperand destination_operand = cgen_->ToMemOperand(destination);
(...skipping 27 matching lines...) Expand all
300 UNREACHABLE(); 310 UNREACHABLE();
301 } 311 }
302 312
303 moves_[index].Eliminate(); 313 moves_[index].Eliminate();
304 } 314 }
305 315
306 316
307 #undef __ 317 #undef __
308 318
309 } } // namespace v8::internal 319 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698