| 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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 AppendToBuffer(",0x%x", imm); | 1007 AppendToBuffer(",0x%x", imm); |
| 1008 data += is_byte ? 1 : 4; | 1008 data += is_byte ? 1 : 4; |
| 1009 } | 1009 } |
| 1010 break; | 1010 break; |
| 1011 | 1011 |
| 1012 case 0x80: | 1012 case 0x80: |
| 1013 { data++; | 1013 { data++; |
| 1014 int mod, regop, rm; | 1014 int mod, regop, rm; |
| 1015 get_modrm(*data, &mod, ®op, &rm); | 1015 get_modrm(*data, &mod, ®op, &rm); |
| 1016 const char* mnem = NULL; | 1016 const char* mnem = NULL; |
| 1017 printf("%d\n", regop); | |
| 1018 switch (regop) { | 1017 switch (regop) { |
| 1019 case 5: mnem = "subb"; break; | 1018 case 5: mnem = "subb"; break; |
| 1020 case 7: mnem = "cmpb"; break; | 1019 case 7: mnem = "cmpb"; break; |
| 1021 default: UnimplementedInstruction(); | 1020 default: UnimplementedInstruction(); |
| 1022 } | 1021 } |
| 1023 AppendToBuffer("%s ", mnem); | 1022 AppendToBuffer("%s ", mnem); |
| 1024 data += PrintRightOperand(data); | 1023 data += PrintRightOperand(data); |
| 1025 int32_t imm = *data; | 1024 int32_t imm = *data; |
| 1026 AppendToBuffer(",0x%x", imm); | 1025 AppendToBuffer(",0x%x", imm); |
| 1027 data++; | 1026 data++; |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 } | 1350 } |
| 1352 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { | 1351 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { |
| 1353 fprintf(f, " "); | 1352 fprintf(f, " "); |
| 1354 } | 1353 } |
| 1355 fprintf(f, " %s\n", buffer.start()); | 1354 fprintf(f, " %s\n", buffer.start()); |
| 1356 } | 1355 } |
| 1357 } | 1356 } |
| 1358 | 1357 |
| 1359 | 1358 |
| 1360 } // namespace disasm | 1359 } // namespace disasm |
| OLD | NEW |