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

Side by Side Diff: test/cctest/test-disasm-arm.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
« no previous file with comments | « test/cctest/test-assembler-x64.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 assm.CheckConstPool(true, false) 88 assm.CheckConstPool(true, false)
89 89
90 90
91 // Verify that all invocations of the COMPARE macro passed successfully. 91 // Verify that all invocations of the COMPARE macro passed successfully.
92 // Exit with a failure if at least one of the tests failed. 92 // Exit with a failure if at least one of the tests failed.
93 #define VERIFY_RUN() \ 93 #define VERIFY_RUN() \
94 if (failure) { \ 94 if (failure) { \
95 V8_Fatal(__FILE__, __LINE__, "ARM Disassembler tests failed.\n"); \ 95 V8_Fatal(__FILE__, __LINE__, "ARM Disassembler tests failed.\n"); \
96 } 96 }
97 97
98 // clang-format off
jochen (gone - plz use gerrit) 2015/11/25 13:02:23 please don't do that. clang-format off is supposed
99
98 100
99 TEST(Type0) { 101 TEST(Type0) {
100 SET_UP(); 102 SET_UP();
101 103
102 COMPARE(and_(r0, r1, Operand(r2)), 104 COMPARE(and_(r0, r1, Operand(r2)),
103 "e0010002 and r0, r1, r2"); 105 "e0010002 and r0, r1, r2");
104 COMPARE(and_(r1, r2, Operand(r3), LeaveCC), 106 COMPARE(and_(r1, r2, Operand(r3), LeaveCC),
105 "e0021003 and r1, r2, r3"); 107 "e0021003 and r1, r2, r3");
106 COMPARE(and_(r2, r3, Operand(r4), SetCC), 108 COMPARE(and_(r2, r3, Operand(r4), SetCC),
107 "e0132004 ands r2, r3, r4"); 109 "e0132004 ands r2, r3, r4");
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 COMPARE(vmov(s0, r0), 475 COMPARE(vmov(s0, r0),
474 "ee000a10 vmov s0, r0"); 476 "ee000a10 vmov s0, r0");
475 COMPARE(vmov(s31, r10), 477 COMPARE(vmov(s31, r10),
476 "ee0faa90 vmov s31, r10"); 478 "ee0faa90 vmov s31, r10");
477 479
478 COMPARE(vabs(d0, d1), 480 COMPARE(vabs(d0, d1),
479 "eeb00bc1 vabs.f64 d0, d1"); 481 "eeb00bc1 vabs.f64 d0, d1");
480 COMPARE(vabs(d3, d4, mi), 482 COMPARE(vabs(d3, d4, mi),
481 "4eb03bc4 vabsmi.f64 d3, d4"); 483 "4eb03bc4 vabsmi.f64 d3, d4");
482 484
485 COMPARE(vabs(s0, s1),
486 "eeb00ae0 vabs.f32 s0, s1");
487 COMPARE(vabs(s3, s4, mi),
488 "4ef01ac2 vabsmi.f32 s3, s4");
489
483 COMPARE(vneg(d0, d1), 490 COMPARE(vneg(d0, d1),
484 "eeb10b41 vneg.f64 d0, d1"); 491 "eeb10b41 vneg.f64 d0, d1");
485 COMPARE(vneg(d3, d4, mi), 492 COMPARE(vneg(d3, d4, mi),
486 "4eb13b44 vnegmi.f64 d3, d4"); 493 "4eb13b44 vnegmi.f64 d3, d4");
487 494
495 COMPARE(vneg(s0, s1),
496 "eeb10a60 vneg.f32 s0, s1");
497 COMPARE(vneg(s3, s4, mi),
498 "4ef11a42 vnegmi.f32 s3, s4");
499
488 COMPARE(vadd(d0, d1, d2), 500 COMPARE(vadd(d0, d1, d2),
489 "ee310b02 vadd.f64 d0, d1, d2"); 501 "ee310b02 vadd.f64 d0, d1, d2");
490 COMPARE(vadd(d3, d4, d5, mi), 502 COMPARE(vadd(d3, d4, d5, mi),
491 "4e343b05 vaddmi.f64 d3, d4, d5"); 503 "4e343b05 vaddmi.f64 d3, d4, d5");
492 504
505 COMPARE(vadd(s0, s1, s2),
506 "ee300a81 vadd.f32 s0, s1, s2");
507 COMPARE(vadd(s3, s4, s5, mi),
508 "4e721a22 vaddmi.f32 s3, s4, s5");
509
493 COMPARE(vsub(d0, d1, d2), 510 COMPARE(vsub(d0, d1, d2),
494 "ee310b42 vsub.f64 d0, d1, d2"); 511 "ee310b42 vsub.f64 d0, d1, d2");
495 COMPARE(vsub(d3, d4, d5, ne), 512 COMPARE(vsub(d3, d4, d5, ne),
496 "1e343b45 vsubne.f64 d3, d4, d5"); 513 "1e343b45 vsubne.f64 d3, d4, d5");
497 514
515 COMPARE(vsub(s0, s1, s2),
516 "ee300ac1 vsub.f32 s0, s1, s2");
517 COMPARE(vsub(s3, s4, s5, ne),
518 "1e721a62 vsubne.f32 s3, s4, s5");
519
498 COMPARE(vmul(d2, d1, d0), 520 COMPARE(vmul(d2, d1, d0),
499 "ee212b00 vmul.f64 d2, d1, d0"); 521 "ee212b00 vmul.f64 d2, d1, d0");
500 COMPARE(vmul(d6, d4, d5, cc), 522 COMPARE(vmul(d6, d4, d5, cc),
501 "3e246b05 vmulcc.f64 d6, d4, d5"); 523 "3e246b05 vmulcc.f64 d6, d4, d5");
502 524
525 COMPARE(vmul(s2, s1, s0),
526 "ee201a80 vmul.f32 s2, s1, s0");
527 COMPARE(vmul(s6, s4, s5, cc),
528 "3e223a22 vmulcc.f32 s6, s4, s5");
529
503 COMPARE(vdiv(d2, d2, d2), 530 COMPARE(vdiv(d2, d2, d2),
504 "ee822b02 vdiv.f64 d2, d2, d2"); 531 "ee822b02 vdiv.f64 d2, d2, d2");
505 COMPARE(vdiv(d6, d7, d7, hi), 532 COMPARE(vdiv(d6, d7, d7, hi),
506 "8e876b07 vdivhi.f64 d6, d7, d7"); 533 "8e876b07 vdivhi.f64 d6, d7, d7");
507 534
535 COMPARE(vdiv(s2, s2, s2),
536 "ee811a01 vdiv.f32 s2, s2, s2");
537 COMPARE(vdiv(s6, s7, s7, hi),
538 "8e833aa3 vdivhi.f32 s6, s7, s7");
539
508 COMPARE(vcmp(d0, d1), 540 COMPARE(vcmp(d0, d1),
509 "eeb40b41 vcmp.f64 d0, d1"); 541 "eeb40b41 vcmp.f64 d0, d1");
510 COMPARE(vcmp(d0, 0.0), 542 COMPARE(vcmp(d0, 0.0),
511 "eeb50b40 vcmp.f64 d0, #0.0"); 543 "eeb50b40 vcmp.f64 d0, #0.0");
512 544
545 COMPARE(vcmp(s0, s1),
546 "eeb40a60 vcmp.f32 s0, s1");
547 COMPARE(vcmp(s0, 0.0f),
548 "eeb50a40 vcmp.f32 s0, #0.0");
549
513 COMPARE(vsqrt(d0, d0), 550 COMPARE(vsqrt(d0, d0),
514 "eeb10bc0 vsqrt.f64 d0, d0"); 551 "eeb10bc0 vsqrt.f64 d0, d0");
515 COMPARE(vsqrt(d2, d3, ne), 552 COMPARE(vsqrt(d2, d3, ne),
516 "1eb12bc3 vsqrtne.f64 d2, d3"); 553 "1eb12bc3 vsqrtne.f64 d2, d3");
517 554
555 COMPARE(vsqrt(s0, s0),
556 "eeb10ac0 vsqrt.f32 s0, s0");
557 COMPARE(vsqrt(s2, s3, ne),
558 "1eb11ae1 vsqrtne.f32 s2, s3");
559
518 COMPARE(vmov(d0, 1.0), 560 COMPARE(vmov(d0, 1.0),
519 "eeb70b00 vmov.f64 d0, #1"); 561 "eeb70b00 vmov.f64 d0, #1");
520 COMPARE(vmov(d2, -13.0), 562 COMPARE(vmov(d2, -13.0),
521 "eeba2b0a vmov.f64 d2, #-13"); 563 "eeba2b0a vmov.f64 d2, #-13");
522 564
523 COMPARE(vmov(d0, VmovIndexLo, r0), 565 COMPARE(vmov(d0, VmovIndexLo, r0),
524 "ee000b10 vmov.32 d0[0], r0"); 566 "ee000b10 vmov.32 d0[0], r0");
525 COMPARE(vmov(d0, VmovIndexHi, r0), 567 COMPARE(vmov(d0, VmovIndexHi, r0),
526 "ee200b10 vmov.32 d0[1], r0"); 568 "ee200b10 vmov.32 d0[1], r0");
527 569
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 COMPARE(vstm(ia, r6, s0, s31), 635 COMPARE(vstm(ia, r6, s0, s31),
594 "ec860a20 vstmia r6, {s0-s31}"); 636 "ec860a20 vstmia r6, {s0-s31}");
595 COMPARE(vldm(ia, r7, s0, s31), 637 COMPARE(vldm(ia, r7, s0, s31),
596 "ec970a20 vldmia r7, {s0-s31}"); 638 "ec970a20 vldmia r7, {s0-s31}");
597 639
598 COMPARE(vmla(d2, d1, d0), 640 COMPARE(vmla(d2, d1, d0),
599 "ee012b00 vmla.f64 d2, d1, d0"); 641 "ee012b00 vmla.f64 d2, d1, d0");
600 COMPARE(vmla(d6, d4, d5, cc), 642 COMPARE(vmla(d6, d4, d5, cc),
601 "3e046b05 vmlacc.f64 d6, d4, d5"); 643 "3e046b05 vmlacc.f64 d6, d4, d5");
602 644
645 COMPARE(vmla(s2, s1, s0),
646 "ee001a80 vmla.f32 s2, s1, s0");
647 COMPARE(vmla(s6, s4, s5, cc),
648 "3e023a22 vmlacc.f32 s6, s4, s5");
649
603 COMPARE(vmls(d2, d1, d0), 650 COMPARE(vmls(d2, d1, d0),
604 "ee012b40 vmls.f64 d2, d1, d0"); 651 "ee012b40 vmls.f64 d2, d1, d0");
605 COMPARE(vmls(d6, d4, d5, cc), 652 COMPARE(vmls(d6, d4, d5, cc),
606 "3e046b45 vmlscc.f64 d6, d4, d5"); 653 "3e046b45 vmlscc.f64 d6, d4, d5");
607 654
655 COMPARE(vmls(s2, s1, s0),
656 "ee001ac0 vmls.f32 s2, s1, s0");
657 COMPARE(vmls(s6, s4, s5, cc),
658 "3e023a62 vmlscc.f32 s6, s4, s5");
659
608 COMPARE(vcvt_u32_f64(s0, d0), 660 COMPARE(vcvt_u32_f64(s0, d0),
609 "eebc0bc0 vcvt.u32.f64 s0, d0"); 661 "eebc0bc0 vcvt.u32.f64 s0, d0");
610 COMPARE(vcvt_s32_f64(s0, d0), 662 COMPARE(vcvt_s32_f64(s0, d0),
611 "eebd0bc0 vcvt.s32.f64 s0, d0"); 663 "eebd0bc0 vcvt.s32.f64 s0, d0");
612 COMPARE(vcvt_f64_u32(d0, s1), 664 COMPARE(vcvt_f64_u32(d0, s1),
613 "eeb80b60 vcvt.f64.u32 d0, s1"); 665 "eeb80b60 vcvt.f64.u32 d0, s1");
614 COMPARE(vcvt_f64_s32(d0, s1), 666 COMPARE(vcvt_f64_s32(d0, s1),
615 "eeb80be0 vcvt.f64.s32 d0, s1"); 667 "eeb80be0 vcvt.f64.s32 d0, s1");
616 COMPARE(vcvt_f32_s32(s0, s2), 668 COMPARE(vcvt_f32_s32(s0, s2),
617 "eeb80ac1 vcvt.f32.s32 s0, s2"); 669 "eeb80ac1 vcvt.f32.s32 s0, s2");
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 "e16dc7ff strd ip, [sp, #-127]!"); 996 "e16dc7ff strd ip, [sp, #-127]!");
945 997
946 COMPARE(pld(MemOperand(r1, 0)), 998 COMPARE(pld(MemOperand(r1, 0)),
947 "f5d1f000 pld [r1]"); 999 "f5d1f000 pld [r1]");
948 COMPARE(pld(MemOperand(r2, 128)), 1000 COMPARE(pld(MemOperand(r2, 128)),
949 "f5d2f080 pld [r2, #+128]"); 1001 "f5d2f080 pld [r2, #+128]");
950 } 1002 }
951 1003
952 VERIFY_RUN(); 1004 VERIFY_RUN();
953 } 1005 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-x64.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698