| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 __ psllq(xmm0, 17); | 461 __ psllq(xmm0, 17); |
| 462 __ psllq(xmm0, xmm1); | 462 __ psllq(xmm0, xmm1); |
| 463 __ psrlq(xmm0, 17); | 463 __ psrlq(xmm0, 17); |
| 464 __ psrlq(xmm0, xmm1); | 464 __ psrlq(xmm0, xmm1); |
| 465 __ por(xmm0, xmm1); | 465 __ por(xmm0, xmm1); |
| 466 | 466 |
| 467 __ pcmpeqd(xmm1, xmm0); | 467 __ pcmpeqd(xmm1, xmm0); |
| 468 | 468 |
| 469 __ punpckldq(xmm1, xmm6); | 469 __ punpckldq(xmm1, xmm6); |
| 470 __ punpckhdq(xmm7, xmm5); | 470 __ punpckhdq(xmm7, xmm5); |
| 471 |
| 472 #define EMIT_SSE2_INSTR(instruction, notUsed1, notUsed2, notUsed3) \ |
| 473 __ instruction(xmm5, xmm1); \ |
| 474 __ instruction(xmm5, Operand(edx, 4)); |
| 475 |
| 476 SSE2_INSTRUCTION_LIST(EMIT_SSE2_INSTR) |
| 477 #undef EMIT_SSE2_INSTR |
| 471 } | 478 } |
| 472 | 479 |
| 473 // cmov. | 480 // cmov. |
| 474 { | 481 { |
| 475 __ cmov(overflow, eax, Operand(eax, 0)); | 482 __ cmov(overflow, eax, Operand(eax, 0)); |
| 476 __ cmov(no_overflow, eax, Operand(eax, 1)); | 483 __ cmov(no_overflow, eax, Operand(eax, 1)); |
| 477 __ cmov(below, eax, Operand(eax, 2)); | 484 __ cmov(below, eax, Operand(eax, 2)); |
| 478 __ cmov(above_equal, eax, Operand(eax, 3)); | 485 __ cmov(above_equal, eax, Operand(eax, 3)); |
| 479 __ cmov(equal, eax, Operand(ebx, 0)); | 486 __ cmov(equal, eax, Operand(ebx, 0)); |
| 480 __ cmov(not_equal, eax, Operand(ebx, 1)); | 487 __ cmov(not_equal, eax, Operand(ebx, 1)); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 538 |
| 532 __ vandps(xmm0, xmm1, xmm2); | 539 __ vandps(xmm0, xmm1, xmm2); |
| 533 __ vandps(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); | 540 __ vandps(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
| 534 __ vxorps(xmm0, xmm1, xmm2); | 541 __ vxorps(xmm0, xmm1, xmm2); |
| 535 __ vxorps(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); | 542 __ vxorps(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
| 536 | 543 |
| 537 __ vandpd(xmm0, xmm1, xmm2); | 544 __ vandpd(xmm0, xmm1, xmm2); |
| 538 __ vandpd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); | 545 __ vandpd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
| 539 __ vxorpd(xmm0, xmm1, xmm2); | 546 __ vxorpd(xmm0, xmm1, xmm2); |
| 540 __ vxorpd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); | 547 __ vxorpd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
| 548 |
| 549 #define EMIT_SSE2_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3) \ |
| 550 __ v##instruction(xmm7, xmm5, xmm1); \ |
| 551 __ v##instruction(xmm7, xmm5, Operand(edx, 4)); |
| 552 |
| 553 SSE2_INSTRUCTION_LIST(EMIT_SSE2_AVXINSTR) |
| 554 #undef EMIT_SSE2_AVXINSTR |
| 541 } | 555 } |
| 542 } | 556 } |
| 543 | 557 |
| 544 // FMA3 instruction | 558 // FMA3 instruction |
| 545 { | 559 { |
| 546 if (CpuFeatures::IsSupported(FMA3)) { | 560 if (CpuFeatures::IsSupported(FMA3)) { |
| 547 CpuFeatureScope scope(&assm, FMA3); | 561 CpuFeatureScope scope(&assm, FMA3); |
| 548 __ vfmadd132sd(xmm0, xmm1, xmm2); | 562 __ vfmadd132sd(xmm0, xmm1, xmm2); |
| 549 __ vfmadd132sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); | 563 __ vfmadd132sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
| 550 __ vfmadd213sd(xmm0, xmm1, xmm2); | 564 __ vfmadd213sd(xmm0, xmm1, xmm2); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 #ifdef OBJECT_PRINT | 718 #ifdef OBJECT_PRINT |
| 705 OFStream os(stdout); | 719 OFStream os(stdout); |
| 706 code->Print(os); | 720 code->Print(os); |
| 707 byte* begin = code->instruction_start(); | 721 byte* begin = code->instruction_start(); |
| 708 byte* end = begin + code->instruction_size(); | 722 byte* end = begin + code->instruction_size(); |
| 709 disasm::Disassembler::Disassemble(stdout, begin, end); | 723 disasm::Disassembler::Disassemble(stdout, begin, end); |
| 710 #endif | 724 #endif |
| 711 } | 725 } |
| 712 | 726 |
| 713 #undef __ | 727 #undef __ |
| OLD | NEW |