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

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

Issue 1044793002: [turbofan] Add backend support for float32 operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MachineOperator unit tests. Created 5 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
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 // Arithmetic operation 398 // Arithmetic operation
399 __ addss(xmm1, xmm0); 399 __ addss(xmm1, xmm0);
400 __ addss(xmm1, Operand(rbx, rcx, times_4, 10000)); 400 __ addss(xmm1, Operand(rbx, rcx, times_4, 10000));
401 __ mulss(xmm1, xmm0); 401 __ mulss(xmm1, xmm0);
402 __ mulss(xmm1, Operand(rbx, rcx, times_4, 10000)); 402 __ mulss(xmm1, Operand(rbx, rcx, times_4, 10000));
403 __ subss(xmm1, xmm0); 403 __ subss(xmm1, xmm0);
404 __ subss(xmm1, Operand(rbx, rcx, times_4, 10000)); 404 __ subss(xmm1, Operand(rbx, rcx, times_4, 10000));
405 __ divss(xmm1, xmm0); 405 __ divss(xmm1, xmm0);
406 __ divss(xmm1, Operand(rbx, rcx, times_4, 10000)); 406 __ divss(xmm1, Operand(rbx, rcx, times_4, 10000));
407 __ maxss(xmm1, xmm0);
408 __ maxss(xmm1, Operand(rbx, rcx, times_4, 10000));
409 __ minss(xmm1, xmm0);
410 __ minss(xmm1, Operand(rbx, rcx, times_4, 10000));
407 __ addps(xmm1, xmm0); 411 __ addps(xmm1, xmm0);
408 __ addps(xmm1, Operand(rbx, rcx, times_4, 10000)); 412 __ addps(xmm1, Operand(rbx, rcx, times_4, 10000));
409 __ subps(xmm1, xmm0); 413 __ subps(xmm1, xmm0);
410 __ subps(xmm1, Operand(rbx, rcx, times_4, 10000)); 414 __ subps(xmm1, Operand(rbx, rcx, times_4, 10000));
411 __ mulps(xmm1, xmm0); 415 __ mulps(xmm1, xmm0);
412 __ mulps(xmm1, Operand(rbx, rcx, times_4, 10000)); 416 __ mulps(xmm1, Operand(rbx, rcx, times_4, 10000));
413 __ divps(xmm1, xmm0); 417 __ divps(xmm1, xmm0);
414 __ divps(xmm1, Operand(rbx, rcx, times_4, 10000)); 418 __ divps(xmm1, Operand(rbx, rcx, times_4, 10000));
415 419
416 __ ucomiss(xmm0, xmm1); 420 __ ucomiss(xmm0, xmm1);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 __ pextrd(r12, xmm0, 1); 489 __ pextrd(r12, xmm0, 1);
486 __ pinsrd(xmm9, r9, 0); 490 __ pinsrd(xmm9, r9, 0);
487 __ pinsrd(xmm5, rax, 1); 491 __ pinsrd(xmm5, rax, 1);
488 } 492 }
489 } 493 }
490 494
491 // AVX instruction 495 // AVX instruction
492 { 496 {
493 if (CpuFeatures::IsSupported(AVX)) { 497 if (CpuFeatures::IsSupported(AVX)) {
494 CpuFeatureScope scope(&assm, AVX); 498 CpuFeatureScope scope(&assm, AVX);
499 __ vaddss(xmm0, xmm1, xmm2);
500 __ vaddss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
501 __ vmulss(xmm0, xmm1, xmm2);
502 __ vmulss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
503 __ vsubss(xmm0, xmm1, xmm2);
504 __ vsubss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
505 __ vdivss(xmm0, xmm1, xmm2);
506 __ vdivss(xmm0, xmm1, Operand(rbx, rcx, times_2, 10000));
507 __ vminss(xmm8, xmm1, xmm2);
508 __ vminss(xmm9, xmm1, Operand(rbx, rcx, times_8, 10000));
509 __ vmaxss(xmm8, xmm1, xmm2);
510 __ vmaxss(xmm9, xmm1, Operand(rbx, rcx, times_1, 10000));
511 __ vucomiss(xmm9, xmm1);
512 __ vucomiss(xmm8, Operand(rbx, rdx, times_2, 10981));
513
495 __ vaddsd(xmm0, xmm1, xmm2); 514 __ vaddsd(xmm0, xmm1, xmm2);
496 __ vaddsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); 515 __ vaddsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
497 __ vmulsd(xmm0, xmm1, xmm2); 516 __ vmulsd(xmm0, xmm1, xmm2);
498 __ vmulsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); 517 __ vmulsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
499 __ vsubsd(xmm0, xmm1, xmm2); 518 __ vsubsd(xmm0, xmm1, xmm2);
500 __ vsubsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); 519 __ vsubsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
501 __ vdivsd(xmm0, xmm1, xmm2); 520 __ vdivsd(xmm0, xmm1, xmm2);
502 __ vdivsd(xmm0, xmm1, Operand(rbx, rcx, times_2, 10000)); 521 __ vdivsd(xmm0, xmm1, Operand(rbx, rcx, times_2, 10000));
503 __ vminsd(xmm8, xmm1, xmm2); 522 __ vminsd(xmm8, xmm1, xmm2);
504 __ vminsd(xmm9, xmm1, Operand(rbx, rcx, times_8, 10000)); 523 __ vminsd(xmm9, xmm1, Operand(rbx, rcx, times_8, 10000));
505 __ vmaxsd(xmm8, xmm1, xmm2); 524 __ vmaxsd(xmm8, xmm1, xmm2);
506 __ vmaxsd(xmm9, xmm1, Operand(rbx, rcx, times_1, 10000)); 525 __ vmaxsd(xmm9, xmm1, Operand(rbx, rcx, times_1, 10000));
526 __ vucomisd(xmm9, xmm1);
527 __ vucomisd(xmm8, Operand(rbx, rdx, times_2, 10981));
507 } 528 }
508 } 529 }
509 530
510 // FMA3 instruction 531 // FMA3 instruction
511 { 532 {
512 if (CpuFeatures::IsSupported(FMA3)) { 533 if (CpuFeatures::IsSupported(FMA3)) {
513 CpuFeatureScope scope(&assm, FMA3); 534 CpuFeatureScope scope(&assm, FMA3);
514 __ vfmadd132sd(xmm0, xmm1, xmm2); 535 __ vfmadd132sd(xmm0, xmm1, xmm2);
515 __ vfmadd132sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); 536 __ vfmadd132sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
516 __ vfmadd213sd(xmm0, xmm1, xmm2); 537 __ vfmadd213sd(xmm0, xmm1, xmm2);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 #ifdef OBJECT_PRINT 619 #ifdef OBJECT_PRINT
599 OFStream os(stdout); 620 OFStream os(stdout);
600 code->Print(os); 621 code->Print(os);
601 byte* begin = code->instruction_start(); 622 byte* begin = code->instruction_start();
602 byte* end = begin + code->instruction_size(); 623 byte* end = begin + code->instruction_size();
603 disasm::Disassembler::Disassemble(stdout, begin, end); 624 disasm::Disassembler::Disassemble(stdout, begin, end);
604 #endif 625 #endif
605 } 626 }
606 627
607 #undef __ 628 #undef __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698