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

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

Issue 1994083003: Adding x64 simd assembler support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x64/assembler-x64-inl.h ('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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 __ cmovq(parity_odd, rax, Operand(rcx, 3)); 477 __ cmovq(parity_odd, rax, Operand(rcx, 3));
478 __ cmovq(less, rax, Operand(rdx, 0)); 478 __ cmovq(less, rax, Operand(rdx, 0));
479 __ cmovq(greater_equal, rax, Operand(rdx, 1)); 479 __ cmovq(greater_equal, rax, Operand(rdx, 1));
480 __ cmovq(less_equal, rax, Operand(rdx, 2)); 480 __ cmovq(less_equal, rax, Operand(rdx, 2));
481 __ cmovq(greater, rax, Operand(rdx, 3)); 481 __ cmovq(greater, rax, Operand(rdx, 3));
482 } 482 }
483 483
484 { 484 {
485 if (CpuFeatures::IsSupported(SSE4_1)) { 485 if (CpuFeatures::IsSupported(SSE4_1)) {
486 CpuFeatureScope scope(&assm, SSE4_1); 486 CpuFeatureScope scope(&assm, SSE4_1);
487 __ insertps(xmm5, xmm1, 123);
487 __ extractps(rax, xmm1, 0); 488 __ extractps(rax, xmm1, 0);
488 __ pextrd(rbx, xmm15, 0); 489 __ pextrd(rbx, xmm15, 0);
489 __ pextrd(r12, xmm0, 1); 490 __ pextrd(r12, xmm0, 1);
490 __ pinsrd(xmm9, r9, 0); 491 __ pinsrd(xmm9, r9, 0);
491 __ pinsrd(xmm5, rax, 1); 492 __ pinsrd(xmm5, Operand(rax, 4), 1);
493
494 __ cmpps(xmm5, xmm1, 1);
495 __ cmpeqps(xmm5, xmm1);
496 __ cmpltps(xmm5, xmm1);
497 __ cmpleps(xmm5, xmm1);
498 __ cmpneqps(xmm5, xmm1);
499 __ cmpnltps(xmm5, xmm1);
500 __ cmpnleps(xmm5, xmm1);
501
502 __ minps(xmm5, xmm1);
503 __ minps(xmm5, Operand(rdx, 4));
504 __ maxps(xmm5, xmm1);
505 __ maxps(xmm5, Operand(rdx, 4));
506 __ rcpps(xmm5, xmm1);
507 __ rcpps(xmm5, Operand(rdx, 4));
508 __ sqrtps(xmm5, xmm1);
509 __ sqrtps(xmm5, Operand(rdx, 4));
510 __ movups(xmm5, xmm1);
511 __ movups(xmm5, Operand(rdx, 4));
512 __ movups(Operand(rdx, 4), xmm5);
513 __ paddd(xmm5, xmm1);
514 __ paddd(xmm5, Operand(rdx, 4));
515 __ psubd(xmm5, xmm1);
516 __ psubd(xmm5, Operand(rdx, 4));
517 __ pmulld(xmm5, xmm1);
518 __ pmulld(xmm5, Operand(rdx, 4));
519 __ pmuludq(xmm5, xmm1);
520 __ pmuludq(xmm5, Operand(rdx, 4));
521 __ punpackldq(xmm5, xmm1);
522 __ punpackldq(xmm5, Operand(rdx, 4));
523 __ psrldq(xmm5, 123);
524 __ pshufd(xmm5, xmm1, 3);
525 __ cvtps2dq(xmm5, xmm1);
526 __ cvtps2dq(xmm5, Operand(rdx, 4));
527 __ cvtdq2ps(xmm5, xmm1);
528 __ cvtdq2ps(xmm5, Operand(rdx, 4));
492 } 529 }
493 } 530 }
494 531
495 // AVX instruction 532 // AVX instruction
496 { 533 {
497 if (CpuFeatures::IsSupported(AVX)) { 534 if (CpuFeatures::IsSupported(AVX)) {
498 CpuFeatureScope scope(&assm, AVX); 535 CpuFeatureScope scope(&assm, AVX);
499 __ vmovss(xmm6, xmm14, xmm2); 536 __ vmovss(xmm6, xmm14, xmm2);
500 __ vmovss(xmm9, Operand(rbx, rcx, times_4, 10000)); 537 __ vmovss(xmm9, Operand(rbx, rcx, times_4, 10000));
501 __ vmovss(Operand(rbx, rcx, times_4, 10000), xmm0); 538 __ vmovss(Operand(rbx, rcx, times_4, 10000), xmm0);
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 #ifdef OBJECT_PRINT 822 #ifdef OBJECT_PRINT
786 OFStream os(stdout); 823 OFStream os(stdout);
787 code->Print(os); 824 code->Print(os);
788 byte* begin = code->instruction_start(); 825 byte* begin = code->instruction_start();
789 byte* end = begin + code->instruction_size(); 826 byte* end = begin + code->instruction_size();
790 disasm::Disassembler::Disassemble(stdout, begin, end); 827 disasm::Disassembler::Disassemble(stdout, begin, end);
791 #endif 828 #endif
792 } 829 }
793 830
794 #undef __ 831 #undef __
OLDNEW
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698