Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(944)

Side by Side Diff: src/ia32/disasm-ia32.cc

Issue 153773002: A64: Synchronize with r16679. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 } 691 }
692 692
693 int DisassemblerIA32::MemoryFPUInstruction(int escape_opcode, 693 int DisassemblerIA32::MemoryFPUInstruction(int escape_opcode,
694 int modrm_byte, 694 int modrm_byte,
695 byte* modrm_start) { 695 byte* modrm_start) {
696 const char* mnem = "?"; 696 const char* mnem = "?";
697 int regop = (modrm_byte >> 3) & 0x7; // reg/op field of modrm byte. 697 int regop = (modrm_byte >> 3) & 0x7; // reg/op field of modrm byte.
698 switch (escape_opcode) { 698 switch (escape_opcode) {
699 case 0xD9: switch (regop) { 699 case 0xD9: switch (regop) {
700 case 0: mnem = "fld_s"; break; 700 case 0: mnem = "fld_s"; break;
701 case 2: mnem = "fst_s"; break;
701 case 3: mnem = "fstp_s"; break; 702 case 3: mnem = "fstp_s"; break;
702 case 7: mnem = "fstcw"; break; 703 case 7: mnem = "fstcw"; break;
703 default: UnimplementedInstruction(); 704 default: UnimplementedInstruction();
704 } 705 }
705 break; 706 break;
706 707
707 case 0xDB: switch (regop) { 708 case 0xDB: switch (regop) {
708 case 0: mnem = "fild_s"; break; 709 case 0: mnem = "fild_s"; break;
709 case 1: mnem = "fisttp_s"; break; 710 case 1: mnem = "fisttp_s"; break;
710 case 2: mnem = "fist_s"; break; 711 case 2: mnem = "fist_s"; break;
(...skipping 25 matching lines...) Expand all
736 return count + 1; 737 return count + 1;
737 } 738 }
738 739
739 int DisassemblerIA32::RegisterFPUInstruction(int escape_opcode, 740 int DisassemblerIA32::RegisterFPUInstruction(int escape_opcode,
740 byte modrm_byte) { 741 byte modrm_byte) {
741 bool has_register = false; // Is the FPU register encoded in modrm_byte? 742 bool has_register = false; // Is the FPU register encoded in modrm_byte?
742 const char* mnem = "?"; 743 const char* mnem = "?";
743 744
744 switch (escape_opcode) { 745 switch (escape_opcode) {
745 case 0xD8: 746 case 0xD8:
746 UnimplementedInstruction(); 747 has_register = true;
748 switch (modrm_byte & 0xF8) {
749 case 0xC0: mnem = "fadd_i"; break;
750 case 0xE0: mnem = "fsub_i"; break;
751 case 0xC8: mnem = "fmul_i"; break;
752 case 0xF0: mnem = "fdiv_i"; break;
753 default: UnimplementedInstruction();
754 }
747 break; 755 break;
748 756
749 case 0xD9: 757 case 0xD9:
750 switch (modrm_byte & 0xF8) { 758 switch (modrm_byte & 0xF8) {
751 case 0xC0: 759 case 0xC0:
752 mnem = "fld"; 760 mnem = "fld";
753 has_register = true; 761 has_register = true;
754 break; 762 break;
755 case 0xC8: 763 case 0xC8:
756 mnem = "fxch"; 764 mnem = "fxch";
757 has_register = true; 765 has_register = true;
758 break; 766 break;
759 default: 767 default:
760 switch (modrm_byte) { 768 switch (modrm_byte) {
761 case 0xE0: mnem = "fchs"; break; 769 case 0xE0: mnem = "fchs"; break;
762 case 0xE1: mnem = "fabs"; break; 770 case 0xE1: mnem = "fabs"; break;
763 case 0xE4: mnem = "ftst"; break; 771 case 0xE4: mnem = "ftst"; break;
764 case 0xE8: mnem = "fld1"; break; 772 case 0xE8: mnem = "fld1"; break;
765 case 0xEB: mnem = "fldpi"; break; 773 case 0xEB: mnem = "fldpi"; break;
766 case 0xED: mnem = "fldln2"; break; 774 case 0xED: mnem = "fldln2"; break;
767 case 0xEE: mnem = "fldz"; break; 775 case 0xEE: mnem = "fldz"; break;
768 case 0xF0: mnem = "f2xm1"; break; 776 case 0xF0: mnem = "f2xm1"; break;
769 case 0xF1: mnem = "fyl2x"; break; 777 case 0xF1: mnem = "fyl2x"; break;
778 case 0xF4: mnem = "fxtract"; break;
770 case 0xF5: mnem = "fprem1"; break; 779 case 0xF5: mnem = "fprem1"; break;
771 case 0xF7: mnem = "fincstp"; break; 780 case 0xF7: mnem = "fincstp"; break;
772 case 0xF8: mnem = "fprem"; break; 781 case 0xF8: mnem = "fprem"; break;
773 case 0xFC: mnem = "frndint"; break; 782 case 0xFC: mnem = "frndint"; break;
774 case 0xFD: mnem = "fscale"; break; 783 case 0xFD: mnem = "fscale"; break;
775 case 0xFE: mnem = "fsin"; break; 784 case 0xFE: mnem = "fsin"; break;
776 case 0xFF: mnem = "fcos"; break; 785 case 0xFF: mnem = "fcos"; break;
777 default: UnimplementedInstruction(); 786 default: UnimplementedInstruction();
778 } 787 }
779 } 788 }
(...skipping 28 matching lines...) Expand all
808 case 0xC8: mnem = "fmul"; break; 817 case 0xC8: mnem = "fmul"; break;
809 case 0xF8: mnem = "fdiv"; break; 818 case 0xF8: mnem = "fdiv"; break;
810 default: UnimplementedInstruction(); 819 default: UnimplementedInstruction();
811 } 820 }
812 break; 821 break;
813 822
814 case 0xDD: 823 case 0xDD:
815 has_register = true; 824 has_register = true;
816 switch (modrm_byte & 0xF8) { 825 switch (modrm_byte & 0xF8) {
817 case 0xC0: mnem = "ffree"; break; 826 case 0xC0: mnem = "ffree"; break;
827 case 0xD0: mnem = "fst"; break;
818 case 0xD8: mnem = "fstp"; break; 828 case 0xD8: mnem = "fstp"; break;
819 default: UnimplementedInstruction(); 829 default: UnimplementedInstruction();
820 } 830 }
821 break; 831 break;
822 832
823 case 0xDE: 833 case 0xDE:
824 if (modrm_byte == 0xD9) { 834 if (modrm_byte == 0xD9) {
825 mnem = "fcompp"; 835 mnem = "fcompp";
826 } else { 836 } else {
827 has_register = true; 837 has_register = true;
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 AppendToBuffer("test eax,0x%x", *reinterpret_cast<int32_t*>(data+1)); 1451 AppendToBuffer("test eax,0x%x", *reinterpret_cast<int32_t*>(data+1));
1442 data += 5; 1452 data += 5;
1443 break; 1453 break;
1444 1454
1445 case 0xD1: // fall through 1455 case 0xD1: // fall through
1446 case 0xD3: // fall through 1456 case 0xD3: // fall through
1447 case 0xC1: 1457 case 0xC1:
1448 data += D1D3C1Instruction(data); 1458 data += D1D3C1Instruction(data);
1449 break; 1459 break;
1450 1460
1461 case 0xD8: // fall through
1451 case 0xD9: // fall through 1462 case 0xD9: // fall through
1452 case 0xDA: // fall through 1463 case 0xDA: // fall through
1453 case 0xDB: // fall through 1464 case 0xDB: // fall through
1454 case 0xDC: // fall through 1465 case 0xDC: // fall through
1455 case 0xDD: // fall through 1466 case 0xDD: // fall through
1456 case 0xDE: // fall through 1467 case 0xDE: // fall through
1457 case 0xDF: 1468 case 0xDF:
1458 data += FPUInstruction(data); 1469 data += FPUInstruction(data);
1459 break; 1470 break;
1460 1471
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 fprintf(f, " "); 1728 fprintf(f, " ");
1718 } 1729 }
1719 fprintf(f, " %s\n", buffer.start()); 1730 fprintf(f, " %s\n", buffer.start());
1720 } 1731 }
1721 } 1732 }
1722 1733
1723 1734
1724 } // namespace disasm 1735 } // namespace disasm
1725 1736
1726 #endif // V8_TARGET_ARCH_IA32 1737 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698