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

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

Issue 11428137: ARM: Make use of d16-d31 when available. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-serialize.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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 VERIFY_RUN(); 418 VERIFY_RUN();
419 } 419 }
420 420
421 421
422 422
423 TEST(Vfp) { 423 TEST(Vfp) {
424 SET_UP(); 424 SET_UP();
425 425
426 if (CpuFeatures::IsSupported(VFP3)) { 426 if (CpuFeatures::IsSupported(VFP3)) {
427 CpuFeatures::Scope scope(VFP3); 427 CpuFeatures::Scope scope(VFP3);
428 COMPARE(vmov(d0, r2, r3),
429 "ec432b10 vmov d0, r2, r3");
430 COMPARE(vmov(r2, r3, d0),
431 "ec532b10 vmov r2, r3, d0");
428 COMPARE(vmov(d0, d1), 432 COMPARE(vmov(d0, d1),
429 "eeb00b41 vmov.f64 d0, d1"); 433 "eeb00b41 vmov.f64 d0, d1");
430 COMPARE(vmov(d3, d3, eq), 434 COMPARE(vmov(d3, d3, eq),
431 "0eb03b43 vmov.f64eq d3, d3"); 435 "0eb03b43 vmov.f64eq d3, d3");
432 436
433 COMPARE(vmov(s0, s31), 437 COMPARE(vmov(s0, s31),
434 "eeb00a6f vmov.f32 s0, s31"); 438 "eeb00a6f vmov.f32 s0, s31");
435 COMPARE(vmov(s31, s0), 439 COMPARE(vmov(s31, s0),
436 "eef0fa40 vmov.f32 s31, s0"); 440 "eef0fa40 vmov.f32 s31, s0");
437 COMPARE(vmov(r0, s0), 441 COMPARE(vmov(r0, s0),
(...skipping 28 matching lines...) Expand all
466 COMPARE(vmul(d2, d1, d0), 470 COMPARE(vmul(d2, d1, d0),
467 "ee212b00 vmul.f64 d2, d1, d0"); 471 "ee212b00 vmul.f64 d2, d1, d0");
468 COMPARE(vmul(d6, d4, d5, cc), 472 COMPARE(vmul(d6, d4, d5, cc),
469 "3e246b05 vmul.f64cc d6, d4, d5"); 473 "3e246b05 vmul.f64cc d6, d4, d5");
470 474
471 COMPARE(vdiv(d2, d2, d2), 475 COMPARE(vdiv(d2, d2, d2),
472 "ee822b02 vdiv.f64 d2, d2, d2"); 476 "ee822b02 vdiv.f64 d2, d2, d2");
473 COMPARE(vdiv(d6, d7, d7, hi), 477 COMPARE(vdiv(d6, d7, d7, hi),
474 "8e876b07 vdiv.f64hi d6, d7, d7"); 478 "8e876b07 vdiv.f64hi d6, d7, d7");
475 479
480 COMPARE(vcmp(d0, d1),
481 "eeb40b41 vcmp.f64 d0, d1");
482 COMPARE(vcmp(d0, 0.0),
483 "eeb50b40 vcmp.f64 d0, #0.0");
484
476 COMPARE(vsqrt(d0, d0), 485 COMPARE(vsqrt(d0, d0),
477 "eeb10bc0 vsqrt.f64 d0, d0"); 486 "eeb10bc0 vsqrt.f64 d0, d0");
478 COMPARE(vsqrt(d2, d3, ne), 487 COMPARE(vsqrt(d2, d3, ne),
479 "1eb12bc3 vsqrt.f64ne d2, d3"); 488 "1eb12bc3 vsqrt.f64ne d2, d3");
480 489
481 COMPARE(vmov(d0, 1.0), 490 COMPARE(vmov(d0, 1.0),
482 "eeb70b00 vmov.f64 d0, #1"); 491 "eeb70b00 vmov.f64 d0, #1");
483 COMPARE(vmov(d2, -13.0), 492 COMPARE(vmov(d2, -13.0),
484 "eeba2b0a vmov.f64 d2, #-13"); 493 "eeba2b0a vmov.f64 d2, #-13");
485 494
495 COMPARE(vmov(d0, 0, r0),
496 "ee000b10 vmov.32 d0[0], r0");
497 COMPARE(vmov(d0, 1, r0),
498 "ee200b10 vmov.32 d0[1], r0");
499
486 COMPARE(vldr(s0, r0, 0), 500 COMPARE(vldr(s0, r0, 0),
487 "ed900a00 vldr s0, [r0 + 4*0]"); 501 "ed900a00 vldr s0, [r0 + 4*0]");
488 COMPARE(vldr(s1, r1, 4), 502 COMPARE(vldr(s1, r1, 4),
489 "edd10a01 vldr s1, [r1 + 4*1]"); 503 "edd10a01 vldr s1, [r1 + 4*1]");
490 COMPARE(vldr(s15, r4, 16), 504 COMPARE(vldr(s15, r4, 16),
491 "edd47a04 vldr s15, [r4 + 4*4]"); 505 "edd47a04 vldr s15, [r4 + 4*4]");
492 COMPARE(vldr(s16, r5, 20), 506 COMPARE(vldr(s16, r5, 20),
493 "ed958a05 vldr s16, [r5 + 4*5]"); 507 "ed958a05 vldr s16, [r5 + 4*5]");
494 COMPARE(vldr(s31, r10, 1020), 508 COMPARE(vldr(s31, r10, 1020),
495 "eddafaff vldr s31, [r10 + 4*255]"); 509 "eddafaff vldr s31, [r10 + 4*255]");
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 "ec951a04 vldmia r5, {s2-s5}"); 559 "ec951a04 vldmia r5, {s2-s5}");
546 COMPARE(vstm(ia, r6, s0, s31), 560 COMPARE(vstm(ia, r6, s0, s31),
547 "ec860a20 vstmia r6, {s0-s31}"); 561 "ec860a20 vstmia r6, {s0-s31}");
548 COMPARE(vldm(ia, r7, s0, s31), 562 COMPARE(vldm(ia, r7, s0, s31),
549 "ec970a20 vldmia r7, {s0-s31}"); 563 "ec970a20 vldmia r7, {s0-s31}");
550 564
551 COMPARE(vmla(d2, d1, d0), 565 COMPARE(vmla(d2, d1, d0),
552 "ee012b00 vmla.f64 d2, d1, d0"); 566 "ee012b00 vmla.f64 d2, d1, d0");
553 COMPARE(vmla(d6, d4, d5, cc), 567 COMPARE(vmla(d6, d4, d5, cc),
554 "3e046b05 vmla.f64cc d6, d4, d5"); 568 "3e046b05 vmla.f64cc d6, d4, d5");
569
570 COMPARE(vcvt_u32_f64(s0, d0),
571 "eebc0bc0 vcvt.u32.f64 s0, d0");
572 COMPARE(vcvt_s32_f64(s0, d0),
573 "eebd0bc0 vcvt.s32.f64 s0, d0");
574 COMPARE(vcvt_f64_u32(d0, s1),
575 "eeb80b60 vcvt.f64.u32 d0, s1");
576 COMPARE(vcvt_f64_s32(d0, s1),
577 "eeb80be0 vcvt.f64.s32 d0, s1");
578 COMPARE(vcvt_f32_s32(s0, s2),
579 "eeb80ac1 vcvt.f32.s32 s0, s2");
580
581 if (CpuFeatures::IsSupported(VFP32DREGS)) {
582 COMPARE(vmov(d3, d27),
583 "eeb03b6b vmov.f64 d3, d27");
584 COMPARE(vmov(d18, d7),
585 "eef02b47 vmov.f64 d18, d7");
586 COMPARE(vmov(d18, r2, r3),
587 "ec432b32 vmov d18, r2, r3");
588 COMPARE(vmov(r2, r3, d18),
589 "ec532b32 vmov r2, r3, d18");
590 COMPARE(vmov(d20, d31),
591 "eef04b6f vmov.f64 d20, d31");
592
593 COMPARE(vabs(d16, d31),
594 "eef00bef vabs.f64 d16, d31");
595
596 COMPARE(vneg(d16, d31),
597 "eef10b6f vneg.f64 d16, d31");
598
599 COMPARE(vadd(d16, d17, d18),
600 "ee710ba2 vadd.f64 d16, d17, d18");
601
602 COMPARE(vsub(d16, d17, d18),
603 "ee710be2 vsub.f64 d16, d17, d18");
604
605 COMPARE(vmul(d16, d17, d18),
606 "ee610ba2 vmul.f64 d16, d17, d18");
607
608 COMPARE(vdiv(d16, d17, d18),
609 "eec10ba2 vdiv.f64 d16, d17, d18");
610
611 COMPARE(vcmp(d16, d17),
612 "eef40b61 vcmp.f64 d16, d17");
613 COMPARE(vcmp(d16, 0.0),
614 "eef50b40 vcmp.f64 d16, #0.0");
615
616 COMPARE(vsqrt(d16, d17),
617 "eef10be1 vsqrt.f64 d16, d17");
618
619 COMPARE(vmov(d30, 16.0),
620 "eef3eb00 vmov.f64 d30, #16");
621
622 COMPARE(vmov(d31, 0, r7),
623 "ee0f7b90 vmov.32 d31[0], r7");
624 COMPARE(vmov(d31, 1, r7),
625 "ee2f7b90 vmov.32 d31[1], r7");
626
627 COMPARE(vldr(d25, r0, 0),
628 "edd09b00 vldr d25, [r0 + 4*0]");
629 COMPARE(vldr(d26, r1, 4),
630 "edd1ab01 vldr d26, [r1 + 4*1]");
631 COMPARE(vldr(d31, r10, 1020),
632 "eddafbff vldr d31, [r10 + 4*255]");
633
634 COMPARE(vstr(d16, r0, 0),
635 "edc00b00 vstr d16, [r0 + 4*0]");
636 COMPARE(vstr(d17, r1, 4),
637 "edc11b01 vstr d17, [r1 + 4*1]");
638 COMPARE(vstr(d31, r10, 1020),
639 "edcafbff vstr d31, [r10 + 4*255]");
640
641 COMPARE(vstm(ia, r0, d16, d31),
642 "ecc00b20 vstmia r0, {d16-d31}");
643 COMPARE(vldm(ia, r3, d16, d31),
644 "ecd30b20 vldmia r3, {d16-d31}");
645 COMPARE(vstm(ia, r0, d23, d27),
646 "ecc07b0a vstmia r0, {d23-d27}");
647 COMPARE(vldm(ia, r3, d23, d27),
648 "ecd37b0a vldmia r3, {d23-d27}");
649
650 COMPARE(vmla(d16, d17, d18),
651 "ee410ba2 vmla.f64 d16, d17, d18");
652
653 COMPARE(vcvt_u32_f64(s0, d16),
654 "eebc0be0 vcvt.u32.f64 s0, d16");
655 COMPARE(vcvt_s32_f64(s0, d16),
656 "eebd0be0 vcvt.s32.f64 s0, d16");
657 COMPARE(vcvt_f64_u32(d16, s1),
658 "eef80b60 vcvt.f64.u32 d16, s1");
659 }
555 } 660 }
556 661
557 VERIFY_RUN(); 662 VERIFY_RUN();
558 } 663 }
559 664
560 665
561 TEST(LoadStore) { 666 TEST(LoadStore) {
562 SET_UP(); 667 SET_UP();
563 668
564 COMPARE(ldrb(r0, MemOperand(r1)), 669 COMPARE(ldrb(r0, MemOperand(r1)),
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 COMPARE(strd(r8, r9, MemOperand(r9, -127, PostIndex)), 856 COMPARE(strd(r8, r9, MemOperand(r9, -127, PostIndex)),
752 "e04987ff strd r8, [r9], #-127"); 857 "e04987ff strd r8, [r9], #-127");
753 COMPARE(strd(r10, fp, MemOperand(fp, 127, PreIndex)), 858 COMPARE(strd(r10, fp, MemOperand(fp, 127, PreIndex)),
754 "e1eba7ff strd r10, [fp, #+127]!"); 859 "e1eba7ff strd r10, [fp, #+127]!");
755 COMPARE(strd(ip, sp, MemOperand(sp, -127, PreIndex)), 860 COMPARE(strd(ip, sp, MemOperand(sp, -127, PreIndex)),
756 "e16dc7ff strd ip, [sp, #-127]!"); 861 "e16dc7ff strd ip, [sp, #-127]!");
757 } 862 }
758 863
759 VERIFY_RUN(); 864 VERIFY_RUN();
760 } 865 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698