| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_IA32. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 8 #if defined(TARGET_ARCH_IA32) | 8 #if defined(TARGET_ARCH_IA32) |
| 9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 case 0xA2: return "cpuid"; | 233 case 0xA2: return "cpuid"; |
| 234 case 0x31: return "rdtsc"; | 234 case 0x31: return "rdtsc"; |
| 235 case 0xBE: return "movsx_b"; | 235 case 0xBE: return "movsx_b"; |
| 236 case 0xBF: return "movsx_w"; | 236 case 0xBF: return "movsx_w"; |
| 237 case 0xB6: return "movzx_b"; | 237 case 0xB6: return "movzx_b"; |
| 238 case 0xB7: return "movzx_w"; | 238 case 0xB7: return "movzx_w"; |
| 239 case 0xAF: return "imul"; | 239 case 0xAF: return "imul"; |
| 240 case 0xA5: return "shld"; | 240 case 0xA5: return "shld"; |
| 241 case 0xAD: return "shrd"; | 241 case 0xAD: return "shrd"; |
| 242 case 0xAB: return "bts"; | 242 case 0xAB: return "bts"; |
| 243 case 0xBD: return "bsr"; |
| 243 case 0xB1: return "cmpxchg"; | 244 case 0xB1: return "cmpxchg"; |
| 244 case 0x50: return "movmskps"; | 245 case 0x50: return "movmskps"; |
| 245 case 0x51: return "sqrtps"; | 246 case 0x51: return "sqrtps"; |
| 246 case 0x52: return "rqstps"; | 247 case 0x52: return "rqstps"; |
| 247 case 0x53: return "rcpps"; | 248 case 0x53: return "rcpps"; |
| 248 case 0x54: return "andps"; | 249 case 0x54: return "andps"; |
| 249 case 0x56: return "orps"; | 250 case 0x56: return "orps"; |
| 250 case 0x57: return "xorps"; | 251 case 0x57: return "xorps"; |
| 251 case 0x58: return "addps"; | 252 case 0x58: return "addps"; |
| 252 case 0x59: return "mulps"; | 253 case 0x59: return "mulps"; |
| (...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 | 1295 |
| 1295 case 0x0F: | 1296 case 0x0F: |
| 1296 { uint8_t f0byte = *(data+1); | 1297 { uint8_t f0byte = *(data+1); |
| 1297 const char* f0mnem = F0Mnem(f0byte); | 1298 const char* f0mnem = F0Mnem(f0byte); |
| 1298 if (f0byte == 0xA2 || f0byte == 0x31) { | 1299 if (f0byte == 0xA2 || f0byte == 0x31) { |
| 1299 Print(f0mnem); | 1300 Print(f0mnem); |
| 1300 data += 2; | 1301 data += 2; |
| 1301 } else if ((f0byte & 0xF0) == 0x80) { | 1302 } else if ((f0byte & 0xF0) == 0x80) { |
| 1302 data += JumpConditional(data, branch_hint); | 1303 data += JumpConditional(data, branch_hint); |
| 1303 } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 || | 1304 } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 || |
| 1304 f0byte == 0xB7 || f0byte == 0xAF) { | 1305 f0byte == 0xB7 || f0byte == 0xAF || f0byte == 0xBD) { |
| 1305 data += 2; | 1306 data += 2; |
| 1306 data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data); | 1307 data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data); |
| 1307 } else if (f0byte == 0x57) { | 1308 } else if (f0byte == 0x57) { |
| 1308 data += 2; | 1309 data += 2; |
| 1309 int mod, regop, rm; | 1310 int mod, regop, rm; |
| 1310 GetModRm(*data, &mod, ®op, &rm); | 1311 GetModRm(*data, &mod, ®op, &rm); |
| 1311 Print(f0mnem); | 1312 Print(f0mnem); |
| 1312 Print(" "); | 1313 Print(" "); |
| 1313 PrintXmmRegister(regop); | 1314 PrintXmmRegister(regop); |
| 1314 Print(","); | 1315 Print(","); |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1821 pc); | 1822 pc); |
| 1822 pc += instruction_length; | 1823 pc += instruction_length; |
| 1823 } | 1824 } |
| 1824 | 1825 |
| 1825 return; | 1826 return; |
| 1826 } | 1827 } |
| 1827 | 1828 |
| 1828 } // namespace dart | 1829 } // namespace dart |
| 1829 | 1830 |
| 1830 #endif // defined TARGET_ARCH_IA32 | 1831 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |