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

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

Issue 22903028: Make x87 stack tracking more robust and avoid spilling (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
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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 XMMRegister dst = cgen_->ToDoubleRegister(destination); 358 XMMRegister dst = cgen_->ToDoubleRegister(destination);
359 __ movaps(dst, src); 359 __ movaps(dst, src);
360 } else { 360 } else {
361 ASSERT(destination->IsDoubleStackSlot()); 361 ASSERT(destination->IsDoubleStackSlot());
362 Operand dst = cgen_->ToOperand(destination); 362 Operand dst = cgen_->ToOperand(destination);
363 __ movdbl(dst, src); 363 __ movdbl(dst, src);
364 } 364 }
365 } else { 365 } else {
366 // load from the register onto the stack, store in destination, which must 366 // load from the register onto the stack, store in destination, which must
367 // be a double stack slot in the non-SSE2 case. 367 // be a double stack slot in the non-SSE2 case.
368 ASSERT(destination->IsDoubleStackSlot());
369 Operand dst = cgen_->ToOperand(destination);
370 X87Register src = cgen_->ToX87Register(source); 368 X87Register src = cgen_->ToX87Register(source);
371 cgen_->X87Mov(dst, src); 369 if (destination->IsDoubleStackSlot()) {
370 Operand dst = cgen_->ToOperand(destination);
371 cgen_->X87Mov(dst, src);
372 } else {
373 ASSERT(destination->IsDoubleRegister());
374 X87Register dst = cgen_->ToX87Register(destination);
375 cgen_->X87Mov(dst, src);
376 }
372 } 377 }
373 } else if (source->IsDoubleStackSlot()) { 378 } else if (source->IsDoubleStackSlot()) {
374 if (CpuFeatures::IsSupported(SSE2)) { 379 if (CpuFeatures::IsSupported(SSE2)) {
375 CpuFeatureScope scope(cgen_->masm(), SSE2); 380 CpuFeatureScope scope(cgen_->masm(), SSE2);
376 ASSERT(destination->IsDoubleRegister() || 381 ASSERT(destination->IsDoubleRegister() ||
377 destination->IsDoubleStackSlot()); 382 destination->IsDoubleStackSlot());
378 Operand src = cgen_->ToOperand(source); 383 Operand src = cgen_->ToOperand(source);
379 if (destination->IsDoubleRegister()) { 384 if (destination->IsDoubleRegister()) {
380 XMMRegister dst = cgen_->ToDoubleRegister(destination); 385 XMMRegister dst = cgen_->ToDoubleRegister(destination);
381 __ movdbl(dst, src); 386 __ movdbl(dst, src);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } else if (destination->IsRegister()) { 545 } else if (destination->IsRegister()) {
541 source_uses_[destination->index()] = CountSourceUses(destination); 546 source_uses_[destination->index()] = CountSourceUses(destination);
542 } 547 }
543 } 548 }
544 549
545 #undef __ 550 #undef __
546 551
547 } } // namespace v8::internal 552 } } // namespace v8::internal
548 553
549 #endif // V8_TARGET_ARCH_IA32 554 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698