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

Side by Side Diff: test/cctest/test-disasm-ia32.cc

Issue 1991713002: Adding ia32 simd assembler changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 4 years, 7 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
« no previous file with comments | « src/ia32/disasm-ia32.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 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 __ fwait(); 384 __ fwait();
385 __ frndint(); 385 __ frndint();
386 __ fninit(); 386 __ fninit();
387 __ nop(); 387 __ nop();
388 388
389 // SSE instruction 389 // SSE instruction
390 { 390 {
391 // Move operation 391 // Move operation
392 __ movaps(xmm0, xmm1); 392 __ movaps(xmm0, xmm1);
393 __ shufps(xmm0, xmm0, 0x0); 393 __ shufps(xmm0, xmm0, 0x0);
394 __ movups(xmm1, Operand(ebx, ecx, times_4, 10000));
395 __ movups(Operand(ebx, ecx, times_4, 10000), xmm1);
394 __ cvtsd2ss(xmm0, xmm1); 396 __ cvtsd2ss(xmm0, xmm1);
395 __ cvtsd2ss(xmm0, Operand(ebx, ecx, times_4, 10000)); 397 __ cvtsd2ss(xmm0, Operand(ebx, ecx, times_4, 10000));
396 398
397 // logic operation 399 // logic operation
398 __ andps(xmm0, xmm1); 400 __ andps(xmm0, xmm1);
399 __ andps(xmm0, Operand(ebx, ecx, times_4, 10000)); 401 __ andps(xmm0, Operand(ebx, ecx, times_4, 10000));
400 __ orps(xmm0, xmm1); 402 __ orps(xmm0, xmm1);
401 __ orps(xmm0, Operand(ebx, ecx, times_4, 10000)); 403 __ orps(xmm0, Operand(ebx, ecx, times_4, 10000));
402 __ xorps(xmm0, xmm1); 404 __ xorps(xmm0, xmm1);
403 __ xorps(xmm0, Operand(ebx, ecx, times_4, 10000)); 405 __ xorps(xmm0, Operand(ebx, ecx, times_4, 10000));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 __ psllq(xmm0, 17); 463 __ psllq(xmm0, 17);
462 __ psllq(xmm0, xmm1); 464 __ psllq(xmm0, xmm1);
463 __ psrlq(xmm0, 17); 465 __ psrlq(xmm0, 17);
464 __ psrlq(xmm0, xmm1); 466 __ psrlq(xmm0, xmm1);
465 __ por(xmm0, xmm1); 467 __ por(xmm0, xmm1);
466 468
467 __ pcmpeqd(xmm1, xmm0); 469 __ pcmpeqd(xmm1, xmm0);
468 470
469 __ punpckldq(xmm1, xmm6); 471 __ punpckldq(xmm1, xmm6);
470 __ punpckhdq(xmm7, xmm5); 472 __ punpckhdq(xmm7, xmm5);
473
474 __ paddd(xmm1, Operand(ebx, ecx, times_4, 10000));
475 __ paddd(xmm1, xmm0);
476 __ psubd(xmm1, Operand(ebx, ecx, times_4, 10000));
477 __ psubd(xmm1, xmm0);
478 __ pmuludq(xmm1, Operand(ebx, ecx, times_4, 10000));
479 __ pmuludq(xmm1, xmm0);
480 __ punpackldq(xmm1, Operand(ebx, ecx, times_4, 10000));
481 __ punpackldq(xmm1, xmm0);
482
483 __ cvtdq2ps(xmm1, Operand(ebx, ecx, times_4, 10000));
484 __ cvtdq2ps(xmm1, xmm0);
485 __ cvtps2dq(xmm1, Operand(ebx, ecx, times_4, 10000));
486 __ cvtps2dq(xmm1, xmm0);
487 }
488 {
489 __ andps(xmm1, Operand(ebx, ecx, times_4, 10000));
490 __ andps(xmm1, xmm0);
491 __ xorps(xmm1, Operand(ebx, ecx, times_4, 10000));
492 __ xorps(xmm1, xmm0);
493 __ orps(xmm1, Operand(ebx, ecx, times_4, 10000));
494 __ orps(xmm1, xmm0);
495
496 __ addps(xmm1, Operand(ebx, ecx, times_4, 10000));
497 __ addps(xmm1, xmm0);
498 __ subps(xmm1, Operand(ebx, ecx, times_4, 10000));
499 __ subps(xmm1, xmm0);
500 __ mulps(xmm1, Operand(ebx, ecx, times_4, 10000));
501 __ mulps(xmm1, xmm0);
502 __ divps(xmm1, Operand(ebx, ecx, times_4, 10000));
503 __ divps(xmm1, xmm0);
504 __ minps(xmm1, Operand(ebx, ecx, times_4, 10000));
505 __ minps(xmm1, xmm0);
506 __ maxps(xmm1, Operand(ebx, ecx, times_4, 10000));
507 __ maxps(xmm1, xmm0);
508 __ rcpps(xmm1, Operand(ebx, ecx, times_4, 10000));
509 __ rcpps(xmm1, xmm0);
510 __ rsqrtps(xmm1, Operand(ebx, ecx, times_4, 10000));
511 __ rsqrtps(xmm1, xmm0);
512 __ sqrtps(xmm1, Operand(ebx, ecx, times_4, 10000));
513 __ sqrtps(xmm1, xmm0);
514
515 __ cmpps(xmm1, xmm0, 123);
516 __ cmpeqps(xmm1, xmm0);
517 __ cmpltps(xmm1, xmm0);
518 __ cmpleps(xmm1, xmm0);
519 __ cmpneqps(xmm1, xmm0);
520 __ cmpnltps(xmm1, xmm0);
521 __ cmpnleps(xmm1, xmm0);
471 } 522 }
472 523
473 // cmov. 524 // cmov.
474 { 525 {
475 __ cmov(overflow, eax, Operand(eax, 0)); 526 __ cmov(overflow, eax, Operand(eax, 0));
476 __ cmov(no_overflow, eax, Operand(eax, 1)); 527 __ cmov(no_overflow, eax, Operand(eax, 1));
477 __ cmov(below, eax, Operand(eax, 2)); 528 __ cmov(below, eax, Operand(eax, 2));
478 __ cmov(above_equal, eax, Operand(eax, 3)); 529 __ cmov(above_equal, eax, Operand(eax, 3));
479 __ cmov(equal, eax, Operand(ebx, 0)); 530 __ cmov(equal, eax, Operand(ebx, 0));
480 __ cmov(not_equal, eax, Operand(ebx, 1)); 531 __ cmov(not_equal, eax, Operand(ebx, 1));
481 __ cmov(below_equal, eax, Operand(ebx, 2)); 532 __ cmov(below_equal, eax, Operand(ebx, 2));
482 __ cmov(above, eax, Operand(ebx, 3)); 533 __ cmov(above, eax, Operand(ebx, 3));
483 __ cmov(sign, eax, Operand(ecx, 0)); 534 __ cmov(sign, eax, Operand(ecx, 0));
484 __ cmov(not_sign, eax, Operand(ecx, 1)); 535 __ cmov(not_sign, eax, Operand(ecx, 1));
485 __ cmov(parity_even, eax, Operand(ecx, 2)); 536 __ cmov(parity_even, eax, Operand(ecx, 2));
486 __ cmov(parity_odd, eax, Operand(ecx, 3)); 537 __ cmov(parity_odd, eax, Operand(ecx, 3));
487 __ cmov(less, eax, Operand(edx, 0)); 538 __ cmov(less, eax, Operand(edx, 0));
488 __ cmov(greater_equal, eax, Operand(edx, 1)); 539 __ cmov(greater_equal, eax, Operand(edx, 1));
489 __ cmov(less_equal, eax, Operand(edx, 2)); 540 __ cmov(less_equal, eax, Operand(edx, 2));
490 __ cmov(greater, eax, Operand(edx, 3)); 541 __ cmov(greater, eax, Operand(edx, 3));
491 } 542 }
492 543
493 { 544 {
494 if (CpuFeatures::IsSupported(SSE4_1)) { 545 if (CpuFeatures::IsSupported(SSE4_1)) {
495 CpuFeatureScope scope(&assm, SSE4_1); 546 CpuFeatureScope scope(&assm, SSE4_1);
496 __ pextrd(eax, xmm0, 1); 547 __ pextrd(eax, xmm0, 1);
497 __ pinsrd(xmm1, eax, 0); 548 __ pinsrd(xmm1, eax, 0);
498 __ extractps(eax, xmm1, 0); 549 __ extractps(eax, xmm1, 0);
550 __ insertps(xmm1, xmm0, 0);
551 __ pmulld(xmm1, Operand(ebx, ecx, times_4, 10000));
552 __ pmulld(xmm1, xmm0);
499 } 553 }
500 } 554 }
501 555
502 // AVX instruction 556 // AVX instruction
503 { 557 {
504 if (CpuFeatures::IsSupported(AVX)) { 558 if (CpuFeatures::IsSupported(AVX)) {
505 CpuFeatureScope scope(&assm, AVX); 559 CpuFeatureScope scope(&assm, AVX);
506 __ vaddsd(xmm0, xmm1, xmm2); 560 __ vaddsd(xmm0, xmm1, xmm2);
507 __ vaddsd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); 561 __ vaddsd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000));
508 __ vmulsd(xmm0, xmm1, xmm2); 562 __ vmulsd(xmm0, xmm1, xmm2);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 #ifdef OBJECT_PRINT 758 #ifdef OBJECT_PRINT
705 OFStream os(stdout); 759 OFStream os(stdout);
706 code->Print(os); 760 code->Print(os);
707 byte* begin = code->instruction_start(); 761 byte* begin = code->instruction_start();
708 byte* end = begin + code->instruction_size(); 762 byte* end = begin + code->instruction_size();
709 disasm::Disassembler::Disassemble(stdout, begin, end); 763 disasm::Disassembler::Disassemble(stdout, begin, end);
710 #endif 764 #endif
711 } 765 }
712 766
713 #undef __ 767 #undef __
OLDNEW
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698