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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1342 AppendToBuffer("push 0x%x", *reinterpret_cast<int8_t*>(data + 1)); | 1342 AppendToBuffer("push 0x%x", *reinterpret_cast<int8_t*>(data + 1)); |
1343 data += 2; | 1343 data += 2; |
1344 break; | 1344 break; |
1345 | 1345 |
1346 case 0xA8: | 1346 case 0xA8: |
1347 AppendToBuffer("test al,0x%x", *reinterpret_cast<uint8_t*>(data + 1)); | 1347 AppendToBuffer("test al,0x%x", *reinterpret_cast<uint8_t*>(data + 1)); |
1348 data += 2; | 1348 data += 2; |
1349 break; | 1349 break; |
1350 | 1350 |
1351 case 0xA9: { | 1351 case 0xA9: { |
1352 int64_t value; | 1352 int64_t value = 0; |
William Hesse
2009/07/20 20:18:28
The USE macro won't work. Giving a default initia
| |
1353 switch (operand_size()) { | 1353 switch (operand_size()) { |
1354 case WORD_SIZE: | 1354 case WORD_SIZE: |
1355 value = *reinterpret_cast<uint16_t*>(data + 1); | 1355 value = *reinterpret_cast<uint16_t*>(data + 1); |
1356 data += 3; | 1356 data += 3; |
1357 break; | 1357 break; |
1358 case DOUBLEWORD_SIZE: | 1358 case DOUBLEWORD_SIZE: |
1359 value = *reinterpret_cast<uint32_t*>(data + 1); | 1359 value = *reinterpret_cast<uint32_t*>(data + 1); |
1360 data += 5; | 1360 data += 5; |
1361 break; | 1361 break; |
1362 case QUADWORD_SIZE: | 1362 case QUADWORD_SIZE: |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1524 fprintf(f, "%02x", *bp); | 1524 fprintf(f, "%02x", *bp); |
1525 } | 1525 } |
1526 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { | 1526 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { |
1527 fprintf(f, " "); | 1527 fprintf(f, " "); |
1528 } | 1528 } |
1529 fprintf(f, " %s\n", buffer.start()); | 1529 fprintf(f, " %s\n", buffer.start()); |
1530 } | 1530 } |
1531 } | 1531 } |
1532 | 1532 |
1533 } // namespace disasm | 1533 } // namespace disasm |
OLD | NEW |