OLD | NEW |
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 COMPARE(vmov(r0, s0), | 429 COMPARE(vmov(r0, s0), |
430 "ee100a10 vmov r0, s0"); | 430 "ee100a10 vmov r0, s0"); |
431 COMPARE(vmov(r10, s31), | 431 COMPARE(vmov(r10, s31), |
432 "ee1faa90 vmov r10, s31"); | 432 "ee1faa90 vmov r10, s31"); |
433 COMPARE(vmov(s0, r0), | 433 COMPARE(vmov(s0, r0), |
434 "ee000a10 vmov s0, r0"); | 434 "ee000a10 vmov s0, r0"); |
435 COMPARE(vmov(s31, r10), | 435 COMPARE(vmov(s31, r10), |
436 "ee0faa90 vmov s31, r10"); | 436 "ee0faa90 vmov s31, r10"); |
437 | 437 |
438 COMPARE(vabs(d0, d1), | 438 COMPARE(vabs(d0, d1), |
439 "eeb00bc1 vabs d0, d1"); | 439 "eeb00bc1 vabs.f64 d0, d1"); |
440 COMPARE(vabs(d3, d4, mi), | 440 COMPARE(vabs(d3, d4, mi), |
441 "4eb03bc4 vabsmi d3, d4"); | 441 "4eb03bc4 vabs.f64mi d3, d4"); |
442 | 442 |
443 COMPARE(vneg(d0, d1), | 443 COMPARE(vneg(d0, d1), |
444 "eeb10b41 vneg d0, d1"); | 444 "eeb10b41 vneg.f64 d0, d1"); |
445 COMPARE(vneg(d3, d4, mi), | 445 COMPARE(vneg(d3, d4, mi), |
446 "4eb13b44 vnegmi d3, d4"); | 446 "4eb13b44 vneg.f64mi d3, d4"); |
447 | 447 |
448 COMPARE(vadd(d0, d1, d2), | 448 COMPARE(vadd(d0, d1, d2), |
449 "ee310b02 vadd.f64 d0, d1, d2"); | 449 "ee310b02 vadd.f64 d0, d1, d2"); |
450 COMPARE(vadd(d3, d4, d5, mi), | 450 COMPARE(vadd(d3, d4, d5, mi), |
451 "4e343b05 vadd.f64mi d3, d4, d5"); | 451 "4e343b05 vadd.f64mi d3, d4, d5"); |
452 | 452 |
453 COMPARE(vsub(d0, d1, d2), | 453 COMPARE(vsub(d0, d1, d2), |
454 "ee310b42 vsub.f64 d0, d1, d2"); | 454 "ee310b42 vsub.f64 d0, d1, d2"); |
455 COMPARE(vsub(d3, d4, d5, ne), | 455 COMPARE(vsub(d3, d4, d5, ne), |
456 "1e343b45 vsub.f64ne d3, d4, d5"); | 456 "1e343b45 vsub.f64ne d3, d4, d5"); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 COMPARE(vldm(ia, r5, s2, s5), | 536 COMPARE(vldm(ia, r5, s2, s5), |
537 "ec951a04 vldmia r5, {s2-s5}"); | 537 "ec951a04 vldmia r5, {s2-s5}"); |
538 COMPARE(vstm(ia, r6, s0, s31), | 538 COMPARE(vstm(ia, r6, s0, s31), |
539 "ec860a20 vstmia r6, {s0-s31}"); | 539 "ec860a20 vstmia r6, {s0-s31}"); |
540 COMPARE(vldm(ia, r7, s0, s31), | 540 COMPARE(vldm(ia, r7, s0, s31), |
541 "ec970a20 vldmia r7, {s0-s31}"); | 541 "ec970a20 vldmia r7, {s0-s31}"); |
542 } | 542 } |
543 | 543 |
544 VERIFY_RUN(); | 544 VERIFY_RUN(); |
545 } | 545 } |
| 546 |
| 547 |
| 548 TEST(LoadStore) { |
| 549 SETUP(); |
| 550 |
| 551 COMPARE(ldrb(r0, MemOperand(r1)), |
| 552 "e5d10000 ldrb r0, [r1, #+0]"); |
| 553 COMPARE(ldrb(r2, MemOperand(r3, 42)), |
| 554 "e5d3202a ldrb r2, [r3, #+42]"); |
| 555 COMPARE(ldrb(r4, MemOperand(r5, -42)), |
| 556 "e555402a ldrb r4, [r5, #-42]"); |
| 557 COMPARE(ldrb(r6, MemOperand(r7, 42, PostIndex)), |
| 558 "e4d7602a ldrb r6, [r7], #+42"); |
| 559 COMPARE(ldrb(r8, MemOperand(r9, -42, PostIndex)), |
| 560 "e459802a ldrb r8, [r9], #-42"); |
| 561 COMPARE(ldrb(r10, MemOperand(fp, 42, PreIndex)), |
| 562 "e5fba02a ldrb r10, [fp, #+42]!"); |
| 563 COMPARE(ldrb(ip, MemOperand(sp, -42, PreIndex)), |
| 564 "e57dc02a ldrb ip, [sp, #-42]!"); |
| 565 COMPARE(ldrb(r0, MemOperand(r1, r2)), |
| 566 "e7d10002 ldrb r0, [r1, +r2]"); |
| 567 COMPARE(ldrb(r0, MemOperand(r1, r2, NegOffset)), |
| 568 "e7510002 ldrb r0, [r1, -r2]"); |
| 569 COMPARE(ldrb(r0, MemOperand(r1, r2, PostIndex)), |
| 570 "e6d10002 ldrb r0, [r1], +r2"); |
| 571 COMPARE(ldrb(r0, MemOperand(r1, r2, NegPostIndex)), |
| 572 "e6510002 ldrb r0, [r1], -r2"); |
| 573 COMPARE(ldrb(r0, MemOperand(r1, r2, PreIndex)), |
| 574 "e7f10002 ldrb r0, [r1, +r2]!"); |
| 575 COMPARE(ldrb(r0, MemOperand(r1, r2, NegPreIndex)), |
| 576 "e7710002 ldrb r0, [r1, -r2]!"); |
| 577 |
| 578 COMPARE(strb(r0, MemOperand(r1)), |
| 579 "e5c10000 strb r0, [r1, #+0]"); |
| 580 COMPARE(strb(r2, MemOperand(r3, 42)), |
| 581 "e5c3202a strb r2, [r3, #+42]"); |
| 582 COMPARE(strb(r4, MemOperand(r5, -42)), |
| 583 "e545402a strb r4, [r5, #-42]"); |
| 584 COMPARE(strb(r6, MemOperand(r7, 42, PostIndex)), |
| 585 "e4c7602a strb r6, [r7], #+42"); |
| 586 COMPARE(strb(r8, MemOperand(r9, -42, PostIndex)), |
| 587 "e449802a strb r8, [r9], #-42"); |
| 588 COMPARE(strb(r10, MemOperand(fp, 42, PreIndex)), |
| 589 "e5eba02a strb r10, [fp, #+42]!"); |
| 590 COMPARE(strb(ip, MemOperand(sp, -42, PreIndex)), |
| 591 "e56dc02a strb ip, [sp, #-42]!"); |
| 592 COMPARE(strb(r0, MemOperand(r1, r2)), |
| 593 "e7c10002 strb r0, [r1, +r2]"); |
| 594 COMPARE(strb(r0, MemOperand(r1, r2, NegOffset)), |
| 595 "e7410002 strb r0, [r1, -r2]"); |
| 596 COMPARE(strb(r0, MemOperand(r1, r2, PostIndex)), |
| 597 "e6c10002 strb r0, [r1], +r2"); |
| 598 COMPARE(strb(r0, MemOperand(r1, r2, NegPostIndex)), |
| 599 "e6410002 strb r0, [r1], -r2"); |
| 600 COMPARE(strb(r0, MemOperand(r1, r2, PreIndex)), |
| 601 "e7e10002 strb r0, [r1, +r2]!"); |
| 602 COMPARE(strb(r0, MemOperand(r1, r2, NegPreIndex)), |
| 603 "e7610002 strb r0, [r1, -r2]!"); |
| 604 |
| 605 COMPARE(ldrh(r0, MemOperand(r1)), |
| 606 "e1d100b0 ldrh r0, [r1, #+0]"); |
| 607 COMPARE(ldrh(r2, MemOperand(r3, 42)), |
| 608 "e1d322ba ldrh r2, [r3, #+42]"); |
| 609 COMPARE(ldrh(r4, MemOperand(r5, -42)), |
| 610 "e15542ba ldrh r4, [r5, #-42]"); |
| 611 COMPARE(ldrh(r6, MemOperand(r7, 42, PostIndex)), |
| 612 "e0d762ba ldrh r6, [r7], #+42"); |
| 613 COMPARE(ldrh(r8, MemOperand(r9, -42, PostIndex)), |
| 614 "e05982ba ldrh r8, [r9], #-42"); |
| 615 COMPARE(ldrh(r10, MemOperand(fp, 42, PreIndex)), |
| 616 "e1fba2ba ldrh r10, [fp, #+42]!"); |
| 617 COMPARE(ldrh(ip, MemOperand(sp, -42, PreIndex)), |
| 618 "e17dc2ba ldrh ip, [sp, #-42]!"); |
| 619 COMPARE(ldrh(r0, MemOperand(r1, r2)), |
| 620 "e19100b2 ldrh r0, [r1, +r2]"); |
| 621 COMPARE(ldrh(r0, MemOperand(r1, r2, NegOffset)), |
| 622 "e11100b2 ldrh r0, [r1, -r2]"); |
| 623 COMPARE(ldrh(r0, MemOperand(r1, r2, PostIndex)), |
| 624 "e09100b2 ldrh r0, [r1], +r2"); |
| 625 COMPARE(ldrh(r0, MemOperand(r1, r2, NegPostIndex)), |
| 626 "e01100b2 ldrh r0, [r1], -r2"); |
| 627 COMPARE(ldrh(r0, MemOperand(r1, r2, PreIndex)), |
| 628 "e1b100b2 ldrh r0, [r1, +r2]!"); |
| 629 COMPARE(ldrh(r0, MemOperand(r1, r2, NegPreIndex)), |
| 630 "e13100b2 ldrh r0, [r1, -r2]!"); |
| 631 |
| 632 COMPARE(strh(r0, MemOperand(r1)), |
| 633 "e1c100b0 strh r0, [r1, #+0]"); |
| 634 COMPARE(strh(r2, MemOperand(r3, 42)), |
| 635 "e1c322ba strh r2, [r3, #+42]"); |
| 636 COMPARE(strh(r4, MemOperand(r5, -42)), |
| 637 "e14542ba strh r4, [r5, #-42]"); |
| 638 COMPARE(strh(r6, MemOperand(r7, 42, PostIndex)), |
| 639 "e0c762ba strh r6, [r7], #+42"); |
| 640 COMPARE(strh(r8, MemOperand(r9, -42, PostIndex)), |
| 641 "e04982ba strh r8, [r9], #-42"); |
| 642 COMPARE(strh(r10, MemOperand(fp, 42, PreIndex)), |
| 643 "e1eba2ba strh r10, [fp, #+42]!"); |
| 644 COMPARE(strh(ip, MemOperand(sp, -42, PreIndex)), |
| 645 "e16dc2ba strh ip, [sp, #-42]!"); |
| 646 COMPARE(strh(r0, MemOperand(r1, r2)), |
| 647 "e18100b2 strh r0, [r1, +r2]"); |
| 648 COMPARE(strh(r0, MemOperand(r1, r2, NegOffset)), |
| 649 "e10100b2 strh r0, [r1, -r2]"); |
| 650 COMPARE(strh(r0, MemOperand(r1, r2, PostIndex)), |
| 651 "e08100b2 strh r0, [r1], +r2"); |
| 652 COMPARE(strh(r0, MemOperand(r1, r2, NegPostIndex)), |
| 653 "e00100b2 strh r0, [r1], -r2"); |
| 654 COMPARE(strh(r0, MemOperand(r1, r2, PreIndex)), |
| 655 "e1a100b2 strh r0, [r1, +r2]!"); |
| 656 COMPARE(strh(r0, MemOperand(r1, r2, NegPreIndex)), |
| 657 "e12100b2 strh r0, [r1, -r2]!"); |
| 658 |
| 659 COMPARE(ldr(r0, MemOperand(r1)), |
| 660 "e5910000 ldr r0, [r1, #+0]"); |
| 661 COMPARE(ldr(r2, MemOperand(r3, 42)), |
| 662 "e593202a ldr r2, [r3, #+42]"); |
| 663 COMPARE(ldr(r4, MemOperand(r5, -42)), |
| 664 "e515402a ldr r4, [r5, #-42]"); |
| 665 COMPARE(ldr(r6, MemOperand(r7, 42, PostIndex)), |
| 666 "e497602a ldr r6, [r7], #+42"); |
| 667 COMPARE(ldr(r8, MemOperand(r9, -42, PostIndex)), |
| 668 "e419802a ldr r8, [r9], #-42"); |
| 669 COMPARE(ldr(r10, MemOperand(fp, 42, PreIndex)), |
| 670 "e5bba02a ldr r10, [fp, #+42]!"); |
| 671 COMPARE(ldr(ip, MemOperand(sp, -42, PreIndex)), |
| 672 "e53dc02a ldr ip, [sp, #-42]!"); |
| 673 COMPARE(ldr(r0, MemOperand(r1, r2)), |
| 674 "e7910002 ldr r0, [r1, +r2]"); |
| 675 COMPARE(ldr(r0, MemOperand(r1, r2, NegOffset)), |
| 676 "e7110002 ldr r0, [r1, -r2]"); |
| 677 COMPARE(ldr(r0, MemOperand(r1, r2, PostIndex)), |
| 678 "e6910002 ldr r0, [r1], +r2"); |
| 679 COMPARE(ldr(r0, MemOperand(r1, r2, NegPostIndex)), |
| 680 "e6110002 ldr r0, [r1], -r2"); |
| 681 COMPARE(ldr(r0, MemOperand(r1, r2, PreIndex)), |
| 682 "e7b10002 ldr r0, [r1, +r2]!"); |
| 683 COMPARE(ldr(r0, MemOperand(r1, r2, NegPreIndex)), |
| 684 "e7310002 ldr r0, [r1, -r2]!"); |
| 685 |
| 686 COMPARE(str(r0, MemOperand(r1)), |
| 687 "e5810000 str r0, [r1, #+0]"); |
| 688 COMPARE(str(r2, MemOperand(r3, 42)), |
| 689 "e583202a str r2, [r3, #+42]"); |
| 690 COMPARE(str(r4, MemOperand(r5, -42)), |
| 691 "e505402a str r4, [r5, #-42]"); |
| 692 COMPARE(str(r6, MemOperand(r7, 42, PostIndex)), |
| 693 "e487602a str r6, [r7], #+42"); |
| 694 COMPARE(str(r8, MemOperand(r9, -42, PostIndex)), |
| 695 "e409802a str r8, [r9], #-42"); |
| 696 COMPARE(str(r10, MemOperand(fp, 42, PreIndex)), |
| 697 "e5aba02a str r10, [fp, #+42]!"); |
| 698 COMPARE(str(ip, MemOperand(sp, -42, PreIndex)), |
| 699 "e52dc02a str ip, [sp, #-42]!"); |
| 700 COMPARE(str(r0, MemOperand(r1, r2)), |
| 701 "e7810002 str r0, [r1, +r2]"); |
| 702 COMPARE(str(r0, MemOperand(r1, r2, NegOffset)), |
| 703 "e7010002 str r0, [r1, -r2]"); |
| 704 COMPARE(str(r0, MemOperand(r1, r2, PostIndex)), |
| 705 "e6810002 str r0, [r1], +r2"); |
| 706 COMPARE(str(r0, MemOperand(r1, r2, NegPostIndex)), |
| 707 "e6010002 str r0, [r1], -r2"); |
| 708 COMPARE(str(r0, MemOperand(r1, r2, PreIndex)), |
| 709 "e7a10002 str r0, [r1, +r2]!"); |
| 710 COMPARE(str(r0, MemOperand(r1, r2, NegPreIndex)), |
| 711 "e7210002 str r0, [r1, -r2]!"); |
| 712 |
| 713 if (CpuFeatures::IsSupported(ARMv7)) { |
| 714 CpuFeatures::Scope scope(ARMv7); |
| 715 COMPARE(ldrd(r0, r1, MemOperand(r1)), |
| 716 "e1c100d0 ldrd r0, [r1, #+0]"); |
| 717 COMPARE(ldrd(r2, r3, MemOperand(r3, 127)), |
| 718 "e1c327df ldrd r2, [r3, #+127]"); |
| 719 COMPARE(ldrd(r4, r5, MemOperand(r5, -127)), |
| 720 "e14547df ldrd r4, [r5, #-127]"); |
| 721 COMPARE(ldrd(r6, r7, MemOperand(r7, 127, PostIndex)), |
| 722 "e0c767df ldrd r6, [r7], #+127"); |
| 723 COMPARE(ldrd(r8, r9, MemOperand(r9, -127, PostIndex)), |
| 724 "e04987df ldrd r8, [r9], #-127"); |
| 725 COMPARE(ldrd(r10, fp, MemOperand(fp, 127, PreIndex)), |
| 726 "e1eba7df ldrd r10, [fp, #+127]!"); |
| 727 COMPARE(ldrd(ip, sp, MemOperand(sp, -127, PreIndex)), |
| 728 "e16dc7df ldrd ip, [sp, #-127]!"); |
| 729 |
| 730 COMPARE(strd(r0, r1, MemOperand(r1)), |
| 731 "e1c100f0 strd r0, [r1, #+0]"); |
| 732 COMPARE(strd(r2, r3, MemOperand(r3, 127)), |
| 733 "e1c327ff strd r2, [r3, #+127]"); |
| 734 COMPARE(strd(r4, r5, MemOperand(r5, -127)), |
| 735 "e14547ff strd r4, [r5, #-127]"); |
| 736 COMPARE(strd(r6, r7, MemOperand(r7, 127, PostIndex)), |
| 737 "e0c767ff strd r6, [r7], #+127"); |
| 738 COMPARE(strd(r8, r9, MemOperand(r9, -127, PostIndex)), |
| 739 "e04987ff strd r8, [r9], #-127"); |
| 740 COMPARE(strd(r10, fp, MemOperand(fp, 127, PreIndex)), |
| 741 "e1eba7ff strd r10, [fp, #+127]!"); |
| 742 COMPARE(strd(ip, sp, MemOperand(sp, -127, PreIndex)), |
| 743 "e16dc7ff strd ip, [sp, #-127]!"); |
| 744 } |
| 745 |
| 746 VERIFY_RUN(); |
| 747 } |
| 748 |
OLD | NEW |