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 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1774 instr->Bits(11, 9) == 0x5 && instr->Bits(7, 6) == 0x1 && | 1774 instr->Bits(11, 9) == 0x5 && instr->Bits(7, 6) == 0x1 && |
1775 instr->Bit(4) == 0x0) { | 1775 instr->Bit(4) == 0x0) { |
1776 // VRINTA, VRINTN, VRINTP, VRINTM (floating-point) | 1776 // VRINTA, VRINTN, VRINTP, VRINTM (floating-point) |
1777 bool dp_operation = (instr->SzValue() == 1); | 1777 bool dp_operation = (instr->SzValue() == 1); |
1778 int rounding_mode = instr->Bits(17, 16); | 1778 int rounding_mode = instr->Bits(17, 16); |
1779 switch (rounding_mode) { | 1779 switch (rounding_mode) { |
1780 case 0x0: | 1780 case 0x0: |
1781 if (dp_operation) { | 1781 if (dp_operation) { |
1782 Format(instr, "vrinta.f64.f64 'Dd, 'Dm"); | 1782 Format(instr, "vrinta.f64.f64 'Dd, 'Dm"); |
1783 } else { | 1783 } else { |
1784 Unknown(instr); | 1784 Format(instr, "vrinta.f32.f32 'Sd, 'Sm"); |
1785 } | 1785 } |
1786 break; | 1786 break; |
1787 case 0x1: | 1787 case 0x1: |
1788 if (dp_operation) { | 1788 if (dp_operation) { |
1789 Format(instr, "vrintn.f64.f64 'Dd, 'Dm"); | 1789 Format(instr, "vrintn.f64.f64 'Dd, 'Dm"); |
1790 } else { | 1790 } else { |
1791 Unknown(instr); | 1791 Format(instr, "vrintn.f32.f32 'Sd, 'Sm"); |
1792 } | 1792 } |
1793 break; | 1793 break; |
1794 case 0x2: | 1794 case 0x2: |
1795 if (dp_operation) { | 1795 if (dp_operation) { |
1796 Format(instr, "vrintp.f64.f64 'Dd, 'Dm"); | 1796 Format(instr, "vrintp.f64.f64 'Dd, 'Dm"); |
1797 } else { | 1797 } else { |
1798 Unknown(instr); | 1798 Format(instr, "vrintp.f32.f32 'Sd, 'Sm"); |
1799 } | 1799 } |
1800 break; | 1800 break; |
1801 case 0x3: | 1801 case 0x3: |
1802 if (dp_operation) { | 1802 if (dp_operation) { |
1803 Format(instr, "vrintm.f64.f64 'Dd, 'Dm"); | 1803 Format(instr, "vrintm.f64.f64 'Dd, 'Dm"); |
1804 } else { | 1804 } else { |
1805 Unknown(instr); | 1805 Format(instr, "vrintm.f32.f32 'Sd, 'Sm"); |
1806 } | 1806 } |
1807 break; | 1807 break; |
1808 default: | 1808 default: |
1809 UNREACHABLE(); // Case analysis is exhaustive. | 1809 UNREACHABLE(); // Case analysis is exhaustive. |
1810 break; | 1810 break; |
1811 } | 1811 } |
1812 } else { | 1812 } else { |
1813 Unknown(instr); | 1813 Unknown(instr); |
1814 } | 1814 } |
1815 break; | 1815 break; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1978 v8::internal::PrintF( | 1978 v8::internal::PrintF( |
1979 f, "%p %08x %s\n", | 1979 f, "%p %08x %s\n", |
1980 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1980 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1981 } | 1981 } |
1982 } | 1982 } |
1983 | 1983 |
1984 | 1984 |
1985 } // namespace disasm | 1985 } // namespace disasm |
1986 | 1986 |
1987 #endif // V8_TARGET_ARCH_ARM | 1987 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |