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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 { bool is_byte = *data == 0xC6; | 915 { bool is_byte = *data == 0xC6; |
916 data++; | 916 data++; |
917 AppendToBuffer("%s ", is_byte ? "mov_b" : "mov"); | 917 AppendToBuffer("%s ", is_byte ? "mov_b" : "mov"); |
918 data += PrintRightOperand(data); | 918 data += PrintRightOperand(data); |
919 int32_t imm = is_byte ? *data : *reinterpret_cast<int32_t*>(data); | 919 int32_t imm = is_byte ? *data : *reinterpret_cast<int32_t*>(data); |
920 AppendToBuffer(",0x%x", imm); | 920 AppendToBuffer(",0x%x", imm); |
921 data += is_byte ? 1 : 4; | 921 data += is_byte ? 1 : 4; |
922 } | 922 } |
923 break; | 923 break; |
924 | 924 |
| 925 case 0x80: |
| 926 { data++; |
| 927 AppendToBuffer("%s ", "cmpb"); |
| 928 data += PrintRightOperand(data); |
| 929 int32_t imm = *data; |
| 930 AppendToBuffer(",0x%x", imm); |
| 931 data++; |
| 932 } |
| 933 break; |
| 934 |
925 case 0x88: // 8bit, fall through | 935 case 0x88: // 8bit, fall through |
926 case 0x89: // 32bit | 936 case 0x89: // 32bit |
927 { bool is_byte = *data == 0x88; | 937 { bool is_byte = *data == 0x88; |
928 int mod, regop, rm; | 938 int mod, regop, rm; |
929 data++; | 939 data++; |
930 get_modrm(*data, &mod, ®op, &rm); | 940 get_modrm(*data, &mod, ®op, &rm); |
931 AppendToBuffer("%s ", is_byte ? "mov_b" : "mov"); | 941 AppendToBuffer("%s ", is_byte ? "mov_b" : "mov"); |
932 data += PrintRightOperand(data); | 942 data += PrintRightOperand(data); |
933 AppendToBuffer(",%s", NameOfCPURegister(regop)); | 943 AppendToBuffer(",%s", NameOfCPURegister(regop)); |
934 } | 944 } |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 } | 1193 } |
1184 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { | 1194 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { |
1185 fprintf(f, " "); | 1195 fprintf(f, " "); |
1186 } | 1196 } |
1187 fprintf(f, " %s\n", buffer.start()); | 1197 fprintf(f, " %s\n", buffer.start()); |
1188 } | 1198 } |
1189 } | 1199 } |
1190 | 1200 |
1191 | 1201 |
1192 } // namespace disasm | 1202 } // namespace disasm |
OLD | NEW |