| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/disassembler.h" | 5 #include "vm/disassembler.h" |
| 6 | 6 |
| 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 8 #if defined(TARGET_ARCH_ARM64) | 8 #if defined(TARGET_ARCH_ARM64) |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 | 10 |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 } else if ((U == 0) && (opcode == 0x1a)) { | 1081 } else if ((U == 0) && (opcode == 0x1a)) { |
| 1082 if (instr->Bit(23) == 0) { | 1082 if (instr->Bit(23) == 0) { |
| 1083 Format(instr, "vadd'vsz 'vd, 'vn, 'vm"); | 1083 Format(instr, "vadd'vsz 'vd, 'vn, 'vm"); |
| 1084 } else { | 1084 } else { |
| 1085 Format(instr, "vsub'vsz 'vd, 'vn, 'vm"); | 1085 Format(instr, "vsub'vsz 'vd, 'vn, 'vm"); |
| 1086 } | 1086 } |
| 1087 } else if ((U == 1) && (opcode == 0x1b)) { | 1087 } else if ((U == 1) && (opcode == 0x1b)) { |
| 1088 Format(instr, "vmul'vsz 'vd, 'vn, 'vm"); | 1088 Format(instr, "vmul'vsz 'vd, 'vn, 'vm"); |
| 1089 } else if ((U == 1) && (opcode == 0x1f)) { | 1089 } else if ((U == 1) && (opcode == 0x1f)) { |
| 1090 Format(instr, "vdiv'vsz 'vd, 'vn, 'vm"); | 1090 Format(instr, "vdiv'vsz 'vd, 'vn, 'vm"); |
| 1091 } else if ((U == 0) && (opcode == 0x1c)) { |
| 1092 Format(instr, "vceq'vsz 'vd, 'vn, 'vm"); |
| 1093 } else if ((U == 1) && (opcode == 0x1c)) { |
| 1094 if (instr->Bit(23) == 1) { |
| 1095 Format(instr, "vcgt'vsz 'vd, 'vn, 'vm"); |
| 1096 } else { |
| 1097 Format(instr, "vcge'vsz 'vd, 'vn, 'vm"); |
| 1098 } |
| 1099 } else if ((U == 0) && (opcode == 0x1e)) { |
| 1100 if (instr->Bit(23) == 1) { |
| 1101 Format(instr, "vmin'vsz 'vd, 'vn, 'vm"); |
| 1102 } else { |
| 1103 Format(instr, "vmax'vsz 'vd, 'vn, 'vm"); |
| 1104 } |
| 1105 } else if ((U == 0) && (opcode == 0x1f)) { |
| 1106 if (instr->Bit(23) == 1) { |
| 1107 Format(instr, "vrsqrt'vsz 'vd, 'vn, 'vm"); |
| 1108 } else { |
| 1109 Format(instr, "vrecps'vsz 'vd, 'vn, 'vm"); |
| 1110 } |
| 1091 } else { | 1111 } else { |
| 1092 Unknown(instr); | 1112 Unknown(instr); |
| 1093 } | 1113 } |
| 1094 } | 1114 } |
| 1095 | 1115 |
| 1096 | 1116 |
| 1097 void ARM64Decoder::DecodeSIMDTwoReg(Instr* instr) { | 1117 void ARM64Decoder::DecodeSIMDTwoReg(Instr* instr) { |
| 1098 const int32_t Q = instr->Bit(30); | 1118 const int32_t Q = instr->Bit(30); |
| 1099 const int32_t U = instr->Bit(29); | 1119 const int32_t U = instr->Bit(29); |
| 1100 const int32_t op = instr->Bits(12, 5); | 1120 const int32_t op = instr->Bits(12, 5); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1116 Unknown(instr); | 1136 Unknown(instr); |
| 1117 } | 1137 } |
| 1118 } else if ((U == 1) && (op == 0xf)) { | 1138 } else if ((U == 1) && (op == 0xf)) { |
| 1119 if (sz == 2) { | 1139 if (sz == 2) { |
| 1120 Format(instr, "vnegs 'vd, 'vn"); | 1140 Format(instr, "vnegs 'vd, 'vn"); |
| 1121 } else if (sz == 3) { | 1141 } else if (sz == 3) { |
| 1122 Format(instr, "vnegd 'vd, 'vn"); | 1142 Format(instr, "vnegd 'vd, 'vn"); |
| 1123 } else { | 1143 } else { |
| 1124 Unknown(instr); | 1144 Unknown(instr); |
| 1125 } | 1145 } |
| 1146 } else if ((U == 1) && (op == 0x1f)) { |
| 1147 if (sz == 2) { |
| 1148 Format(instr, "vsqrts 'vd, 'vn"); |
| 1149 } else if (sz == 3) { |
| 1150 Format(instr, "vsqrtd 'vd, 'vn"); |
| 1151 } else { |
| 1152 Unknown(instr); |
| 1153 } |
| 1154 } else if ((U == 0) && (op == 0x1d)) { |
| 1155 if (sz != 2) { |
| 1156 Unknown(instr); |
| 1157 return; |
| 1158 } |
| 1159 Format(instr, "vrecpes 'vd, 'vn"); |
| 1160 } else if ((U == 1) && (op == 0x1d)) { |
| 1161 if (sz != 2) { |
| 1162 Unknown(instr); |
| 1163 return; |
| 1164 } |
| 1165 Format(instr, "vrsqrtes 'vd, 'vn"); |
| 1126 } else { | 1166 } else { |
| 1127 Unknown(instr); | 1167 Unknown(instr); |
| 1128 } | 1168 } |
| 1129 } | 1169 } |
| 1130 | 1170 |
| 1131 | 1171 |
| 1132 void ARM64Decoder::DecodeDPSimd1(Instr* instr) { | 1172 void ARM64Decoder::DecodeDPSimd1(Instr* instr) { |
| 1133 if (instr->IsSIMDCopyOp()) { | 1173 if (instr->IsSIMDCopyOp()) { |
| 1134 DecodeSIMDCopy(instr); | 1174 DecodeSIMDCopy(instr); |
| 1135 } else if (instr->IsSIMDThreeSameOp()) { | 1175 } else if (instr->IsSIMDThreeSameOp()) { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 human_buffer, | 1384 human_buffer, |
| 1345 sizeof(human_buffer), | 1385 sizeof(human_buffer), |
| 1346 pc); | 1386 pc); |
| 1347 pc += instruction_length; | 1387 pc += instruction_length; |
| 1348 } | 1388 } |
| 1349 } | 1389 } |
| 1350 | 1390 |
| 1351 } // namespace dart | 1391 } // namespace dart |
| 1352 | 1392 |
| 1353 #endif // defined TARGET_ARCH_ARM | 1393 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |