| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 id->type = JUMP_CONDITIONAL_SHORT_INSTR; | 261 id->type = JUMP_CONDITIONAL_SHORT_INSTR; |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 | 265 |
| 266 // The IA32 disassembler implementation. | 266 // The IA32 disassembler implementation. |
| 267 class DisassemblerIA32 { | 267 class DisassemblerIA32 { |
| 268 public: | 268 public: |
| 269 DisassemblerIA32(const NameConverter& converter, | 269 DisassemblerIA32(const NameConverter& converter, |
| 270 bool abort_on_unimplemented = true) | 270 bool abort_on_unimplemented = true) |
| 271 : instruction_table_(InstructionTabel::get_instance()), | 271 : converter_(converter), |
| 272 converter_(converter), | 272 instruction_table_(InstructionTable::get_instance()), |
| 273 tmp_buffer_pos_(0), | 273 tmp_buffer_pos_(0), |
| 274 abort_on_unimplemented_(abort_on_unimplemented) { | 274 abort_on_unimplemented_(abort_on_unimplemented) { |
| 275 tmp_buffer_[0] = '\0'; | 275 tmp_buffer_[0] = '\0'; |
| 276 } | 276 } |
| 277 | 277 |
| 278 virtual ~DisassemblerIA32() {} | 278 virtual ~DisassemblerIA32() {} |
| 279 | 279 |
| 280 // Writes one disassembled instruction into 'buffer' (0-terminated). | 280 // Writes one disassembled instruction into 'buffer' (0-terminated). |
| 281 // Returns the length of the disassembled machine instruction in bytes. | 281 // Returns the length of the disassembled machine instruction in bytes. |
| 282 int InstructionDecode(v8::internal::Vector<char> buffer, byte* instruction); | 282 int InstructionDecode(v8::internal::Vector<char> buffer, byte* instruction); |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 fprintf(f, " "); | 1649 fprintf(f, " "); |
| 1650 } | 1650 } |
| 1651 fprintf(f, " %s\n", buffer.start()); | 1651 fprintf(f, " %s\n", buffer.start()); |
| 1652 } | 1652 } |
| 1653 } | 1653 } |
| 1654 | 1654 |
| 1655 | 1655 |
| 1656 } // namespace disasm | 1656 } // namespace disasm |
| 1657 | 1657 |
| 1658 #endif // V8_TARGET_ARCH_IA32 | 1658 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |