| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // A Disassembler object is used to disassemble a block of code instruction by | 5 // A Disassembler object is used to disassemble a block of code instruction by |
| 6 // instruction. The default implementation of the NameConverter object can be | 6 // instruction. The default implementation of the NameConverter object can be |
| 7 // overriden to modify register names or to do symbol lookup on addresses. | 7 // overriden to modify register names or to do symbol lookup on addresses. |
| 8 // | 8 // |
| 9 // The example below will disassemble a block of code and print it to stdout. | 9 // The example below will disassemble a block of code and print it to stdout. |
| 10 // | 10 // |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 return true; | 952 return true; |
| 953 } | 953 } |
| 954 | 954 |
| 955 | 955 |
| 956 void Decoder::DecodeTypeRegisterSRsType(Instruction* instr) { | 956 void Decoder::DecodeTypeRegisterSRsType(Instruction* instr) { |
| 957 if (!DecodeTypeRegisterRsType(instr)) { | 957 if (!DecodeTypeRegisterRsType(instr)) { |
| 958 switch (instr->FunctionFieldRaw()) { | 958 switch (instr->FunctionFieldRaw()) { |
| 959 case CVT_D_S: | 959 case CVT_D_S: |
| 960 Format(instr, "cvt.d.'t 'fd, 'fs"); | 960 Format(instr, "cvt.d.'t 'fd, 'fs"); |
| 961 break; | 961 break; |
| 962 case MADDF_S: |
| 963 Format(instr, "maddf.s 'fd, 'fs, 'ft"); |
| 964 break; |
| 965 case MSUBF_S: |
| 966 Format(instr, "msubf.s 'fd, 'fs, 'ft"); |
| 967 break; |
| 962 default: | 968 default: |
| 963 Format(instr, "unknown.cop1.'t"); | 969 Format(instr, "unknown.cop1.'t"); |
| 964 break; | 970 break; |
| 965 } | 971 } |
| 966 } | 972 } |
| 967 } | 973 } |
| 968 | 974 |
| 969 | 975 |
| 970 void Decoder::DecodeTypeRegisterDRsType(Instruction* instr) { | 976 void Decoder::DecodeTypeRegisterDRsType(Instruction* instr) { |
| 971 if (!DecodeTypeRegisterRsType(instr)) { | 977 if (!DecodeTypeRegisterRsType(instr)) { |
| 972 Format(instr, "unknown.cop1.'t"); | 978 switch (instr->FunctionFieldRaw()) { |
| 979 case MADDF_D: |
| 980 Format(instr, "maddf.d 'fd, 'fs, 'ft"); |
| 981 break; |
| 982 case MSUBF_D: |
| 983 Format(instr, "msubf.d 'fd, 'fs, 'ft"); |
| 984 break; |
| 985 default: |
| 986 Format(instr, "unknown.cop1.'t"); |
| 987 break; |
| 988 } |
| 973 } | 989 } |
| 974 } | 990 } |
| 975 | 991 |
| 976 | 992 |
| 977 void Decoder::DecodeTypeRegisterLRsType(Instruction* instr) { | 993 void Decoder::DecodeTypeRegisterLRsType(Instruction* instr) { |
| 978 switch (instr->FunctionFieldRaw()) { | 994 switch (instr->FunctionFieldRaw()) { |
| 979 case CVT_D_L: | 995 case CVT_D_L: |
| 980 Format(instr, "cvt.d.l 'fd, 'fs"); | 996 Format(instr, "cvt.d.l 'fd, 'fs"); |
| 981 break; | 997 break; |
| 982 case CVT_S_L: | 998 case CVT_S_L: |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 DecodeTypeRegisterLRsType(instr); | 1124 DecodeTypeRegisterLRsType(instr); |
| 1109 break; | 1125 break; |
| 1110 default: | 1126 default: |
| 1111 UNREACHABLE(); | 1127 UNREACHABLE(); |
| 1112 } | 1128 } |
| 1113 } | 1129 } |
| 1114 | 1130 |
| 1115 | 1131 |
| 1116 void Decoder::DecodeTypeRegisterCOP1X(Instruction* instr) { | 1132 void Decoder::DecodeTypeRegisterCOP1X(Instruction* instr) { |
| 1117 switch (instr->FunctionFieldRaw()) { | 1133 switch (instr->FunctionFieldRaw()) { |
| 1134 case MADD_S: |
| 1135 Format(instr, "madd.s 'fd, 'fr, 'fs, 'ft"); |
| 1136 break; |
| 1118 case MADD_D: | 1137 case MADD_D: |
| 1119 Format(instr, "madd.d 'fd, 'fr, 'fs, 'ft"); | 1138 Format(instr, "madd.d 'fd, 'fr, 'fs, 'ft"); |
| 1120 break; | 1139 break; |
| 1140 case MSUB_S: |
| 1141 Format(instr, "msub.s 'fd, 'fr, 'fs, 'ft"); |
| 1142 break; |
| 1143 case MSUB_D: |
| 1144 Format(instr, "msub.d 'fd, 'fr, 'fs, 'ft"); |
| 1145 break; |
| 1121 default: | 1146 default: |
| 1122 UNREACHABLE(); | 1147 UNREACHABLE(); |
| 1123 } | 1148 } |
| 1124 } | 1149 } |
| 1125 | 1150 |
| 1126 | 1151 |
| 1127 void Decoder::DecodeTypeRegisterSPECIAL(Instruction* instr) { | 1152 void Decoder::DecodeTypeRegisterSPECIAL(Instruction* instr) { |
| 1128 switch (instr->FunctionFieldRaw()) { | 1153 switch (instr->FunctionFieldRaw()) { |
| 1129 case JR: | 1154 case JR: |
| 1130 Format(instr, "jr 'rs"); | 1155 Format(instr, "jr 'rs"); |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2014 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 2039 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
| 2015 } | 2040 } |
| 2016 } | 2041 } |
| 2017 | 2042 |
| 2018 | 2043 |
| 2019 #undef UNSUPPORTED | 2044 #undef UNSUPPORTED |
| 2020 | 2045 |
| 2021 } // namespace disasm | 2046 } // namespace disasm |
| 2022 | 2047 |
| 2023 #endif // V8_TARGET_ARCH_MIPS64 | 2048 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |