Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: src/disasm-ia32.cc

Issue 21207: * Issue 228 Fix - add decompilation of dec(Operand) (Closed)
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, &regop, &rm); 856 get_modrm(*data, &mod, &regop, &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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698