| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 | 935 |
| 936 case CALL_JUMP_INSTR: { | 936 case CALL_JUMP_INSTR: { |
| 937 byte* addr = data + *reinterpret_cast<int32_t*>(data+1) + 5; | 937 byte* addr = data + *reinterpret_cast<int32_t*>(data+1) + 5; |
| 938 AppendToBuffer("%s %s", idesc.mnem, NameOfAddress(addr)); | 938 AppendToBuffer("%s %s", idesc.mnem, NameOfAddress(addr)); |
| 939 data += 5; | 939 data += 5; |
| 940 break; | 940 break; |
| 941 } | 941 } |
| 942 | 942 |
| 943 case SHORT_IMMEDIATE_INSTR: { | 943 case SHORT_IMMEDIATE_INSTR: { |
| 944 byte* addr = reinterpret_cast<byte*>(*reinterpret_cast<int32_t*>(data+1)); | 944 byte* addr = reinterpret_cast<byte*>(*reinterpret_cast<int32_t*>(data+1)); |
| 945 AppendToBuffer("%s eax, %s", idesc.mnem, NameOfAddress(addr)); | 945 AppendToBuffer("%s eax,%s", idesc.mnem, NameOfAddress(addr)); |
| 946 data += 5; | 946 data += 5; |
| 947 break; | 947 break; |
| 948 } | 948 } |
| 949 | 949 |
| 950 case BYTE_IMMEDIATE_INSTR: { | 950 case BYTE_IMMEDIATE_INSTR: { |
| 951 AppendToBuffer("%s al, 0x%x", idesc.mnem, data[1]); | 951 AppendToBuffer("%s al,0x%x", idesc.mnem, data[1]); |
| 952 data += 2; | 952 data += 2; |
| 953 break; | 953 break; |
| 954 } | 954 } |
| 955 | 955 |
| 956 case NO_INSTR: | 956 case NO_INSTR: |
| 957 processed = false; | 957 processed = false; |
| 958 break; | 958 break; |
| 959 | 959 |
| 960 default: | 960 default: |
| 961 UNIMPLEMENTED(); // This type is not implemented. | 961 UNIMPLEMENTED(); // This type is not implemented. |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 NameOfCPURegister(regop), | 1232 NameOfCPURegister(regop), |
| 1233 NameOfXMMRegister(rm), | 1233 NameOfXMMRegister(rm), |
| 1234 static_cast<int>(imm8)); | 1234 static_cast<int>(imm8)); |
| 1235 data += 2; | 1235 data += 2; |
| 1236 } else if (*data == 0x17) { | 1236 } else if (*data == 0x17) { |
| 1237 data++; | 1237 data++; |
| 1238 int mod, regop, rm; | 1238 int mod, regop, rm; |
| 1239 get_modrm(*data, &mod, ®op, &rm); | 1239 get_modrm(*data, &mod, ®op, &rm); |
| 1240 int8_t imm8 = static_cast<int8_t>(data[1]); | 1240 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1241 AppendToBuffer("extractps %s,%s,%d", | 1241 AppendToBuffer("extractps %s,%s,%d", |
| 1242 NameOfCPURegister(regop), | 1242 NameOfCPURegister(rm), |
| 1243 NameOfXMMRegister(rm), | 1243 NameOfXMMRegister(regop), |
| 1244 static_cast<int>(imm8)); | 1244 static_cast<int>(imm8)); |
| 1245 data += 2; | 1245 data += 2; |
| 1246 } else if (*data == 0x22) { | 1246 } else if (*data == 0x22) { |
| 1247 data++; | 1247 data++; |
| 1248 int mod, regop, rm; | 1248 int mod, regop, rm; |
| 1249 get_modrm(*data, &mod, ®op, &rm); | 1249 get_modrm(*data, &mod, ®op, &rm); |
| 1250 int8_t imm8 = static_cast<int8_t>(data[1]); | 1250 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1251 AppendToBuffer("pinsrd %s,%s,%d", | 1251 AppendToBuffer("pinsrd %s,%s,%d", |
| 1252 NameOfXMMRegister(regop), | 1252 NameOfXMMRegister(regop), |
| 1253 NameOfCPURegister(rm), | 1253 NameOfCPURegister(rm), |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 fprintf(f, " "); | 1728 fprintf(f, " "); |
| 1729 } | 1729 } |
| 1730 fprintf(f, " %s\n", buffer.start()); | 1730 fprintf(f, " %s\n", buffer.start()); |
| 1731 } | 1731 } |
| 1732 } | 1732 } |
| 1733 | 1733 |
| 1734 | 1734 |
| 1735 } // namespace disasm | 1735 } // namespace disasm |
| 1736 | 1736 |
| 1737 #endif // V8_TARGET_ARCH_IA32 | 1737 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |