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

Side by Side Diff: src/mips/lithium-gap-resolver-mips.cc

Issue 22314010: ARM/MIPS: Fix Constant-to-DoubleRegister moves in LGapResolver (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/arm/lithium-gap-resolver-arm.cc ('k') | no next file » | 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 LConstantOperand* constant_source = LConstantOperand::cast(source); 251 LConstantOperand* constant_source = LConstantOperand::cast(source);
252 if (destination->IsRegister()) { 252 if (destination->IsRegister()) {
253 Register dst = cgen_->ToRegister(destination); 253 Register dst = cgen_->ToRegister(destination);
254 Representation r = cgen_->IsSmi(constant_source) 254 Representation r = cgen_->IsSmi(constant_source)
255 ? Representation::Smi() : Representation::Integer32(); 255 ? Representation::Smi() : Representation::Integer32();
256 if (cgen_->IsInteger32(constant_source)) { 256 if (cgen_->IsInteger32(constant_source)) {
257 __ li(dst, Operand(cgen_->ToRepresentation(constant_source, r))); 257 __ li(dst, Operand(cgen_->ToRepresentation(constant_source, r)));
258 } else { 258 } else {
259 __ LoadObject(dst, cgen_->ToHandle(constant_source)); 259 __ LoadObject(dst, cgen_->ToHandle(constant_source));
260 } 260 }
261 } else if (source->IsDoubleRegister()) { 261 } else if (destination->IsDoubleRegister()) {
262 DoubleRegister result = cgen_->ToDoubleRegister(destination); 262 DoubleRegister result = cgen_->ToDoubleRegister(destination);
263 double v = cgen_->ToDouble(constant_source); 263 double v = cgen_->ToDouble(constant_source);
264 __ Move(result, v); 264 __ Move(result, v);
265 } else { 265 } else {
266 ASSERT(destination->IsStackSlot()); 266 ASSERT(destination->IsStackSlot());
267 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone. 267 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone.
268 Representation r = cgen_->IsSmi(constant_source) 268 Representation r = cgen_->IsSmi(constant_source)
269 ? Representation::Smi() : Representation::Integer32(); 269 ? Representation::Smi() : Representation::Integer32();
270 if (cgen_->IsInteger32(constant_source)) { 270 if (cgen_->IsInteger32(constant_source)) {
271 __ li(kLithiumScratchReg, 271 __ li(kLithiumScratchReg,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 UNREACHABLE(); 314 UNREACHABLE();
315 } 315 }
316 316
317 moves_[index].Eliminate(); 317 moves_[index].Eliminate();
318 } 318 }
319 319
320 320
321 #undef __ 321 #undef __
322 322
323 } } // namespace v8::internal 323 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-gap-resolver-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698