Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 21 matching lines...) Expand all Loading... | |
| 32 | 32 |
| 33 typedef unsigned char byte; | 33 typedef unsigned char byte; |
| 34 | 34 |
| 35 // Interface and default implementation for converting addresses and | 35 // Interface and default implementation for converting addresses and |
| 36 // register-numbers to text. The default implementation is machine | 36 // register-numbers to text. The default implementation is machine |
| 37 // specific. | 37 // specific. |
| 38 class NameConverter { | 38 class NameConverter { |
| 39 public: | 39 public: |
| 40 virtual ~NameConverter() {} | 40 virtual ~NameConverter() {} |
| 41 virtual const char* NameOfCPURegister(int reg) const; | 41 virtual const char* NameOfCPURegister(int reg) const; |
| 42 #ifdef V8_TARGET_ARCH_MIPS | |
|
Søren Thygesen Gjesse
2010/01/19 22:59:12
This #ifdef should not be needed. Platform specifi
Alexandre
2010/01/22 23:08:42
Updated. We now use this function instead of NameO
| |
| 43 // Coprocessor registers for MIPS | |
| 44 virtual const char* NameOfCOP1Register(int reg) const; | |
| 45 #endif | |
| 42 virtual const char* NameOfByteCPURegister(int reg) const; | 46 virtual const char* NameOfByteCPURegister(int reg) const; |
| 43 virtual const char* NameOfXMMRegister(int reg) const; | 47 virtual const char* NameOfXMMRegister(int reg) const; |
| 44 virtual const char* NameOfAddress(byte* addr) const; | 48 virtual const char* NameOfAddress(byte* addr) const; |
| 45 virtual const char* NameOfConstant(byte* addr) const; | 49 virtual const char* NameOfConstant(byte* addr) const; |
| 46 virtual const char* NameInCode(byte* addr) const; | 50 virtual const char* NameInCode(byte* addr) const; |
| 47 }; | 51 }; |
| 48 | 52 |
| 49 | 53 |
| 50 // A generic Disassembler interface | 54 // A generic Disassembler interface |
| 51 class Disassembler { | 55 class Disassembler { |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 68 static void Disassemble(FILE* f, byte* begin, byte* end); | 72 static void Disassemble(FILE* f, byte* begin, byte* end); |
| 69 private: | 73 private: |
| 70 const NameConverter& converter_; | 74 const NameConverter& converter_; |
| 71 | 75 |
| 72 DISALLOW_IMPLICIT_CONSTRUCTORS(Disassembler); | 76 DISALLOW_IMPLICIT_CONSTRUCTORS(Disassembler); |
| 73 }; | 77 }; |
| 74 | 78 |
| 75 } // namespace disasm | 79 } // namespace disasm |
| 76 | 80 |
| 77 #endif // V8_DISASM_H_ | 81 #endif // V8_DISASM_H_ |
| OLD | NEW |