OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 if (instr->Bits(7, 4) == 0x1) { | 1272 if (instr->Bits(7, 4) == 0x1) { |
1273 if (instr->Bits(15, 12) == 0xF) { | 1273 if (instr->Bits(15, 12) == 0xF) { |
1274 Format(instr, "smmul'cond 'rn, 'rm, 'rs"); | 1274 Format(instr, "smmul'cond 'rn, 'rm, 'rs"); |
1275 } else { | 1275 } else { |
1276 // SMMLA (in V8 notation matching ARM ISA format) | 1276 // SMMLA (in V8 notation matching ARM ISA format) |
1277 Format(instr, "smmla'cond 'rn, 'rm, 'rs, 'rd"); | 1277 Format(instr, "smmla'cond 'rn, 'rm, 'rs, 'rd"); |
1278 } | 1278 } |
1279 break; | 1279 break; |
1280 } | 1280 } |
1281 } | 1281 } |
1282 if (FLAG_enable_sudiv) { | 1282 if (instr->Bits(5, 4) == 0x1) { |
1283 if (instr->Bits(5, 4) == 0x1) { | 1283 if ((instr->Bit(22) == 0x0) && (instr->Bit(20) == 0x1)) { |
1284 if ((instr->Bit(22) == 0x0) && (instr->Bit(20) == 0x1)) { | 1284 if (instr->Bit(21) == 0x1) { |
1285 if (instr->Bit(21) == 0x1) { | 1285 // UDIV (in V8 notation matching ARM ISA format) rn = rm/rs |
1286 // UDIV (in V8 notation matching ARM ISA format) rn = rm/rs | 1286 Format(instr, "udiv'cond'b 'rn, 'rm, 'rs"); |
1287 Format(instr, "udiv'cond'b 'rn, 'rm, 'rs"); | 1287 } else { |
1288 } else { | 1288 // SDIV (in V8 notation matching ARM ISA format) rn = rm/rs |
1289 // SDIV (in V8 notation matching ARM ISA format) rn = rm/rs | 1289 Format(instr, "sdiv'cond'b 'rn, 'rm, 'rs"); |
1290 Format(instr, "sdiv'cond'b 'rn, 'rm, 'rs"); | |
1291 } | |
1292 break; | |
1293 } | 1290 } |
| 1291 break; |
1294 } | 1292 } |
1295 } | 1293 } |
1296 Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w"); | 1294 Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w"); |
1297 break; | 1295 break; |
1298 } | 1296 } |
1299 case ib_x: { | 1297 case ib_x: { |
1300 if (instr->HasW() && (instr->Bits(6, 4) == 0x5)) { | 1298 if (instr->HasW() && (instr->Bits(6, 4) == 0x5)) { |
1301 uint32_t widthminus1 = static_cast<uint32_t>(instr->Bits(20, 16)); | 1299 uint32_t widthminus1 = static_cast<uint32_t>(instr->Bits(20, 16)); |
1302 uint32_t lsbit = static_cast<uint32_t>(instr->Bits(11, 7)); | 1300 uint32_t lsbit = static_cast<uint32_t>(instr->Bits(11, 7)); |
1303 uint32_t msbit = widthminus1 + lsbit; | 1301 uint32_t msbit = widthminus1 + lsbit; |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2108 pc += d.InstructionDecode(buffer, pc); | 2106 pc += d.InstructionDecode(buffer, pc); |
2109 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), | 2107 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), |
2110 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 2108 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
2111 } | 2109 } |
2112 } | 2110 } |
2113 | 2111 |
2114 | 2112 |
2115 } // namespace disasm | 2113 } // namespace disasm |
2116 | 2114 |
2117 #endif // V8_TARGET_ARCH_ARM | 2115 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |