OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 { 0x8A, BYTE_REG_OPER_OP_ORDER, "mov" }, | 98 { 0x8A, BYTE_REG_OPER_OP_ORDER, "mov" }, |
99 { 0x8B, REG_OPER_OP_ORDER, "mov" }, | 99 { 0x8B, REG_OPER_OP_ORDER, "mov" }, |
100 { 0x8D, REG_OPER_OP_ORDER, "lea" }, | 100 { 0x8D, REG_OPER_OP_ORDER, "lea" }, |
101 { -1, UNSET_OP_ORDER, "" } | 101 { -1, UNSET_OP_ORDER, "" } |
102 }; | 102 }; |
103 | 103 |
104 | 104 |
105 static ByteMnemonic zero_operands_instr[] = { | 105 static ByteMnemonic zero_operands_instr[] = { |
106 { 0xC3, UNSET_OP_ORDER, "ret" }, | 106 { 0xC3, UNSET_OP_ORDER, "ret" }, |
107 { 0xC9, UNSET_OP_ORDER, "leave" }, | 107 { 0xC9, UNSET_OP_ORDER, "leave" }, |
108 { 0x90, UNSET_OP_ORDER, "nop" }, | |
Erik Corry
2009/08/12 20:03:37
Was this deliberate?
William Hesse
2009/08/13 07:59:36
Yes. This instruction is handled by code, because
| |
109 { 0xF4, UNSET_OP_ORDER, "hlt" }, | 108 { 0xF4, UNSET_OP_ORDER, "hlt" }, |
110 { 0xCC, UNSET_OP_ORDER, "int3" }, | 109 { 0xCC, UNSET_OP_ORDER, "int3" }, |
111 { 0x60, UNSET_OP_ORDER, "pushad" }, | 110 { 0x60, UNSET_OP_ORDER, "pushad" }, |
112 { 0x61, UNSET_OP_ORDER, "popad" }, | 111 { 0x61, UNSET_OP_ORDER, "popad" }, |
113 { 0x9C, UNSET_OP_ORDER, "pushfd" }, | 112 { 0x9C, UNSET_OP_ORDER, "pushfd" }, |
114 { 0x9D, UNSET_OP_ORDER, "popfd" }, | 113 { 0x9D, UNSET_OP_ORDER, "popfd" }, |
115 { 0x9E, UNSET_OP_ORDER, "sahf" }, | 114 { 0x9E, UNSET_OP_ORDER, "sahf" }, |
116 { 0x99, UNSET_OP_ORDER, "cdq" }, | 115 { 0x99, UNSET_OP_ORDER, "cdq" }, |
117 { 0x9B, UNSET_OP_ORDER, "fwait" }, | 116 { 0x9B, UNSET_OP_ORDER, "fwait" }, |
118 { -1, UNSET_OP_ORDER, "" } | 117 { -1, UNSET_OP_ORDER, "" } |
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1418 value = *reinterpret_cast<uint32_t*>(data + 1); | 1417 value = *reinterpret_cast<uint32_t*>(data + 1); |
1419 data += 5; | 1418 data += 5; |
1420 break; | 1419 break; |
1421 case QUADWORD_SIZE: | 1420 case QUADWORD_SIZE: |
1422 value = *reinterpret_cast<int32_t*>(data + 1); | 1421 value = *reinterpret_cast<int32_t*>(data + 1); |
1423 data += 5; | 1422 data += 5; |
1424 break; | 1423 break; |
1425 default: | 1424 default: |
1426 UNREACHABLE(); | 1425 UNREACHABLE(); |
1427 } | 1426 } |
1428 AppendToBuffer("test%c rax,0x%"V8_PTR_PREFIX"ux", | 1427 AppendToBuffer("test%c rax,0x%"V8_PTR_PREFIX"x", |
1429 operand_size_code(), | 1428 operand_size_code(), |
1430 value); | 1429 value); |
1431 break; | 1430 break; |
1432 } | 1431 } |
1433 case 0xD1: // fall through | 1432 case 0xD1: // fall through |
1434 case 0xD3: // fall through | 1433 case 0xD3: // fall through |
1435 case 0xC1: | 1434 case 0xC1: |
1436 data += ShiftInstruction(data); | 1435 data += ShiftInstruction(data); |
1437 break; | 1436 break; |
1438 case 0xD0: // fall through | 1437 case 0xD0: // fall through |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1583 fprintf(f, "%02x", *bp); | 1582 fprintf(f, "%02x", *bp); |
1584 } | 1583 } |
1585 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { | 1584 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { |
1586 fprintf(f, " "); | 1585 fprintf(f, " "); |
1587 } | 1586 } |
1588 fprintf(f, " %s\n", buffer.start()); | 1587 fprintf(f, " %s\n", buffer.start()); |
1589 } | 1588 } |
1590 } | 1589 } |
1591 | 1590 |
1592 } // namespace disasm | 1591 } // namespace disasm |
OLD | NEW |