| 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 #include <assert.h> | 5 #include <assert.h> |
| 6 #include <stdarg.h> | 6 #include <stdarg.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 id->mnem = NULL; // Computed depending on condition code. | 245 id->mnem = NULL; // Computed depending on condition code. |
| 246 id->type = JUMP_CONDITIONAL_SHORT_INSTR; | 246 id->type = JUMP_CONDITIONAL_SHORT_INSTR; |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 | 249 |
| 250 | 250 |
| 251 static v8::base::LazyInstance<InstructionTable>::type instruction_table = | 251 static v8::base::LazyInstance<InstructionTable>::type instruction_table = |
| 252 LAZY_INSTANCE_INITIALIZER; | 252 LAZY_INSTANCE_INITIALIZER; |
| 253 | 253 |
| 254 | 254 |
| 255 static InstructionDesc cmov_instructions[16] = { | 255 static const InstructionDesc cmov_instructions[16] = { |
| 256 {"cmovo", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 256 {"cmovo", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 257 {"cmovno", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 257 {"cmovno", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 258 {"cmovc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 258 {"cmovc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 259 {"cmovnc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 259 {"cmovnc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 260 {"cmovz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 260 {"cmovz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 261 {"cmovnz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 261 {"cmovnz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 262 {"cmovna", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 262 {"cmovna", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 263 {"cmova", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 263 {"cmova", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 264 {"cmovs", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 264 {"cmovs", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| 265 {"cmovns", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 265 {"cmovns", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 | 1801 |
| 1802 outp += v8::internal::SNPrintF(out_buffer + outp, " %s", | 1802 outp += v8::internal::SNPrintF(out_buffer + outp, " %s", |
| 1803 tmp_buffer_.start()); | 1803 tmp_buffer_.start()); |
| 1804 return instr_len; | 1804 return instr_len; |
| 1805 } | 1805 } |
| 1806 | 1806 |
| 1807 | 1807 |
| 1808 //------------------------------------------------------------------------------ | 1808 //------------------------------------------------------------------------------ |
| 1809 | 1809 |
| 1810 | 1810 |
| 1811 static const char* cpu_regs[16] = { | 1811 static const char* const cpu_regs[16] = { |
| 1812 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", | 1812 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", |
| 1813 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" | 1813 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" |
| 1814 }; | 1814 }; |
| 1815 | 1815 |
| 1816 | 1816 |
| 1817 static const char* byte_cpu_regs[16] = { | 1817 static const char* const byte_cpu_regs[16] = { |
| 1818 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", | 1818 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", |
| 1819 "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l" | 1819 "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l" |
| 1820 }; | 1820 }; |
| 1821 | 1821 |
| 1822 | 1822 |
| 1823 static const char* xmm_regs[16] = { | 1823 static const char* const xmm_regs[16] = { |
| 1824 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", | 1824 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", |
| 1825 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" | 1825 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" |
| 1826 }; | 1826 }; |
| 1827 | 1827 |
| 1828 | 1828 |
| 1829 const char* NameConverter::NameOfAddress(byte* addr) const { | 1829 const char* NameConverter::NameOfAddress(byte* addr) const { |
| 1830 v8::internal::SNPrintF(tmp_buffer_, "%p", addr); | 1830 v8::internal::SNPrintF(tmp_buffer_, "%p", addr); |
| 1831 return tmp_buffer_.start(); | 1831 return tmp_buffer_.start(); |
| 1832 } | 1832 } |
| 1833 | 1833 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1903 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { | 1903 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { |
| 1904 fprintf(f, " "); | 1904 fprintf(f, " "); |
| 1905 } | 1905 } |
| 1906 fprintf(f, " %s\n", buffer.start()); | 1906 fprintf(f, " %s\n", buffer.start()); |
| 1907 } | 1907 } |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 } // namespace disasm | 1910 } // namespace disasm |
| 1911 | 1911 |
| 1912 #endif // V8_TARGET_ARCH_X64 | 1912 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |