OLD | NEW |
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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 XMMRegister dst = cgen_->ToDoubleRegister(destination); | 335 XMMRegister dst = cgen_->ToDoubleRegister(destination); |
336 __ movaps(dst, src); | 336 __ movaps(dst, src); |
337 } else { | 337 } else { |
338 ASSERT(destination->IsDoubleStackSlot()); | 338 ASSERT(destination->IsDoubleStackSlot()); |
339 Operand dst = cgen_->ToOperand(destination); | 339 Operand dst = cgen_->ToOperand(destination); |
340 __ movdbl(dst, src); | 340 __ movdbl(dst, src); |
341 } | 341 } |
342 } else { | 342 } else { |
343 // load from the register onto the stack, store in destination, which must | 343 // load from the register onto the stack, store in destination, which must |
344 // be a double stack slot in the non-SSE2 case. | 344 // be a double stack slot in the non-SSE2 case. |
345 ASSERT(source->index() == 0); // source is on top of the stack | |
346 ASSERT(destination->IsDoubleStackSlot()); | 345 ASSERT(destination->IsDoubleStackSlot()); |
347 Operand dst = cgen_->ToOperand(destination); | 346 Operand dst = cgen_->ToOperand(destination); |
348 cgen_->ReadX87Operand(dst); | 347 X87Register src = cgen_->ToX87Register(source); |
| 348 cgen_->X87Mov(dst, src); |
349 } | 349 } |
350 } else if (source->IsDoubleStackSlot()) { | 350 } else if (source->IsDoubleStackSlot()) { |
351 if (CpuFeatures::IsSupported(SSE2)) { | 351 if (CpuFeatures::IsSupported(SSE2)) { |
352 CpuFeatureScope scope(cgen_->masm(), SSE2); | 352 CpuFeatureScope scope(cgen_->masm(), SSE2); |
353 ASSERT(destination->IsDoubleRegister() || | 353 ASSERT(destination->IsDoubleRegister() || |
354 destination->IsDoubleStackSlot()); | 354 destination->IsDoubleStackSlot()); |
355 Operand src = cgen_->ToOperand(source); | 355 Operand src = cgen_->ToOperand(source); |
356 if (destination->IsDoubleRegister()) { | 356 if (destination->IsDoubleRegister()) { |
357 XMMRegister dst = cgen_->ToDoubleRegister(destination); | 357 XMMRegister dst = cgen_->ToDoubleRegister(destination); |
358 __ movdbl(dst, src); | 358 __ movdbl(dst, src); |
(...skipping 12 matching lines...) Expand all Loading... |
371 Operand src0 = cgen_->ToOperand(source); | 371 Operand src0 = cgen_->ToOperand(source); |
372 Operand src1 = cgen_->HighOperand(source); | 372 Operand src1 = cgen_->HighOperand(source); |
373 Operand dst0 = cgen_->ToOperand(destination); | 373 Operand dst0 = cgen_->ToOperand(destination); |
374 Operand dst1 = cgen_->HighOperand(destination); | 374 Operand dst1 = cgen_->HighOperand(destination); |
375 __ mov(tmp, src0); // Then use tmp to copy source to destination. | 375 __ mov(tmp, src0); // Then use tmp to copy source to destination. |
376 __ mov(dst0, tmp); | 376 __ mov(dst0, tmp); |
377 __ mov(tmp, src1); | 377 __ mov(tmp, src1); |
378 __ mov(dst1, tmp); | 378 __ mov(dst1, tmp); |
379 } else { | 379 } else { |
380 Operand src = cgen_->ToOperand(source); | 380 Operand src = cgen_->ToOperand(source); |
381 if (cgen_->X87StackNonEmpty()) { | 381 X87Register dst = cgen_->ToX87Register(destination); |
382 cgen_->PopX87(); | 382 cgen_->X87Mov(dst, src); |
383 } | |
384 cgen_->PushX87DoubleOperand(src); | |
385 } | 383 } |
386 } | 384 } |
387 } else { | 385 } else { |
388 UNREACHABLE(); | 386 UNREACHABLE(); |
389 } | 387 } |
390 | 388 |
391 RemoveMove(index); | 389 RemoveMove(index); |
392 } | 390 } |
393 | 391 |
394 | 392 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 } else if (destination->IsRegister()) { | 517 } else if (destination->IsRegister()) { |
520 source_uses_[destination->index()] = CountSourceUses(destination); | 518 source_uses_[destination->index()] = CountSourceUses(destination); |
521 } | 519 } |
522 } | 520 } |
523 | 521 |
524 #undef __ | 522 #undef __ |
525 | 523 |
526 } } // namespace v8::internal | 524 } } // namespace v8::internal |
527 | 525 |
528 #endif // V8_TARGET_ARCH_IA32 | 526 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |