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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 int mod, regop, rm; | 553 int mod, regop, rm; |
554 get_modrm(modrm, &mod, ®op, &rm); | 554 get_modrm(modrm, &mod, ®op, &rm); |
555 int imm8 = -1; | 555 int imm8 = -1; |
556 int num_bytes = 2; | 556 int num_bytes = 2; |
557 if (mod == 3) { | 557 if (mod == 3) { |
558 const char* mnem = NULL; | 558 const char* mnem = NULL; |
559 switch (regop) { | 559 switch (regop) { |
560 case kROL: mnem = "rol"; break; | 560 case kROL: mnem = "rol"; break; |
561 case kROR: mnem = "ror"; break; | 561 case kROR: mnem = "ror"; break; |
562 case kRCL: mnem = "rcl"; break; | 562 case kRCL: mnem = "rcl"; break; |
| 563 case kRCR: mnem = "rcr"; break; |
563 case kSHL: mnem = "shl"; break; | 564 case kSHL: mnem = "shl"; break; |
564 case KSHR: mnem = "shr"; break; | 565 case KSHR: mnem = "shr"; break; |
565 case kSAR: mnem = "sar"; break; | 566 case kSAR: mnem = "sar"; break; |
566 default: UnimplementedInstruction(); | 567 default: UnimplementedInstruction(); |
567 } | 568 } |
568 if (op == 0xD1) { | 569 if (op == 0xD1) { |
569 imm8 = 1; | 570 imm8 = 1; |
570 } else if (op == 0xC1) { | 571 } else if (op == 0xC1) { |
571 imm8 = *(data+2); | 572 imm8 = *(data+2); |
572 num_bytes = 3; | 573 num_bytes = 3; |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 fprintf(f, " "); | 1463 fprintf(f, " "); |
1463 } | 1464 } |
1464 fprintf(f, " %s\n", buffer.start()); | 1465 fprintf(f, " %s\n", buffer.start()); |
1465 } | 1466 } |
1466 } | 1467 } |
1467 | 1468 |
1468 | 1469 |
1469 } // namespace disasm | 1470 } // namespace disasm |
1470 | 1471 |
1471 #endif // V8_TARGET_ARCH_IA32 | 1472 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |