OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 InstructionDesc* id = &instructions_[b]; | 262 InstructionDesc* id = &instructions_[b]; |
263 ASSERT_EQ(NO_INSTR, id->type); // Information not already entered | 263 ASSERT_EQ(NO_INSTR, id->type); // Information not already entered |
264 id->mnem = NULL; // Computed depending on condition code. | 264 id->mnem = NULL; // Computed depending on condition code. |
265 id->type = JUMP_CONDITIONAL_SHORT_INSTR; | 265 id->type = JUMP_CONDITIONAL_SHORT_INSTR; |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 | 269 |
270 static InstructionTable instruction_table; | 270 static InstructionTable instruction_table; |
271 | 271 |
| 272 |
272 static InstructionDesc cmov_instructions[16] = { | 273 static InstructionDesc cmov_instructions[16] = { |
273 {"cmovo", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 274 {"cmovo", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
274 {"cmovno", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 275 {"cmovno", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
275 {"cmovc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 276 {"cmovc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
276 {"cmovnc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 277 {"cmovnc", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
277 {"cmovz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 278 {"cmovz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
278 {"cmovnz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 279 {"cmovnz", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
279 {"cmovna", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 280 {"cmovna", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
280 {"cmova", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 281 {"cmova", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
281 {"cmovs", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, | 282 {"cmovs", TWO_OPERANDS_INSTR, REG_OPER_OP_ORDER, false}, |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 }; | 1661 }; |
1661 | 1662 |
1662 | 1663 |
1663 static const char* xmm_regs[16] = { | 1664 static const char* xmm_regs[16] = { |
1664 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", | 1665 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", |
1665 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" | 1666 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" |
1666 }; | 1667 }; |
1667 | 1668 |
1668 | 1669 |
1669 const char* NameConverter::NameOfAddress(byte* addr) const { | 1670 const char* NameConverter::NameOfAddress(byte* addr) const { |
1670 static v8::internal::EmbeddedVector<char, 32> tmp_buffer; | 1671 v8::internal::OS::SNPrintF(tmp_buffer_, "%p", addr); |
1671 v8::internal::OS::SNPrintF(tmp_buffer, "%p", addr); | 1672 return tmp_buffer_.start(); |
1672 return tmp_buffer.start(); | |
1673 } | 1673 } |
1674 | 1674 |
1675 | 1675 |
1676 const char* NameConverter::NameOfConstant(byte* addr) const { | 1676 const char* NameConverter::NameOfConstant(byte* addr) const { |
1677 return NameOfAddress(addr); | 1677 return NameOfAddress(addr); |
1678 } | 1678 } |
1679 | 1679 |
1680 | 1680 |
1681 const char* NameConverter::NameOfCPURegister(int reg) const { | 1681 const char* NameConverter::NameOfCPURegister(int reg) const { |
1682 if (0 <= reg && reg < 16) | 1682 if (0 <= reg && reg < 16) |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { | 1743 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { |
1744 fprintf(f, " "); | 1744 fprintf(f, " "); |
1745 } | 1745 } |
1746 fprintf(f, " %s\n", buffer.start()); | 1746 fprintf(f, " %s\n", buffer.start()); |
1747 } | 1747 } |
1748 } | 1748 } |
1749 | 1749 |
1750 } // namespace disasm | 1750 } // namespace disasm |
1751 | 1751 |
1752 #endif // V8_TARGET_ARCH_X64 | 1752 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |