OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 COMPARE(rorv(w18, w19, w20), "ror w18, w19, w20"); | 775 COMPARE(rorv(w18, w19, w20), "ror w18, w19, w20"); |
776 COMPARE(rorv(x21, x22, x23), "ror x21, x22, x23"); | 776 COMPARE(rorv(x21, x22, x23), "ror x21, x22, x23"); |
777 | 777 |
778 CLEANUP(); | 778 CLEANUP(); |
779 } | 779 } |
780 | 780 |
781 | 781 |
782 TEST_(adr) { | 782 TEST_(adr) { |
783 SET_UP(); | 783 SET_UP(); |
784 | 784 |
785 COMPARE(adr(x0, 0), "adr x0, #+0x0"); | 785 COMPARE_PREFIX(adr(x0, 0), "adr x0, #+0x0"); |
786 COMPARE(adr(x1, 1), "adr x1, #+0x1"); | 786 COMPARE_PREFIX(adr(x1, 1), "adr x1, #+0x1"); |
787 COMPARE(adr(x2, -1), "adr x2, #-0x1"); | 787 COMPARE_PREFIX(adr(x2, -1), "adr x2, #-0x1"); |
788 COMPARE(adr(x3, 4), "adr x3, #+0x4"); | 788 COMPARE_PREFIX(adr(x3, 4), "adr x3, #+0x4"); |
789 COMPARE(adr(x4, -4), "adr x4, #-0x4"); | 789 COMPARE_PREFIX(adr(x4, -4), "adr x4, #-0x4"); |
790 COMPARE(adr(x5, 0x000fffff), "adr x5, #+0xfffff"); | 790 COMPARE_PREFIX(adr(x5, 0x000fffff), "adr x5, #+0xfffff"); |
791 COMPARE(adr(x6, -0x00100000), "adr x6, #-0x100000"); | 791 COMPARE_PREFIX(adr(x6, -0x00100000), "adr x6, #-0x100000"); |
792 COMPARE(adr(xzr, 0), "adr xzr, #+0x0"); | 792 COMPARE_PREFIX(adr(xzr, 0), "adr xzr, #+0x0"); |
793 | 793 |
794 CLEANUP(); | 794 CLEANUP(); |
795 } | 795 } |
796 | 796 |
797 | 797 |
798 TEST_(branch) { | 798 TEST_(branch) { |
799 SET_UP(); | 799 SET_UP(); |
800 | 800 |
801 #define INST_OFF(x) ((x) >> kInstructionSizeLog2) | 801 #define INST_OFF(x) ((x) >> kInstructionSizeLog2) |
802 COMPARE(b(INST_OFF(0x4)), "b #+0x4"); | 802 COMPARE_PREFIX(b(INST_OFF(0x4)), "b #+0x4"); |
803 COMPARE(b(INST_OFF(-0x4)), "b #-0x4"); | 803 COMPARE_PREFIX(b(INST_OFF(-0x4)), "b #-0x4"); |
804 COMPARE(b(INST_OFF(0x7fffffc)), "b #+0x7fffffc"); | 804 COMPARE_PREFIX(b(INST_OFF(0x7fffffc)), "b #+0x7fffffc"); |
805 COMPARE(b(INST_OFF(-0x8000000)), "b #-0x8000000"); | 805 COMPARE_PREFIX(b(INST_OFF(-0x8000000)), "b #-0x8000000"); |
806 COMPARE(b(INST_OFF(0xffffc), eq), "b.eq #+0xffffc"); | 806 COMPARE_PREFIX(b(INST_OFF(0xffffc), eq), "b.eq #+0xffffc"); |
807 COMPARE(b(INST_OFF(-0x100000), mi), "b.mi #-0x100000"); | 807 COMPARE_PREFIX(b(INST_OFF(-0x100000), mi), "b.mi #-0x100000"); |
808 COMPARE(bl(INST_OFF(0x4)), "bl #+0x4"); | 808 COMPARE_PREFIX(bl(INST_OFF(0x4)), "bl #+0x4"); |
809 COMPARE(bl(INST_OFF(-0x4)), "bl #-0x4"); | 809 COMPARE_PREFIX(bl(INST_OFF(-0x4)), "bl #-0x4"); |
810 COMPARE(bl(INST_OFF(0xffffc)), "bl #+0xffffc"); | 810 COMPARE_PREFIX(bl(INST_OFF(0xffffc)), "bl #+0xffffc"); |
811 COMPARE(bl(INST_OFF(-0x100000)), "bl #-0x100000"); | 811 COMPARE_PREFIX(bl(INST_OFF(-0x100000)), "bl #-0x100000"); |
812 COMPARE(cbz(w0, INST_OFF(0xffffc)), "cbz w0, #+0xffffc"); | 812 COMPARE_PREFIX(cbz(w0, INST_OFF(0xffffc)), "cbz w0, #+0xffffc"); |
813 COMPARE(cbz(x1, INST_OFF(-0x100000)), "cbz x1, #-0x100000"); | 813 COMPARE_PREFIX(cbz(x1, INST_OFF(-0x100000)), "cbz x1, #-0x100000"); |
814 COMPARE(cbnz(w2, INST_OFF(0xffffc)), "cbnz w2, #+0xffffc"); | 814 COMPARE_PREFIX(cbnz(w2, INST_OFF(0xffffc)), "cbnz w2, #+0xffffc"); |
815 COMPARE(cbnz(x3, INST_OFF(-0x100000)), "cbnz x3, #-0x100000"); | 815 COMPARE_PREFIX(cbnz(x3, INST_OFF(-0x100000)), "cbnz x3, #-0x100000"); |
816 COMPARE(tbz(w4, 0, INST_OFF(0x7ffc)), "tbz w4, #0, #+0x7ffc"); | 816 COMPARE_PREFIX(tbz(w4, 0, INST_OFF(0x7ffc)), "tbz w4, #0, #+0x7ffc"); |
817 COMPARE(tbz(x5, 63, INST_OFF(-0x8000)), "tbz x5, #63, #-0x8000"); | 817 COMPARE_PREFIX(tbz(x5, 63, INST_OFF(-0x8000)), "tbz x5, #63, #-0x8000"); |
818 COMPARE(tbz(w6, 31, INST_OFF(0)), "tbz w6, #31, #+0x0"); | 818 COMPARE_PREFIX(tbz(w6, 31, INST_OFF(0)), "tbz w6, #31, #+0x0"); |
819 COMPARE(tbz(x7, 31, INST_OFF(0x4)), "tbz w7, #31, #+0x4"); | 819 COMPARE_PREFIX(tbz(x7, 31, INST_OFF(0x4)), "tbz w7, #31, #+0x4"); |
820 COMPARE(tbz(x8, 32, INST_OFF(0x8)), "tbz x8, #32, #+0x8"); | 820 COMPARE_PREFIX(tbz(x8, 32, INST_OFF(0x8)), "tbz x8, #32, #+0x8"); |
821 COMPARE(tbnz(w8, 0, INST_OFF(0x7ffc)), "tbnz w8, #0, #+0x7ffc"); | 821 COMPARE_PREFIX(tbnz(w8, 0, INST_OFF(0x7ffc)), "tbnz w8, #0, #+0x7ffc"); |
822 COMPARE(tbnz(x9, 63, INST_OFF(-0x8000)), "tbnz x9, #63, #-0x8000"); | 822 COMPARE_PREFIX(tbnz(x9, 63, INST_OFF(-0x8000)), "tbnz x9, #63, #-0x8000"); |
823 COMPARE(tbnz(w10, 31, INST_OFF(0)), "tbnz w10, #31, #+0x0"); | 823 COMPARE_PREFIX(tbnz(w10, 31, INST_OFF(0)), "tbnz w10, #31, #+0x0"); |
824 COMPARE(tbnz(x11, 31, INST_OFF(0x4)), "tbnz w11, #31, #+0x4"); | 824 COMPARE_PREFIX(tbnz(x11, 31, INST_OFF(0x4)), "tbnz w11, #31, #+0x4"); |
825 COMPARE(tbnz(x12, 32, INST_OFF(0x8)), "tbnz x12, #32, #+0x8"); | 825 COMPARE_PREFIX(tbnz(x12, 32, INST_OFF(0x8)), "tbnz x12, #32, #+0x8"); |
826 COMPARE(br(x0), "br x0"); | 826 COMPARE(br(x0), "br x0"); |
827 COMPARE(blr(x1), "blr x1"); | 827 COMPARE(blr(x1), "blr x1"); |
828 COMPARE(ret(x2), "ret x2"); | 828 COMPARE(ret(x2), "ret x2"); |
829 COMPARE(ret(lr), "ret") | 829 COMPARE(ret(lr), "ret") |
830 | 830 |
831 CLEANUP(); | 831 CLEANUP(); |
832 } | 832 } |
833 | 833 |
834 | 834 |
835 TEST_(load_store) { | 835 TEST_(load_store) { |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)"); | 1754 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)"); |
1755 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); | 1755 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); |
1756 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); | 1756 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); |
1757 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); | 1757 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); |
1758 | 1758 |
1759 // ISB | 1759 // ISB |
1760 COMPARE(Isb(), "isb"); | 1760 COMPARE(Isb(), "isb"); |
1761 | 1761 |
1762 CLEANUP(); | 1762 CLEANUP(); |
1763 } | 1763 } |
OLD | NEW |