| 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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 break; | 851 break; |
| 852 | 852 |
| 853 case 0xFF: | 853 case 0xFF: |
| 854 { data++; | 854 { data++; |
| 855 int mod, regop, rm; | 855 int mod, regop, rm; |
| 856 get_modrm(*data, &mod, ®op, &rm); | 856 get_modrm(*data, &mod, ®op, &rm); |
| 857 const char* mnem = NULL; | 857 const char* mnem = NULL; |
| 858 switch (regop) { | 858 switch (regop) { |
| 859 case esi: mnem = "push"; break; | 859 case esi: mnem = "push"; break; |
| 860 case eax: mnem = "inc"; break; | 860 case eax: mnem = "inc"; break; |
| 861 case ecx: mnem = "dec"; break; |
| 861 case edx: mnem = "call"; break; | 862 case edx: mnem = "call"; break; |
| 862 case esp: mnem = "jmp"; break; | 863 case esp: mnem = "jmp"; break; |
| 863 default: mnem = "???"; | 864 default: mnem = "???"; |
| 864 } | 865 } |
| 865 AppendToBuffer("%s ", mnem); | 866 AppendToBuffer("%s ", mnem); |
| 866 data += PrintRightOperand(data); | 867 data += PrintRightOperand(data); |
| 867 } | 868 } |
| 868 break; | 869 break; |
| 869 | 870 |
| 870 case 0xC7: // imm32, fall through | 871 case 0xC7: // imm32, fall through |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 } | 1130 } |
| 1130 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { | 1131 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { |
| 1131 fprintf(f, " "); | 1132 fprintf(f, " "); |
| 1132 } | 1133 } |
| 1133 fprintf(f, " %s\n", buffer.start()); | 1134 fprintf(f, " %s\n", buffer.start()); |
| 1134 } | 1135 } |
| 1135 } | 1136 } |
| 1136 | 1137 |
| 1137 | 1138 |
| 1138 } // namespace disasm | 1139 } // namespace disasm |
| OLD | NEW |