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

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

Issue 1534183002: MIPS64: r6 compact branch optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing master to include the new changes Created 4 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
« no previous file with comments | « src/mips64/simulator-mips64.cc ('k') | test/cctest/test-macro-assembler-mips64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 20 matching lines...) Expand all
31 #include "src/v8.h" 31 #include "src/v8.h"
32 32
33 #include "src/debug/debug.h" 33 #include "src/debug/debug.h"
34 #include "src/disasm.h" 34 #include "src/disasm.h"
35 #include "src/disassembler.h" 35 #include "src/disassembler.h"
36 #include "src/macro-assembler.h" 36 #include "src/macro-assembler.h"
37 #include "test/cctest/cctest.h" 37 #include "test/cctest/cctest.h"
38 38
39 using namespace v8::internal; 39 using namespace v8::internal;
40 40
41 bool prev_instr_compact_branch = false;
41 42
42 bool DisassembleAndCompare(byte* pc, const char* compare_string) { 43 bool DisassembleAndCompare(byte* pc, const char* compare_string) {
43 disasm::NameConverter converter; 44 disasm::NameConverter converter;
44 disasm::Disassembler disasm(converter); 45 disasm::Disassembler disasm(converter);
45 EmbeddedVector<char, 128> disasm_buffer; 46 EmbeddedVector<char, 128> disasm_buffer;
46 47
48 if (prev_instr_compact_branch) {
49 disasm.InstructionDecode(disasm_buffer, pc);
50 pc += 4;
51 }
52
47 disasm.InstructionDecode(disasm_buffer, pc); 53 disasm.InstructionDecode(disasm_buffer, pc);
48 54
49 if (strcmp(compare_string, disasm_buffer.start()) != 0) { 55 if (strcmp(compare_string, disasm_buffer.start()) != 0) {
50 fprintf(stderr, 56 fprintf(stderr,
51 "expected: \n" 57 "expected: \n"
52 "%s\n" 58 "%s\n"
53 "disassembled: \n" 59 "disassembled: \n"
54 "%s\n\n", 60 "%s\n\n",
55 compare_string, disasm_buffer.start()); 61 compare_string, disasm_buffer.start());
56 return false; 62 return false;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 if (failure) { \ 96 if (failure) { \
91 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \ 97 V8_Fatal(__FILE__, __LINE__, "MIPS Disassembler tests failed.\n"); \
92 } 98 }
93 99
94 100
95 #define COMPARE_PC_REL_COMPACT(asm_, compare_string, offset) \ 101 #define COMPARE_PC_REL_COMPACT(asm_, compare_string, offset) \
96 { \ 102 { \
97 int pc_offset = assm.pc_offset(); \ 103 int pc_offset = assm.pc_offset(); \
98 byte *progcounter = &buffer[pc_offset]; \ 104 byte *progcounter = &buffer[pc_offset]; \
99 char str_with_address[100]; \ 105 char str_with_address[100]; \
100 snprintf(str_with_address, sizeof(str_with_address), "%s -> %p", \ 106 prev_instr_compact_branch = assm.IsPrevInstrCompactBranch(); \
101 compare_string, progcounter + 4 + (offset * 4)); \ 107 if (prev_instr_compact_branch) { \
108 snprintf(str_with_address, sizeof(str_with_address), "%s -> %p", \
109 compare_string, progcounter + 8 + (offset * 4)); \
110 } else { \
111 snprintf(str_with_address, sizeof(str_with_address), "%s -> %p", \
112 compare_string, progcounter + 4 + (offset * 4)); \
113 } \
102 assm.asm_; \ 114 assm.asm_; \
103 if (!DisassembleAndCompare(progcounter, str_with_address)) failure = true; \ 115 if (!DisassembleAndCompare(progcounter, str_with_address)) failure = true; \
104 } 116 }
105 117
106 118
107 #define COMPARE_PC_REL(asm_, compare_string, offset) \ 119 #define COMPARE_PC_REL(asm_, compare_string, offset) \
108 { \ 120 { \
109 int pc_offset = assm.pc_offset(); \ 121 int pc_offset = assm.pc_offset(); \
110 byte *progcounter = &buffer[pc_offset]; \ 122 byte *progcounter = &buffer[pc_offset]; \
111 char str_with_address[100]; \ 123 char str_with_address[100]; \
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 COMPARE(lwupc(a0, 262143), "ec93ffff lwupc a0, 262143"); 775 COMPARE(lwupc(a0, 262143), "ec93ffff lwupc a0, 262143");
764 } 776 }
765 777
766 if (kArchVariant == kMips64r6) { 778 if (kArchVariant == kMips64r6) {
767 COMPARE(jic(t0, 16), "d80c0010 jic t0, 16"); 779 COMPARE(jic(t0, 16), "d80c0010 jic t0, 16");
768 COMPARE(jic(t0, 4), "d80c0004 jic t0, 4"); 780 COMPARE(jic(t0, 4), "d80c0004 jic t0, 4");
769 COMPARE(jic(t0, -32), "d80cffe0 jic t0, -32"); 781 COMPARE(jic(t0, -32), "d80cffe0 jic t0, -32");
770 } 782 }
771 783
772 if (kArchVariant == kMips64r6) { 784 if (kArchVariant == kMips64r6) {
773 COMPARE_PC_REL_COMPACT(beqzc(a0, 16), "d8800010 beqzc a0, 0x10",
774 16);
775 COMPARE_PC_REL_COMPACT(beqzc(a0, 4), "d8800004 beqzc a0, 0x4", 4);
776 COMPARE_PC_REL_COMPACT(beqzc(a0, -32),
777 "d89fffe0 beqzc a0, 0x1fffe0", -32);
778 }
779
780 if (kArchVariant == kMips64r6) {
781 COMPARE(ldpc(v0, 256), "ec580100 ldpc v0, 256"); 785 COMPARE(ldpc(v0, 256), "ec580100 ldpc v0, 256");
782 COMPARE(ldpc(a0, -1), "ec9bffff ldpc a0, -1"); 786 COMPARE(ldpc(a0, -1), "ec9bffff ldpc a0, -1");
783 COMPARE(ldpc(a1, 0), "ecb80000 ldpc a1, 0"); 787 COMPARE(ldpc(a1, 0), "ecb80000 ldpc a1, 0");
784 } 788 }
785 789
786 if (kArchVariant == kMips64r6) { 790 if (kArchVariant == kMips64r6) {
787 COMPARE(addiupc(a0, 262143), "ec83ffff addiupc a0, 262143"); 791 COMPARE(addiupc(a0, 262143), "ec83ffff addiupc a0, 262143");
788 COMPARE(addiupc(a0, -1), "ec87ffff addiupc a0, -1"); 792 COMPARE(addiupc(a0, -1), "ec87ffff addiupc a0, -1");
789 COMPARE(addiupc(v0, 0), "ec400000 addiupc v0, 0"); 793 COMPARE(addiupc(v0, 0), "ec400000 addiupc v0, 0");
790 COMPARE(addiupc(s1, 1), "ee200001 addiupc s1, 1"); 794 COMPARE(addiupc(s1, 1), "ee200001 addiupc s1, 1");
791 COMPARE(addiupc(a0, -262144), "ec840000 addiupc a0, -262144"); 795 COMPARE(addiupc(a0, -262144), "ec840000 addiupc a0, -262144");
792 } 796 }
793 797
794 if (kArchVariant == kMips64r6) { 798 if (kArchVariant == kMips64r6) {
795 COMPARE(jialc(a0, -32768), "f8048000 jialc a0, 0x8000"); 799 COMPARE(jialc(a0, -32768), "f8048000 jialc a0, -32768");
796 COMPARE(jialc(a0, -1), "f804ffff jialc a0, 0xffff"); 800 COMPARE(jialc(a0, -1), "f804ffff jialc a0, -1");
797 COMPARE(jialc(v0, 0), "f8020000 jialc v0, 0x0"); 801 COMPARE(jialc(v0, 0), "f8020000 jialc v0, 0");
798 COMPARE(jialc(s1, 1), "f8110001 jialc s1, 0x1"); 802 COMPARE(jialc(s1, 1), "f8110001 jialc s1, 1");
799 COMPARE(jialc(a0, 32767), "f8047fff jialc a0, 0x7fff"); 803 COMPARE(jialc(a0, 32767), "f8047fff jialc a0, 32767");
800 } 804 }
801 805
802 VERIFY_RUN(); 806 VERIFY_RUN();
803 } 807 }
804 808
805 809
806 TEST(Type1) { 810 TEST(Type1) {
807 SET_UP(); 811 SET_UP();
808 if (kArchVariant == kMips64r6) { 812 if (kArchVariant == kMips64r6) {
809 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2"); 813 COMPARE(seleqz(a0, a1, a2), "00a62035 seleqz a0, a1, a2");
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 926
923 COMPARE_PC_REL_COMPACT(bnvc(a0, a0, static_cast<int16_t>(0)), 927 COMPARE_PC_REL_COMPACT(bnvc(a0, a0, static_cast<int16_t>(0)),
924 "60840000 bnvc a0, a0, 0", 0); 928 "60840000 bnvc a0, a0, 0", 0);
925 COMPARE_PC_REL_COMPACT(bnvc(a1, a0, static_cast<int16_t>(0)), 929 COMPARE_PC_REL_COMPACT(bnvc(a1, a0, static_cast<int16_t>(0)),
926 "60a40000 bnvc a1, a0, 0", 0); 930 "60a40000 bnvc a1, a0, 0", 0);
927 COMPARE_PC_REL_COMPACT(bnvc(a1, a0, 32767), 931 COMPARE_PC_REL_COMPACT(bnvc(a1, a0, 32767),
928 "60a47fff bnvc a1, a0, 32767", 32767); 932 "60a47fff bnvc a1, a0, 32767", 32767);
929 COMPARE_PC_REL_COMPACT(bnvc(a1, a0, -32768), 933 COMPARE_PC_REL_COMPACT(bnvc(a1, a0, -32768),
930 "60a48000 bnvc a1, a0, -32768", -32768); 934 "60a48000 bnvc a1, a0, -32768", -32768);
931 935
932 COMPARE_PC_REL_COMPACT(beqzc(a0, 0), "d8800000 beqzc a0, 0x0", 0); 936 COMPARE_PC_REL_COMPACT(beqzc(a0, 0), "d8800000 beqzc a0, 0", 0);
933 COMPARE_PC_REL_COMPACT(beqzc(a0, 0xfffff), // 0x0fffff == 1048575. 937 COMPARE_PC_REL_COMPACT(beqzc(a0, 1048575), // 0x0fffff == 1048575.
934 "d88fffff beqzc a0, 0xfffff", 1048575); 938 "d88fffff beqzc a0, 1048575", 1048575);
935 COMPARE_PC_REL_COMPACT(beqzc(a0, 0x100000), // 0x100000 == -1048576. 939 COMPARE_PC_REL_COMPACT(beqzc(a0, -1048576), // 0x100000 == -1048576.
936 "d8900000 beqzc a0, 0x100000", -1048576); 940 "d8900000 beqzc a0, -1048576", -1048576);
937 941
938 COMPARE_PC_REL_COMPACT(bnezc(a0, 0), "f8800000 bnezc a0, 0x0", 0); 942 COMPARE_PC_REL_COMPACT(bnezc(a0, 0), "f8800000 bnezc a0, 0", 0);
939 COMPARE_PC_REL_COMPACT(bnezc(a0, 0xfffff), // 0x0fffff == 1048575. 943 COMPARE_PC_REL_COMPACT(bnezc(a0, 1048575), // int21 maximal value.
940 "f88fffff bnezc a0, 0xfffff", 1048575); 944 "f88fffff bnezc a0, 1048575", 1048575);
941 COMPARE_PC_REL_COMPACT(bnezc(a0, 0x100000), // 0x100000 == -1048576. 945 COMPARE_PC_REL_COMPACT(bnezc(a0, -1048576), // int21 minimal value.
942 "f8900000 bnezc a0, 0x100000", -1048576); 946 "f8900000 bnezc a0, -1048576", -1048576);
943 947
944 COMPARE_PC_REL_COMPACT(bc(-33554432), "ca000000 bc -33554432", 948 COMPARE_PC_REL_COMPACT(bc(-33554432), "ca000000 bc -33554432",
945 -33554432); 949 -33554432);
946 COMPARE_PC_REL_COMPACT(bc(-1), "cbffffff bc -1", -1); 950 COMPARE_PC_REL_COMPACT(bc(-1), "cbffffff bc -1", -1);
947 COMPARE_PC_REL_COMPACT(bc(0), "c8000000 bc 0", 0); 951 COMPARE_PC_REL_COMPACT(bc(0), "c8000000 bc 0", 0);
948 COMPARE_PC_REL_COMPACT(bc(1), "c8000001 bc 1", 1); 952 COMPARE_PC_REL_COMPACT(bc(1), "c8000001 bc 1", 1);
949 COMPARE_PC_REL_COMPACT(bc(33554431), "c9ffffff bc 33554431", 953 COMPARE_PC_REL_COMPACT(bc(33554431), "c9ffffff bc 33554431",
950 33554431); 954 33554431);
951 955
952 COMPARE_PC_REL_COMPACT(balc(-33554432), "ea000000 balc -33554432", 956 COMPARE_PC_REL_COMPACT(balc(-33554432), "ea000000 balc -33554432",
953 -33554432); 957 -33554432);
954 COMPARE_PC_REL_COMPACT(balc(-1), "ebffffff balc -1", -1); 958 COMPARE_PC_REL_COMPACT(balc(-1), "ebffffff balc -1", -1);
955 COMPARE_PC_REL_COMPACT(balc(0), "e8000000 balc 0", 0); 959 COMPARE_PC_REL_COMPACT(balc(0), "e8000000 balc 0", 0);
956 COMPARE_PC_REL_COMPACT(balc(1), "e8000001 balc 1", 1); 960 COMPARE_PC_REL_COMPACT(balc(1), "e8000001 balc 1", 1);
957 COMPARE_PC_REL_COMPACT(balc(33554431), "e9ffffff balc 33554431", 961 COMPARE_PC_REL_COMPACT(balc(33554431), "e9ffffff balc 33554431",
958 33554431); 962 33554431);
959 963
960 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -32768), 964 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -32768),
961 "18858000 bgeuc a0, a1, -32768", -32768); 965 "18858000 bgeuc a0, a1, -32768", -32768);
962 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -1), 966 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, -1),
963 "1885ffff bgeuc a0, a1, -1", -1); 967 "1885ffff bgeuc a0, a1, -1", -1);
964 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 1), 968 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 1), "18850001 bgeuc a0, a1, 1",
965 "18850001 bgeuc a0, a1, 1", 1); 969 1);
966 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 32767), 970 COMPARE_PC_REL_COMPACT(bgeuc(a0, a1, 32767),
967 "18857fff bgeuc a0, a1, 32767", 32767); 971 "18857fff bgeuc a0, a1, 32767", 32767);
968 972
969 COMPARE_PC_REL_COMPACT(bgezalc(a0, -32768), 973 COMPARE_PC_REL_COMPACT(bgezalc(a0, -32768),
970 "18848000 bgezalc a0, -32768", -32768); 974 "18848000 bgezalc a0, -32768", -32768);
971 COMPARE_PC_REL_COMPACT(bgezalc(a0, -1), "1884ffff bgezalc a0, -1", 975 COMPARE_PC_REL_COMPACT(bgezalc(a0, -1), "1884ffff bgezalc a0, -1",
972 -1); 976 -1);
973 COMPARE_PC_REL_COMPACT(bgezalc(a0, 1), "18840001 bgezalc a0, 1", 1); 977 COMPARE_PC_REL_COMPACT(bgezalc(a0, 1), "18840001 bgezalc a0, 1", 1);
974 COMPARE_PC_REL_COMPACT(bgezalc(a0, 32767), 978 COMPARE_PC_REL_COMPACT(bgezalc(a0, 32767),
975 "18847fff bgezalc a0, 32767", 32767); 979 "18847fff bgezalc a0, 32767", 32767);
976 980
977 COMPARE_PC_REL_COMPACT(blezalc(a0, -32768), 981 COMPARE_PC_REL_COMPACT(blezalc(a0, -32768),
978 "18048000 blezalc a0, -32768", -32768); 982 "18048000 blezalc a0, -32768", -32768);
979 COMPARE_PC_REL_COMPACT(blezalc(a0, -1), "1804ffff blezalc a0, -1", 983 COMPARE_PC_REL_COMPACT(blezalc(a0, -1), "1804ffff blezalc a0, -1",
980 -1); 984 -1);
981 COMPARE_PC_REL_COMPACT(blezalc(a0, 1), "18040001 blezalc a0, 1", 1); 985 COMPARE_PC_REL_COMPACT(blezalc(a0, 1), "18040001 blezalc a0, 1", 1);
982 COMPARE_PC_REL_COMPACT(blezalc(a0, 32767), 986 COMPARE_PC_REL_COMPACT(blezalc(a0, 32767),
983 "18047fff blezalc a0, 32767", 32767); 987 "18047fff blezalc a0, 32767", 32767);
984 988
985 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -32768), 989 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -32768),
986 "1c858000 bltuc a0, a1, -32768", -32768); 990 "1c858000 bltuc a0, a1, -32768", -32768);
987 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -1), 991 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, -1),
988 "1c85ffff bltuc a0, a1, -1", -1); 992 "1c85ffff bltuc a0, a1, -1", -1);
989 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 1), "1c850001 bltuc a0, a1, 1", 993 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 1), "1c850001 bltuc a0, a1, 1",
990 1); 994 1);
991 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 32767), 995 COMPARE_PC_REL_COMPACT(bltuc(a0, a1, 32767),
992 "1c857fff bltuc a0, a1, 32767", 32767); 996 "1c857fff bltuc a0, a1, 32767", 32767);
993 997
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 "58047fff blezc a0, 32767", 32767); 1035 "58047fff blezc a0, 32767", 32767);
1032 1036
1033 COMPARE_PC_REL_COMPACT(bltzc(a0, -32768), 1037 COMPARE_PC_REL_COMPACT(bltzc(a0, -32768),
1034 "5c848000 bltzc a0, -32768", -32768); 1038 "5c848000 bltzc a0, -32768", -32768);
1035 COMPARE_PC_REL_COMPACT(bltzc(a0, -1), "5c84ffff bltzc a0, -1", -1); 1039 COMPARE_PC_REL_COMPACT(bltzc(a0, -1), "5c84ffff bltzc a0, -1", -1);
1036 COMPARE_PC_REL_COMPACT(bltzc(a0, 1), "5c840001 bltzc a0, 1", 1); 1040 COMPARE_PC_REL_COMPACT(bltzc(a0, 1), "5c840001 bltzc a0, 1", 1);
1037 COMPARE_PC_REL_COMPACT(bltzc(a0, 32767), 1041 COMPARE_PC_REL_COMPACT(bltzc(a0, 32767),
1038 "5c847fff bltzc a0, 32767", 32767); 1042 "5c847fff bltzc a0, 32767", 32767);
1039 1043
1040 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -32768), 1044 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -32768),
1041 "5c858000 bltc a0, a1, -32768", -32768); 1045 "5c858000 bltc a0, a1, -32768", -32768);
1042 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -1), 1046 COMPARE_PC_REL_COMPACT(bltc(a0, a1, -1),
1043 "5c85ffff bltc a0, a1, -1", -1); 1047 "5c85ffff bltc a0, a1, -1", -1);
1044 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 1), "5c850001 bltc a0, a1, 1", 1048 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 1), "5c850001 bltc a0, a1, 1",
1045 1); 1049 1);
1046 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 32767), 1050 COMPARE_PC_REL_COMPACT(bltc(a0, a1, 32767),
1047 "5c857fff bltc a0, a1, 32767", 32767); 1051 "5c857fff bltc a0, a1, 32767", 32767);
1048 1052
1049 COMPARE_PC_REL_COMPACT(bgtzc(a0, -32768), 1053 COMPARE_PC_REL_COMPACT(bgtzc(a0, -32768),
1050 "5c048000 bgtzc a0, -32768", -32768); 1054 "5c048000 bgtzc a0, -32768", -32768);
1051 COMPARE_PC_REL_COMPACT(bgtzc(a0, -1), "5c04ffff bgtzc a0, -1", -1); 1055 COMPARE_PC_REL_COMPACT(bgtzc(a0, -1), "5c04ffff bgtzc a0, -1", -1);
1052 COMPARE_PC_REL_COMPACT(bgtzc(a0, 1), "5c040001 bgtzc a0, 1", 1); 1056 COMPARE_PC_REL_COMPACT(bgtzc(a0, 1), "5c040001 bgtzc a0, 1", 1);
1053 COMPARE_PC_REL_COMPACT(bgtzc(a0, 32767), 1057 COMPARE_PC_REL_COMPACT(bgtzc(a0, 32767),
1054 "5c047fff bgtzc a0, 32767", 32767); 1058 "5c047fff bgtzc a0, 32767", 32767);
1055 1059
1056 COMPARE_PC_REL_COMPACT(bc1eqz(-32768, f1), 1060 COMPARE_PC_REL_COMPACT(bc1eqz(-32768, f1),
1057 "45218000 bc1eqz f1, -32768", -32768); 1061 "45218000 bc1eqz f1, -32768", -32768);
(...skipping 10 matching lines...) Expand all
1068 COMPARE_PC_REL_COMPACT(bc1nez(1, f1), "45a10001 bc1nez f1, 1", 1); 1072 COMPARE_PC_REL_COMPACT(bc1nez(1, f1), "45a10001 bc1nez f1, 1", 1);
1069 COMPARE_PC_REL_COMPACT(bc1nez(32767, f1), 1073 COMPARE_PC_REL_COMPACT(bc1nez(32767, f1),
1070 "45a17fff bc1nez f1, 32767", 32767); 1074 "45a17fff bc1nez f1, 32767", 32767);
1071 1075
1072 COMPARE_PC_REL_COMPACT(bovc(a1, a0, -1), "20a4ffff bovc a1, a0, -1", 1076 COMPARE_PC_REL_COMPACT(bovc(a1, a0, -1), "20a4ffff bovc a1, a0, -1",
1073 -1); 1077 -1);
1074 COMPARE_PC_REL_COMPACT(bovc(a0, a0, 1), "20840001 bovc a0, a0, 1", 1078 COMPARE_PC_REL_COMPACT(bovc(a0, a0, 1), "20840001 bovc a0, a0, 1",
1075 1); 1079 1);
1076 1080
1077 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -32768), 1081 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -32768),
1078 "20858000 beqc a0, a1, -32768", -32768); 1082 "20858000 beqc a0, a1, -32768", -32768);
1079 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -1), "2085ffff beqc a0, a1, -1", 1083 COMPARE_PC_REL_COMPACT(beqc(a0, a1, -1),
1080 -1); 1084 "2085ffff beqc a0, a1, -1", -1);
1081 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 1), "20850001 beqc a0, a1, 1", 1085 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 1), "20850001 beqc a0, a1, 1",
1082 1); 1086 1);
1083 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 32767), 1087 COMPARE_PC_REL_COMPACT(beqc(a0, a1, 32767),
1084 "20857fff beqc a0, a1, 32767", 32767); 1088 "20857fff beqc a0, a1, 32767", 32767);
1085 1089
1086 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -32768), 1090 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -32768),
1087 "60858000 bnec a0, a1, -32768", -32768); 1091 "60858000 bnec a0, a1, -32768", -32768);
1088 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -1), "6085ffff bnec a0, a1, -1", 1092 COMPARE_PC_REL_COMPACT(bnec(a0, a1, -1), "6085ffff bnec a0, a1, -1",
1089 -1); 1093 -1);
1090 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 1), "60850001 bnec a0, a1, 1", 1094 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 1), "60850001 bnec a0, a1, 1",
1091 1); 1095 1);
1092 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 32767), 1096 COMPARE_PC_REL_COMPACT(bnec(a0, a1, 32767),
1093 "60857fff bnec a0, a1, 32767", 32767); 1097 "60857fff bnec a0, a1, 32767", 32767);
1094 } 1098 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 1260
1257 1261
1258 TEST(ctc1_cfc1_disasm) { 1262 TEST(ctc1_cfc1_disasm) {
1259 SET_UP(); 1263 SET_UP();
1260 COMPARE(abs_d(f10, f31), "4620fa85 abs.d f10, f31"); 1264 COMPARE(abs_d(f10, f31), "4620fa85 abs.d f10, f31");
1261 COMPARE(ceil_w_s(f8, f31), "4600fa0e ceil.w.s f8, f31"); 1265 COMPARE(ceil_w_s(f8, f31), "4600fa0e ceil.w.s f8, f31");
1262 COMPARE(ctc1(a0, FCSR), "44c4f800 ctc1 a0, FCSR"); 1266 COMPARE(ctc1(a0, FCSR), "44c4f800 ctc1 a0, FCSR");
1263 COMPARE(cfc1(a0, FCSR), "4444f800 cfc1 a0, FCSR"); 1267 COMPARE(cfc1(a0, FCSR), "4444f800 cfc1 a0, FCSR");
1264 VERIFY_RUN(); 1268 VERIFY_RUN();
1265 } 1269 }
OLDNEW
« no previous file with comments | « src/mips64/simulator-mips64.cc ('k') | test/cctest/test-macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698