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

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

Issue 6880007: Use movaps instead of movsd in the gap resolver on ia32 as well. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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 | « no previous file | 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 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } else if (source->IsConstantOperand()) { 305 } else if (source->IsConstantOperand()) {
306 ASSERT(destination->IsRegister() || destination->IsStackSlot()); 306 ASSERT(destination->IsRegister() || destination->IsStackSlot());
307 Immediate src = cgen_->ToImmediate(source); 307 Immediate src = cgen_->ToImmediate(source);
308 Operand dst = cgen_->ToOperand(destination); 308 Operand dst = cgen_->ToOperand(destination);
309 __ mov(dst, src); 309 __ mov(dst, src);
310 310
311 } else if (source->IsDoubleRegister()) { 311 } else if (source->IsDoubleRegister()) {
312 ASSERT(destination->IsDoubleRegister() || 312 ASSERT(destination->IsDoubleRegister() ||
313 destination->IsDoubleStackSlot()); 313 destination->IsDoubleStackSlot());
314 XMMRegister src = cgen_->ToDoubleRegister(source); 314 XMMRegister src = cgen_->ToDoubleRegister(source);
315 Operand dst = cgen_->ToOperand(destination); 315 if (destination->IsDoubleStackSlot()) {
316 __ movdbl(dst, src); 316 Operand dst = cgen_->ToOperand(destination);
317 317 __ movdbl(dst, src);
318 } else {
Kevin Millikin (Chromium) 2011/04/18 14:02:59 To fit the rest of the code, you should turn the A
fschneider 2011/04/19 09:16:24 Done.
319 XMMRegister dst = cgen_->ToDoubleRegister(destination);
320 __ movaps(dst, src);
321 }
318 } else if (source->IsDoubleStackSlot()) { 322 } else if (source->IsDoubleStackSlot()) {
319 ASSERT(destination->IsDoubleRegister() || 323 ASSERT(destination->IsDoubleRegister() ||
320 destination->IsDoubleStackSlot()); 324 destination->IsDoubleStackSlot());
321 Operand src = cgen_->ToOperand(source); 325 Operand src = cgen_->ToOperand(source);
322 if (destination->IsDoubleRegister()) { 326 if (destination->IsDoubleRegister()) {
323 XMMRegister dst = cgen_->ToDoubleRegister(destination); 327 XMMRegister dst = cgen_->ToDoubleRegister(destination);
324 __ movdbl(dst, src); 328 __ movdbl(dst, src);
325 } else { 329 } else {
326 // We rely on having xmm0 available as a fixed scratch register. 330 // We rely on having xmm0 available as a fixed scratch register.
327 Operand dst = cgen_->ToOperand(destination); 331 Operand dst = cgen_->ToOperand(destination);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 __ xor_(tmp0, src); 388 __ xor_(tmp0, src);
385 __ xor_(src, tmp0); 389 __ xor_(src, tmp0);
386 __ xor_(tmp0, src); 390 __ xor_(tmp0, src);
387 __ mov(dst, tmp0); 391 __ mov(dst, tmp0);
388 } else { 392 } else {
389 __ mov(tmp0, dst); 393 __ mov(tmp0, dst);
390 __ mov(tmp1, src); 394 __ mov(tmp1, src);
391 __ mov(dst, tmp1); 395 __ mov(dst, tmp1);
392 __ mov(src, tmp0); 396 __ mov(src, tmp0);
393 } 397 }
398 } else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) {
399 // XMM register-register swap. We rely on having xmm0
400 // available as a fixed scratch register.
401 XMMRegister src = cgen_->ToDoubleRegister(source);
402 XMMRegister dst = cgen_->ToDoubleRegister(destination);
403 __ movaps(xmm0, src);
404 __ movaps(src, dst);
405 __ movaps(dst, xmm0);
394 406
395 } else if (source->IsDoubleRegister() || destination->IsDoubleRegister()) { 407 } else if (source->IsDoubleRegister() || destination->IsDoubleRegister()) {
396 // XMM register-register or register-memory. We rely on having xmm0 408 // XMM register-memory swap. We rely on having xmm0
397 // available as a fixed scratch register. 409 // available as a fixed scratch register.
398 ASSERT(source->IsDoubleRegister() || source->IsDoubleStackSlot()); 410 ASSERT(source->IsDoubleStackSlot() || destination->IsDoubleStackSlot());
399 ASSERT(destination->IsDoubleRegister() ||
400 destination->IsDoubleStackSlot());
401 XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister() 411 XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister()
402 ? source 412 ? source
403 : destination); 413 : destination);
404 Operand other = 414 Operand other =
405 cgen_->ToOperand(source->IsDoubleRegister() ? destination : source); 415 cgen_->ToOperand(source->IsDoubleRegister() ? destination : source);
406 __ movdbl(xmm0, other); 416 __ movdbl(xmm0, other);
407 __ movdbl(other, reg); 417 __ movdbl(other, reg);
408 __ movdbl(reg, Operand(xmm0)); 418 __ movdbl(reg, Operand(xmm0));
409 419
410 } else if (source->IsDoubleStackSlot() && destination->IsDoubleStackSlot()) { 420 } else if (source->IsDoubleStackSlot() && destination->IsDoubleStackSlot()) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } else if (destination->IsRegister()) { 467 } else if (destination->IsRegister()) {
458 source_uses_[destination->index()] = CountSourceUses(destination); 468 source_uses_[destination->index()] = CountSourceUses(destination);
459 } 469 }
460 } 470 }
461 471
462 #undef __ 472 #undef __
463 473
464 } } // namespace v8::internal 474 } } // namespace v8::internal
465 475
466 #endif // V8_TARGET_ARCH_IA32 476 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698