Commit 2e6100507a915581660c86c4f00f8b8812476661
1 parent
54623277
Concentrate rest of table entries to top
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing
1 changed file
with
610 additions
and
107 deletions
target-ppc/translate.c
... | ... | @@ -797,6 +797,616 @@ GEN_HANDLER2(evsel1, "evsel", 0x04, 0x1d, 0x09, 0x00000000, PPC_SPE); |
797 | 797 | GEN_HANDLER2(evsel2, "evsel", 0x04, 0x1e, 0x09, 0x00000000, PPC_SPE); |
798 | 798 | GEN_HANDLER2(evsel3, "evsel", 0x04, 0x1f, 0x09, 0x00000000, PPC_SPE); |
799 | 799 | |
800 | +#define GEN_INT_ARITH_ADD(name, opc3, add_ca, compute_ca, compute_ov) \ | |
801 | +GEN_HANDLER(name, 0x1F, 0x0A, opc3, 0x00000000, PPC_INTEGER); | |
802 | +#define GEN_INT_ARITH_ADD_CONST(name, opc3, const_val, \ | |
803 | + add_ca, compute_ca, compute_ov) \ | |
804 | +GEN_HANDLER(name, 0x1F, 0x0A, opc3, 0x0000F800, PPC_INTEGER); | |
805 | +GEN_INT_ARITH_ADD(add, 0x08, 0, 0, 0) | |
806 | +GEN_INT_ARITH_ADD(addo, 0x18, 0, 0, 1) | |
807 | +GEN_INT_ARITH_ADD(addc, 0x00, 0, 1, 0) | |
808 | +GEN_INT_ARITH_ADD(addco, 0x10, 0, 1, 1) | |
809 | +GEN_INT_ARITH_ADD(adde, 0x04, 1, 1, 0) | |
810 | +GEN_INT_ARITH_ADD(addeo, 0x14, 1, 1, 1) | |
811 | +GEN_INT_ARITH_ADD_CONST(addme, 0x07, -1LL, 1, 1, 0) | |
812 | +GEN_INT_ARITH_ADD_CONST(addmeo, 0x17, -1LL, 1, 1, 1) | |
813 | +GEN_INT_ARITH_ADD_CONST(addze, 0x06, 0, 1, 1, 0) | |
814 | +GEN_INT_ARITH_ADD_CONST(addzeo, 0x16, 0, 1, 1, 1) | |
815 | +#undef GEN_INT_ARITH_ADD | |
816 | +#undef GEN_INT_ARITH_ADD_CONST | |
817 | + | |
818 | +#define GEN_INT_ARITH_DIVW(name, opc3, sign, compute_ov) \ | |
819 | +GEN_HANDLER(name, 0x1F, 0x0B, opc3, 0x00000000, PPC_INTEGER); | |
820 | +GEN_INT_ARITH_DIVW(divwu, 0x0E, 0, 0); | |
821 | +GEN_INT_ARITH_DIVW(divwuo, 0x1E, 0, 1); | |
822 | +GEN_INT_ARITH_DIVW(divw, 0x0F, 1, 0); | |
823 | +GEN_INT_ARITH_DIVW(divwo, 0x1F, 1, 1); | |
824 | +#undef GEN_INT_ARITH_DIVW | |
825 | + | |
826 | +#if defined(TARGET_PPC64) | |
827 | +#define GEN_INT_ARITH_DIVD(name, opc3, sign, compute_ov) \ | |
828 | +GEN_HANDLER(name, 0x1F, 0x09, opc3, 0x00000000, PPC_64B); | |
829 | +GEN_INT_ARITH_DIVD(divdu, 0x0E, 0, 0); | |
830 | +GEN_INT_ARITH_DIVD(divduo, 0x1E, 0, 1); | |
831 | +GEN_INT_ARITH_DIVD(divd, 0x0F, 1, 0); | |
832 | +GEN_INT_ARITH_DIVD(divdo, 0x1F, 1, 1); | |
833 | +#undef GEN_INT_ARITH_DIVD | |
834 | + | |
835 | +#define GEN_INT_ARITH_MUL_HELPER(name, opc3) \ | |
836 | +GEN_HANDLER(name, 0x1F, 0x09, opc3, 0x00000000, PPC_64B); | |
837 | +GEN_INT_ARITH_MUL_HELPER(mulhdu, 0x00); | |
838 | +GEN_INT_ARITH_MUL_HELPER(mulhd, 0x02); | |
839 | +GEN_INT_ARITH_MUL_HELPER(mulldo, 0x17); | |
840 | +#undef GEN_INT_ARITH_MUL_HELPER | |
841 | +#endif | |
842 | + | |
843 | +#define GEN_INT_ARITH_SUBF(name, opc3, add_ca, compute_ca, compute_ov) \ | |
844 | +GEN_HANDLER(name, 0x1F, 0x08, opc3, 0x00000000, PPC_INTEGER); | |
845 | +#define GEN_INT_ARITH_SUBF_CONST(name, opc3, const_val, \ | |
846 | + add_ca, compute_ca, compute_ov) \ | |
847 | +GEN_HANDLER(name, 0x1F, 0x08, opc3, 0x0000F800, PPC_INTEGER); | |
848 | +GEN_INT_ARITH_SUBF(subf, 0x01, 0, 0, 0) | |
849 | +GEN_INT_ARITH_SUBF(subfo, 0x11, 0, 0, 1) | |
850 | +GEN_INT_ARITH_SUBF(subfc, 0x00, 0, 1, 0) | |
851 | +GEN_INT_ARITH_SUBF(subfco, 0x10, 0, 1, 1) | |
852 | +GEN_INT_ARITH_SUBF(subfe, 0x04, 1, 1, 0) | |
853 | +GEN_INT_ARITH_SUBF(subfeo, 0x14, 1, 1, 1) | |
854 | +GEN_INT_ARITH_SUBF_CONST(subfme, 0x07, -1LL, 1, 1, 0) | |
855 | +GEN_INT_ARITH_SUBF_CONST(subfmeo, 0x17, -1LL, 1, 1, 1) | |
856 | +GEN_INT_ARITH_SUBF_CONST(subfze, 0x06, 0, 1, 1, 0) | |
857 | +GEN_INT_ARITH_SUBF_CONST(subfzeo, 0x16, 0, 1, 1, 1) | |
858 | +#undef GEN_INT_ARITH_SUBF | |
859 | +#undef GEN_INT_ARITH_SUBF_CONST | |
860 | + | |
861 | +#define GEN_LOGICAL2(name, tcg_op, opc, type) \ | |
862 | +GEN_HANDLER(name, 0x1F, 0x1C, opc, 0x00000000, type); | |
863 | +#define GEN_LOGICAL1(name, tcg_op, opc, type) \ | |
864 | +GEN_HANDLER(name, 0x1F, 0x1A, opc, 0x00000000, type); | |
865 | +GEN_LOGICAL2(and, tcg_gen_and_tl, 0x00, PPC_INTEGER); | |
866 | +GEN_LOGICAL2(andc, tcg_gen_andc_tl, 0x01, PPC_INTEGER); | |
867 | +GEN_LOGICAL2(eqv, tcg_gen_eqv_tl, 0x08, PPC_INTEGER); | |
868 | +GEN_LOGICAL1(extsb, tcg_gen_ext8s_tl, 0x1D, PPC_INTEGER); | |
869 | +GEN_LOGICAL1(extsh, tcg_gen_ext16s_tl, 0x1C, PPC_INTEGER); | |
870 | +GEN_LOGICAL2(nand, tcg_gen_nand_tl, 0x0E, PPC_INTEGER); | |
871 | +GEN_LOGICAL2(nor, tcg_gen_nor_tl, 0x03, PPC_INTEGER); | |
872 | +GEN_LOGICAL2(orc, tcg_gen_orc_tl, 0x0C, PPC_INTEGER); | |
873 | +#if defined(TARGET_PPC64) | |
874 | +GEN_LOGICAL1(extsw, tcg_gen_ext32s_tl, 0x1E, PPC_64B); | |
875 | +#endif | |
876 | +#undef GEN_LOGICAL1 | |
877 | +#undef GEN_LOGICAL2 | |
878 | + | |
879 | +#if defined(TARGET_PPC64) | |
880 | +#define GEN_PPC64_R2(name, opc1, opc2) \ | |
881 | +GEN_HANDLER2(name##0, stringify(name), opc1, opc2, 0xFF, 0x00000000, PPC_64B);\ | |
882 | +GEN_HANDLER2(name##1, stringify(name), opc1, opc2 | 0x10, 0xFF, 0x00000000, \ | |
883 | + PPC_64B); | |
884 | +#define GEN_PPC64_R4(name, opc1, opc2) \ | |
885 | +GEN_HANDLER2(name##0, stringify(name), opc1, opc2, 0xFF, 0x00000000, PPC_64B);\ | |
886 | +GEN_HANDLER2(name##1, stringify(name), opc1, opc2 | 0x01, 0xFF, 0x00000000, \ | |
887 | + PPC_64B); \ | |
888 | +GEN_HANDLER2(name##2, stringify(name), opc1, opc2 | 0x10, 0xFF, 0x00000000, \ | |
889 | + PPC_64B); \ | |
890 | +GEN_HANDLER2(name##3, stringify(name), opc1, opc2 | 0x11, 0xFF, 0x00000000, \ | |
891 | + PPC_64B) | |
892 | +GEN_PPC64_R4(rldicl, 0x1E, 0x00); | |
893 | +GEN_PPC64_R4(rldicr, 0x1E, 0x02); | |
894 | +GEN_PPC64_R4(rldic, 0x1E, 0x04); | |
895 | +GEN_PPC64_R2(rldcl, 0x1E, 0x08); | |
896 | +GEN_PPC64_R2(rldcr, 0x1E, 0x09); | |
897 | +GEN_PPC64_R4(rldimi, 0x1E, 0x06); | |
898 | +#undef GEN_PPC64_R2 | |
899 | +#undef GEN_PPC64_R4 | |
900 | +#endif | |
901 | + | |
902 | +#define _GEN_FLOAT_ACB(name, op, op1, op2, isfloat, set_fprf, type) \ | |
903 | +GEN_HANDLER(f##name, op1, op2, 0xFF, 0x00000000, type); | |
904 | +#define GEN_FLOAT_ACB(name, op2, set_fprf, type) \ | |
905 | +_GEN_FLOAT_ACB(name, name, 0x3F, op2, 0, set_fprf, type); \ | |
906 | +_GEN_FLOAT_ACB(name##s, name, 0x3B, op2, 1, set_fprf, type); | |
907 | +#define _GEN_FLOAT_AB(name, op, op1, op2, inval, isfloat, set_fprf, type) \ | |
908 | +GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type); | |
909 | +#define GEN_FLOAT_AB(name, op2, inval, set_fprf, type) \ | |
910 | +_GEN_FLOAT_AB(name, name, 0x3F, op2, inval, 0, set_fprf, type); \ | |
911 | +_GEN_FLOAT_AB(name##s, name, 0x3B, op2, inval, 1, set_fprf, type); | |
912 | +#define _GEN_FLOAT_AC(name, op, op1, op2, inval, isfloat, set_fprf, type) \ | |
913 | +GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type); | |
914 | +#define GEN_FLOAT_AC(name, op2, inval, set_fprf, type) \ | |
915 | +_GEN_FLOAT_AC(name, name, 0x3F, op2, inval, 0, set_fprf, type); \ | |
916 | +_GEN_FLOAT_AC(name##s, name, 0x3B, op2, inval, 1, set_fprf, type); | |
917 | +#define GEN_FLOAT_B(name, op2, op3, set_fprf, type) \ | |
918 | +GEN_HANDLER(f##name, 0x3F, op2, op3, 0x001F0000, type); | |
919 | +#define GEN_FLOAT_BS(name, op1, op2, set_fprf, type) \ | |
920 | +GEN_HANDLER(f##name, op1, op2, 0xFF, 0x001F07C0, type); | |
921 | + | |
922 | +GEN_FLOAT_AB(add, 0x15, 0x000007C0, 1, PPC_FLOAT); | |
923 | +GEN_FLOAT_AB(div, 0x12, 0x000007C0, 1, PPC_FLOAT); | |
924 | +GEN_FLOAT_AC(mul, 0x19, 0x0000F800, 1, PPC_FLOAT); | |
925 | +GEN_FLOAT_BS(re, 0x3F, 0x18, 1, PPC_FLOAT_EXT); | |
926 | +GEN_FLOAT_BS(res, 0x3B, 0x18, 1, PPC_FLOAT_FRES); | |
927 | +GEN_FLOAT_BS(rsqrte, 0x3F, 0x1A, 1, PPC_FLOAT_FRSQRTE); | |
928 | +_GEN_FLOAT_ACB(sel, sel, 0x3F, 0x17, 0, 0, PPC_FLOAT_FSEL); | |
929 | +GEN_FLOAT_AB(sub, 0x14, 0x000007C0, 1, PPC_FLOAT); | |
930 | +GEN_FLOAT_ACB(madd, 0x1D, 1, PPC_FLOAT); | |
931 | +GEN_FLOAT_ACB(msub, 0x1C, 1, PPC_FLOAT); | |
932 | +GEN_FLOAT_ACB(nmadd, 0x1F, 1, PPC_FLOAT); | |
933 | +GEN_FLOAT_ACB(nmsub, 0x1E, 1, PPC_FLOAT); | |
934 | +GEN_FLOAT_B(ctiw, 0x0E, 0x00, 0, PPC_FLOAT); | |
935 | +GEN_FLOAT_B(ctiwz, 0x0F, 0x00, 0, PPC_FLOAT); | |
936 | +GEN_FLOAT_B(rsp, 0x0C, 0x00, 1, PPC_FLOAT); | |
937 | +#if defined(TARGET_PPC64) | |
938 | +GEN_FLOAT_B(cfid, 0x0E, 0x1A, 1, PPC_64B); | |
939 | +GEN_FLOAT_B(ctid, 0x0E, 0x19, 0, PPC_64B); | |
940 | +GEN_FLOAT_B(ctidz, 0x0F, 0x19, 0, PPC_64B); | |
941 | +#endif | |
942 | +GEN_FLOAT_B(rin, 0x08, 0x0C, 1, PPC_FLOAT_EXT); | |
943 | +GEN_FLOAT_B(riz, 0x08, 0x0D, 1, PPC_FLOAT_EXT); | |
944 | +GEN_FLOAT_B(rip, 0x08, 0x0E, 1, PPC_FLOAT_EXT); | |
945 | +GEN_FLOAT_B(rim, 0x08, 0x0F, 1, PPC_FLOAT_EXT); | |
946 | +GEN_FLOAT_B(abs, 0x08, 0x08, 0, PPC_FLOAT); | |
947 | +GEN_FLOAT_B(nabs, 0x08, 0x04, 0, PPC_FLOAT); | |
948 | +GEN_FLOAT_B(neg, 0x08, 0x01, 0, PPC_FLOAT); | |
949 | +#undef _GEN_FLOAT_ACB | |
950 | +#undef GEN_FLOAT_ACB | |
951 | +#undef _GEN_FLOAT_AB | |
952 | +#undef GEN_FLOAT_AB | |
953 | +#undef _GEN_FLOAT_AC | |
954 | +#undef GEN_FLOAT_AC | |
955 | +#undef GEN_FLOAT_B | |
956 | +#undef GEN_FLOAT_BS | |
957 | + | |
958 | +#define GEN_LD(name, ldop, opc, type) \ | |
959 | +GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); | |
960 | +#define GEN_LDU(name, ldop, opc, type) \ | |
961 | +GEN_HANDLER(name##u, opc, 0xFF, 0xFF, 0x00000000, type); | |
962 | +#define GEN_LDUX(name, ldop, opc2, opc3, type) \ | |
963 | +GEN_HANDLER(name##ux, 0x1F, opc2, opc3, 0x00000001, type); | |
964 | +#define GEN_LDX(name, ldop, opc2, opc3, type) \ | |
965 | +GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); | |
966 | +#define GEN_LDS(name, ldop, op, type) \ | |
967 | +GEN_LD(name, ldop, op | 0x20, type); \ | |
968 | +GEN_LDU(name, ldop, op | 0x21, type); \ | |
969 | +GEN_LDUX(name, ldop, 0x17, op | 0x01, type); \ | |
970 | +GEN_LDX(name, ldop, 0x17, op | 0x00, type) | |
971 | + | |
972 | +GEN_LDS(lbz, ld8u, 0x02, PPC_INTEGER); | |
973 | +GEN_LDS(lha, ld16s, 0x0A, PPC_INTEGER); | |
974 | +GEN_LDS(lhz, ld16u, 0x08, PPC_INTEGER); | |
975 | +GEN_LDS(lwz, ld32u, 0x00, PPC_INTEGER); | |
976 | +#if defined(TARGET_PPC64) | |
977 | +GEN_LDUX(lwa, ld32s, 0x15, 0x0B, PPC_64B); | |
978 | +GEN_LDX(lwa, ld32s, 0x15, 0x0A, PPC_64B); | |
979 | +GEN_LDUX(ld, ld64, 0x15, 0x01, PPC_64B); | |
980 | +GEN_LDX(ld, ld64, 0x15, 0x00, PPC_64B); | |
981 | +#endif | |
982 | +GEN_LDX(lhbr, ld16ur, 0x16, 0x18, PPC_INTEGER); | |
983 | +GEN_LDX(lwbr, ld32ur, 0x16, 0x10, PPC_INTEGER); | |
984 | +#undef GEN_LD | |
985 | +#undef GEN_LDU | |
986 | +#undef GEN_LDUX | |
987 | +#undef GEN_LDX | |
988 | +#undef GEN_LDS | |
989 | + | |
990 | +#define GEN_ST(name, stop, opc, type) \ | |
991 | +GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); | |
992 | +#define GEN_STU(name, stop, opc, type) \ | |
993 | +GEN_HANDLER(stop##u, opc, 0xFF, 0xFF, 0x00000000, type); | |
994 | +#define GEN_STUX(name, stop, opc2, opc3, type) \ | |
995 | +GEN_HANDLER(name##ux, 0x1F, opc2, opc3, 0x00000001, type); | |
996 | +#define GEN_STX(name, stop, opc2, opc3, type) \ | |
997 | +GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); | |
998 | +#define GEN_STS(name, stop, op, type) \ | |
999 | +GEN_ST(name, stop, op | 0x20, type); \ | |
1000 | +GEN_STU(name, stop, op | 0x21, type); \ | |
1001 | +GEN_STUX(name, stop, 0x17, op | 0x01, type); \ | |
1002 | +GEN_STX(name, stop, 0x17, op | 0x00, type) | |
1003 | + | |
1004 | +GEN_STS(stb, st8, 0x06, PPC_INTEGER); | |
1005 | +GEN_STS(sth, st16, 0x0C, PPC_INTEGER); | |
1006 | +GEN_STS(stw, st32, 0x04, PPC_INTEGER); | |
1007 | +#if defined(TARGET_PPC64) | |
1008 | +GEN_STUX(std, st64, 0x15, 0x05, PPC_64B); | |
1009 | +GEN_STX(std, st64, 0x15, 0x04, PPC_64B); | |
1010 | +#endif | |
1011 | +GEN_STX(sthbr, st16r, 0x16, 0x1C, PPC_INTEGER); | |
1012 | +GEN_STX(stwbr, st32r, 0x16, 0x14, PPC_INTEGER); | |
1013 | +#undef GEN_ST | |
1014 | +#undef GEN_STU | |
1015 | +#undef GEN_STUX | |
1016 | +#undef GEN_STX | |
1017 | +#undef GEN_STS | |
1018 | + | |
1019 | +#define GEN_LDF(name, ldop, opc, type) \ | |
1020 | +GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); | |
1021 | +#define GEN_LDUF(name, ldop, opc, type) \ | |
1022 | +GEN_HANDLER(name##u, opc, 0xFF, 0xFF, 0x00000000, type); | |
1023 | +#define GEN_LDUXF(name, ldop, opc, type) \ | |
1024 | +GEN_HANDLER(name##ux, 0x1F, 0x17, opc, 0x00000001, type); | |
1025 | +#define GEN_LDXF(name, ldop, opc2, opc3, type) \ | |
1026 | +GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); | |
1027 | +#define GEN_LDFS(name, ldop, op, type) \ | |
1028 | +GEN_LDF(name, ldop, op | 0x20, type); \ | |
1029 | +GEN_LDUF(name, ldop, op | 0x21, type); \ | |
1030 | +GEN_LDUXF(name, ldop, op | 0x01, type); \ | |
1031 | +GEN_LDXF(name, ldop, 0x17, op | 0x00, type) | |
1032 | + | |
1033 | +GEN_LDFS(lfd, ld64, 0x12, PPC_FLOAT); | |
1034 | +GEN_LDFS(lfs, ld32fs, 0x10, PPC_FLOAT); | |
1035 | +#undef GEN_LDF | |
1036 | +#undef GEN_LDUF | |
1037 | +#undef GEN_LDUXF | |
1038 | +#undef GEN_LDXF | |
1039 | + | |
1040 | +#define GEN_STF(name, stop, opc, type) \ | |
1041 | +GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); | |
1042 | +#define GEN_STUF(name, stop, opc, type) \ | |
1043 | +GEN_HANDLER(name##u, opc, 0xFF, 0xFF, 0x00000000, type); | |
1044 | +#define GEN_STUXF(name, stop, opc, type) \ | |
1045 | +GEN_HANDLER(name##ux, 0x1F, 0x17, opc, 0x00000001, type); | |
1046 | +#define GEN_STXF(name, stop, opc2, opc3, type) \ | |
1047 | +GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); | |
1048 | +#define GEN_STFS(name, stop, op, type) \ | |
1049 | +GEN_STF(name, stop, op | 0x20, type); \ | |
1050 | +GEN_STUF(name, stop, op | 0x21, type); \ | |
1051 | +GEN_STUXF(name, stop, op | 0x01, type); \ | |
1052 | +GEN_STXF(name, stop, 0x17, op | 0x00, type) | |
1053 | + | |
1054 | +GEN_STFS(stfd, st64, 0x16, PPC_FLOAT); | |
1055 | +GEN_STFS(stfs, st32fs, 0x14, PPC_FLOAT); | |
1056 | +GEN_STXF(stfiw, st32fiw, 0x17, 0x1E, PPC_FLOAT_STFIWX); | |
1057 | +#undef GEN_STF | |
1058 | +#undef GEN_STUF | |
1059 | +#undef GEN_STUXF | |
1060 | +#undef GEN_STXF | |
1061 | + | |
1062 | +#define GEN_CRLOGIC(name, tcg_op, opc) \ | |
1063 | +GEN_HANDLER(name, 0x13, 0x01, opc, 0x00000001, PPC_INTEGER); | |
1064 | +GEN_CRLOGIC(crand, tcg_gen_and_i32, 0x08); | |
1065 | +GEN_CRLOGIC(crandc, tcg_gen_andc_i32, 0x04); | |
1066 | +GEN_CRLOGIC(creqv, tcg_gen_eqv_i32, 0x09); | |
1067 | +GEN_CRLOGIC(crnand, tcg_gen_nand_i32, 0x07); | |
1068 | +GEN_CRLOGIC(crnor, tcg_gen_nor_i32, 0x01); | |
1069 | +GEN_CRLOGIC(cror, tcg_gen_or_i32, 0x0E); | |
1070 | +GEN_CRLOGIC(crorc, tcg_gen_orc_i32, 0x0D); | |
1071 | +GEN_CRLOGIC(crxor, tcg_gen_xor_i32, 0x06); | |
1072 | +#undef GEN_CRLOGIC | |
1073 | + | |
1074 | +#define GEN_MAC_HANDLER(name, opc2, opc3) \ | |
1075 | +GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_405_MAC); | |
1076 | +GEN_MAC_HANDLER(macchw, 0x0C, 0x05); | |
1077 | +GEN_MAC_HANDLER(macchwo, 0x0C, 0x15); | |
1078 | +GEN_MAC_HANDLER(macchws, 0x0C, 0x07); | |
1079 | +GEN_MAC_HANDLER(macchwso, 0x0C, 0x17); | |
1080 | +GEN_MAC_HANDLER(macchwsu, 0x0C, 0x06); | |
1081 | +GEN_MAC_HANDLER(macchwsuo, 0x0C, 0x16); | |
1082 | +GEN_MAC_HANDLER(macchwu, 0x0C, 0x04); | |
1083 | +GEN_MAC_HANDLER(macchwuo, 0x0C, 0x14); | |
1084 | +GEN_MAC_HANDLER(machhw, 0x0C, 0x01); | |
1085 | +GEN_MAC_HANDLER(machhwo, 0x0C, 0x11); | |
1086 | +GEN_MAC_HANDLER(machhws, 0x0C, 0x03); | |
1087 | +GEN_MAC_HANDLER(machhwso, 0x0C, 0x13); | |
1088 | +GEN_MAC_HANDLER(machhwsu, 0x0C, 0x02); | |
1089 | +GEN_MAC_HANDLER(machhwsuo, 0x0C, 0x12); | |
1090 | +GEN_MAC_HANDLER(machhwu, 0x0C, 0x00); | |
1091 | +GEN_MAC_HANDLER(machhwuo, 0x0C, 0x10); | |
1092 | +GEN_MAC_HANDLER(maclhw, 0x0C, 0x0D); | |
1093 | +GEN_MAC_HANDLER(maclhwo, 0x0C, 0x1D); | |
1094 | +GEN_MAC_HANDLER(maclhws, 0x0C, 0x0F); | |
1095 | +GEN_MAC_HANDLER(maclhwso, 0x0C, 0x1F); | |
1096 | +GEN_MAC_HANDLER(maclhwu, 0x0C, 0x0C); | |
1097 | +GEN_MAC_HANDLER(maclhwuo, 0x0C, 0x1C); | |
1098 | +GEN_MAC_HANDLER(maclhwsu, 0x0C, 0x0E); | |
1099 | +GEN_MAC_HANDLER(maclhwsuo, 0x0C, 0x1E); | |
1100 | +GEN_MAC_HANDLER(nmacchw, 0x0E, 0x05); | |
1101 | +GEN_MAC_HANDLER(nmacchwo, 0x0E, 0x15); | |
1102 | +GEN_MAC_HANDLER(nmacchws, 0x0E, 0x07); | |
1103 | +GEN_MAC_HANDLER(nmacchwso, 0x0E, 0x17); | |
1104 | +GEN_MAC_HANDLER(nmachhw, 0x0E, 0x01); | |
1105 | +GEN_MAC_HANDLER(nmachhwo, 0x0E, 0x11); | |
1106 | +GEN_MAC_HANDLER(nmachhws, 0x0E, 0x03); | |
1107 | +GEN_MAC_HANDLER(nmachhwso, 0x0E, 0x13); | |
1108 | +GEN_MAC_HANDLER(nmaclhw, 0x0E, 0x0D); | |
1109 | +GEN_MAC_HANDLER(nmaclhwo, 0x0E, 0x1D); | |
1110 | +GEN_MAC_HANDLER(nmaclhws, 0x0E, 0x0F); | |
1111 | +GEN_MAC_HANDLER(nmaclhwso, 0x0E, 0x1F); | |
1112 | +GEN_MAC_HANDLER(mulchw, 0x08, 0x05); | |
1113 | +GEN_MAC_HANDLER(mulchwu, 0x08, 0x04); | |
1114 | +GEN_MAC_HANDLER(mulhhw, 0x08, 0x01); | |
1115 | +GEN_MAC_HANDLER(mulhhwu, 0x08, 0x00); | |
1116 | +GEN_MAC_HANDLER(mullhw, 0x08, 0x0D); | |
1117 | +GEN_MAC_HANDLER(mullhwu, 0x08, 0x0C); | |
1118 | +#undef GEN_MAC_HANDLER | |
1119 | + | |
1120 | +#define GEN_VR_LDX(name, opc2, opc3) \ | |
1121 | +GEN_HANDLER(name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); | |
1122 | +#define GEN_VR_STX(name, opc2, opc3) \ | |
1123 | +GEN_HANDLER(st##name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); | |
1124 | +#define GEN_VR_LVE(name, opc2, opc3) \ | |
1125 | + GEN_HANDLER(lve##name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); | |
1126 | +#define GEN_VR_STVE(name, opc2, opc3) \ | |
1127 | + GEN_HANDLER(stve##name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); | |
1128 | +GEN_VR_LDX(lvx, 0x07, 0x03); | |
1129 | +GEN_VR_LDX(lvxl, 0x07, 0x0B); | |
1130 | +GEN_VR_LVE(bx, 0x07, 0x00); | |
1131 | +GEN_VR_LVE(hx, 0x07, 0x01); | |
1132 | +GEN_VR_LVE(wx, 0x07, 0x02); | |
1133 | +GEN_VR_STX(svx, 0x07, 0x07); | |
1134 | +GEN_VR_STX(svxl, 0x07, 0x0F); | |
1135 | +GEN_VR_STVE(bx, 0x07, 0x04); | |
1136 | +GEN_VR_STVE(hx, 0x07, 0x05); | |
1137 | +GEN_VR_STVE(wx, 0x07, 0x06); | |
1138 | +#undef GEN_VR_LDX | |
1139 | +#undef GEN_VR_STX | |
1140 | +#undef GEN_VR_LVE | |
1141 | +#undef GEN_VR_STVE | |
1142 | + | |
1143 | +#define GEN_VX_LOGICAL(name, tcg_op, opc2, opc3) \ | |
1144 | +GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); | |
1145 | +GEN_VX_LOGICAL(vand, tcg_gen_and_i64, 2, 16); | |
1146 | +GEN_VX_LOGICAL(vandc, tcg_gen_andc_i64, 2, 17); | |
1147 | +GEN_VX_LOGICAL(vor, tcg_gen_or_i64, 2, 18); | |
1148 | +GEN_VX_LOGICAL(vxor, tcg_gen_xor_i64, 2, 19); | |
1149 | +GEN_VX_LOGICAL(vnor, tcg_gen_nor_i64, 2, 20); | |
1150 | +#undef GEN_VX_LOGICAL | |
1151 | + | |
1152 | +#define GEN_VXFORM(name, opc2, opc3) \ | |
1153 | +GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); | |
1154 | +GEN_VXFORM(vaddubm, 0, 0); | |
1155 | +GEN_VXFORM(vadduhm, 0, 1); | |
1156 | +GEN_VXFORM(vadduwm, 0, 2); | |
1157 | +GEN_VXFORM(vsububm, 0, 16); | |
1158 | +GEN_VXFORM(vsubuhm, 0, 17); | |
1159 | +GEN_VXFORM(vsubuwm, 0, 18); | |
1160 | +GEN_VXFORM(vmaxub, 1, 0); | |
1161 | +GEN_VXFORM(vmaxuh, 1, 1); | |
1162 | +GEN_VXFORM(vmaxuw, 1, 2); | |
1163 | +GEN_VXFORM(vmaxsb, 1, 4); | |
1164 | +GEN_VXFORM(vmaxsh, 1, 5); | |
1165 | +GEN_VXFORM(vmaxsw, 1, 6); | |
1166 | +GEN_VXFORM(vminub, 1, 8); | |
1167 | +GEN_VXFORM(vminuh, 1, 9); | |
1168 | +GEN_VXFORM(vminuw, 1, 10); | |
1169 | +GEN_VXFORM(vminsb, 1, 12); | |
1170 | +GEN_VXFORM(vminsh, 1, 13); | |
1171 | +GEN_VXFORM(vminsw, 1, 14); | |
1172 | +GEN_VXFORM(vavgub, 1, 16); | |
1173 | +GEN_VXFORM(vavguh, 1, 17); | |
1174 | +GEN_VXFORM(vavguw, 1, 18); | |
1175 | +GEN_VXFORM(vavgsb, 1, 20); | |
1176 | +GEN_VXFORM(vavgsh, 1, 21); | |
1177 | +GEN_VXFORM(vavgsw, 1, 22); | |
1178 | +GEN_VXFORM(vmrghb, 6, 0); | |
1179 | +GEN_VXFORM(vmrghh, 6, 1); | |
1180 | +GEN_VXFORM(vmrghw, 6, 2); | |
1181 | +GEN_VXFORM(vmrglb, 6, 4); | |
1182 | +GEN_VXFORM(vmrglh, 6, 5); | |
1183 | +GEN_VXFORM(vmrglw, 6, 6); | |
1184 | +GEN_VXFORM(vmuloub, 4, 0); | |
1185 | +GEN_VXFORM(vmulouh, 4, 1); | |
1186 | +GEN_VXFORM(vmulosb, 4, 4); | |
1187 | +GEN_VXFORM(vmulosh, 4, 5); | |
1188 | +GEN_VXFORM(vmuleub, 4, 8); | |
1189 | +GEN_VXFORM(vmuleuh, 4, 9); | |
1190 | +GEN_VXFORM(vmulesb, 4, 12); | |
1191 | +GEN_VXFORM(vmulesh, 4, 13); | |
1192 | +GEN_VXFORM(vslb, 2, 4); | |
1193 | +GEN_VXFORM(vslh, 2, 5); | |
1194 | +GEN_VXFORM(vslw, 2, 6); | |
1195 | +GEN_VXFORM(vsrb, 2, 8); | |
1196 | +GEN_VXFORM(vsrh, 2, 9); | |
1197 | +GEN_VXFORM(vsrw, 2, 10); | |
1198 | +GEN_VXFORM(vsrab, 2, 12); | |
1199 | +GEN_VXFORM(vsrah, 2, 13); | |
1200 | +GEN_VXFORM(vsraw, 2, 14); | |
1201 | +GEN_VXFORM(vslo, 6, 16); | |
1202 | +GEN_VXFORM(vsro, 6, 17); | |
1203 | +GEN_VXFORM(vaddcuw, 0, 6); | |
1204 | +GEN_VXFORM(vsubcuw, 0, 22); | |
1205 | +GEN_VXFORM(vaddubs, 0, 8); | |
1206 | +GEN_VXFORM(vadduhs, 0, 9); | |
1207 | +GEN_VXFORM(vadduws, 0, 10); | |
1208 | +GEN_VXFORM(vaddsbs, 0, 12); | |
1209 | +GEN_VXFORM(vaddshs, 0, 13); | |
1210 | +GEN_VXFORM(vaddsws, 0, 14); | |
1211 | +GEN_VXFORM(vsububs, 0, 24); | |
1212 | +GEN_VXFORM(vsubuhs, 0, 25); | |
1213 | +GEN_VXFORM(vsubuws, 0, 26); | |
1214 | +GEN_VXFORM(vsubsbs, 0, 28); | |
1215 | +GEN_VXFORM(vsubshs, 0, 29); | |
1216 | +GEN_VXFORM(vsubsws, 0, 30); | |
1217 | +GEN_VXFORM(vrlb, 2, 0); | |
1218 | +GEN_VXFORM(vrlh, 2, 1); | |
1219 | +GEN_VXFORM(vrlw, 2, 2); | |
1220 | +GEN_VXFORM(vsl, 2, 7); | |
1221 | +GEN_VXFORM(vsr, 2, 11); | |
1222 | +GEN_VXFORM(vpkuhum, 7, 0); | |
1223 | +GEN_VXFORM(vpkuwum, 7, 1); | |
1224 | +GEN_VXFORM(vpkuhus, 7, 2); | |
1225 | +GEN_VXFORM(vpkuwus, 7, 3); | |
1226 | +GEN_VXFORM(vpkshus, 7, 4); | |
1227 | +GEN_VXFORM(vpkswus, 7, 5); | |
1228 | +GEN_VXFORM(vpkshss, 7, 6); | |
1229 | +GEN_VXFORM(vpkswss, 7, 7); | |
1230 | +GEN_VXFORM(vpkpx, 7, 12); | |
1231 | +GEN_VXFORM(vsum4ubs, 4, 24); | |
1232 | +GEN_VXFORM(vsum4sbs, 4, 28); | |
1233 | +GEN_VXFORM(vsum4shs, 4, 25); | |
1234 | +GEN_VXFORM(vsum2sws, 4, 26); | |
1235 | +GEN_VXFORM(vsumsws, 4, 30); | |
1236 | +GEN_VXFORM(vaddfp, 5, 0); | |
1237 | +GEN_VXFORM(vsubfp, 5, 1); | |
1238 | +GEN_VXFORM(vmaxfp, 5, 16); | |
1239 | +GEN_VXFORM(vminfp, 5, 17); | |
1240 | +#undef GEN_VXFORM | |
1241 | + | |
1242 | +#define GEN_VXRFORM1(opname, name, str, opc2, opc3) \ | |
1243 | + GEN_HANDLER2(name, str, 0x4, opc2, opc3, 0x00000000, PPC_ALTIVEC); | |
1244 | +#define GEN_VXRFORM(name, opc2, opc3) \ | |
1245 | + GEN_VXRFORM1(name, name, #name, opc2, opc3) \ | |
1246 | + GEN_VXRFORM1(name##_dot, name##_, #name ".", opc2, (opc3 | (0x1 << 4))) | |
1247 | +GEN_VXRFORM(vcmpequb, 3, 0) | |
1248 | +GEN_VXRFORM(vcmpequh, 3, 1) | |
1249 | +GEN_VXRFORM(vcmpequw, 3, 2) | |
1250 | +GEN_VXRFORM(vcmpgtsb, 3, 12) | |
1251 | +GEN_VXRFORM(vcmpgtsh, 3, 13) | |
1252 | +GEN_VXRFORM(vcmpgtsw, 3, 14) | |
1253 | +GEN_VXRFORM(vcmpgtub, 3, 8) | |
1254 | +GEN_VXRFORM(vcmpgtuh, 3, 9) | |
1255 | +GEN_VXRFORM(vcmpgtuw, 3, 10) | |
1256 | +GEN_VXRFORM(vcmpeqfp, 3, 3) | |
1257 | +GEN_VXRFORM(vcmpgefp, 3, 7) | |
1258 | +GEN_VXRFORM(vcmpgtfp, 3, 11) | |
1259 | +GEN_VXRFORM(vcmpbfp, 3, 15) | |
1260 | +#undef GEN_VXRFORM1 | |
1261 | +#undef GEN_VXRFORM | |
1262 | + | |
1263 | +#define GEN_VXFORM_SIMM(name, opc2, opc3) \ | |
1264 | + GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); | |
1265 | +GEN_VXFORM_SIMM(vspltisb, 6, 12); | |
1266 | +GEN_VXFORM_SIMM(vspltish, 6, 13); | |
1267 | +GEN_VXFORM_SIMM(vspltisw, 6, 14); | |
1268 | +#undef GEN_VXFORM_SIMM | |
1269 | + | |
1270 | +#define GEN_VXFORM_NOA(name, opc2, opc3) \ | |
1271 | + GEN_HANDLER(name, 0x04, opc2, opc3, 0x001f0000, PPC_ALTIVEC); | |
1272 | + | |
1273 | +GEN_VXFORM_NOA(vupkhsb, 7, 8); | |
1274 | +GEN_VXFORM_NOA(vupkhsh, 7, 9); | |
1275 | +GEN_VXFORM_NOA(vupklsb, 7, 10); | |
1276 | +GEN_VXFORM_NOA(vupklsh, 7, 11); | |
1277 | +GEN_VXFORM_NOA(vupkhpx, 7, 13); | |
1278 | +GEN_VXFORM_NOA(vupklpx, 7, 15); | |
1279 | +GEN_VXFORM_NOA(vrefp, 5, 4); | |
1280 | +GEN_VXFORM_NOA(vrsqrtefp, 5, 5); | |
1281 | +GEN_VXFORM_NOA(vlogefp, 5, 7); | |
1282 | +GEN_VXFORM_NOA(vrfim, 5, 8); | |
1283 | +GEN_VXFORM_NOA(vrfin, 5, 9); | |
1284 | +GEN_VXFORM_NOA(vrfip, 5, 10); | |
1285 | +GEN_VXFORM_NOA(vrfiz, 5, 11); | |
1286 | +#undef GEN_VXFORM_NOA | |
1287 | + | |
1288 | +#define GEN_VXFORM_UIMM(name, opc2, opc3) \ | |
1289 | + GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); | |
1290 | +GEN_VXFORM_UIMM(vspltb, 6, 8); | |
1291 | +GEN_VXFORM_UIMM(vsplth, 6, 9); | |
1292 | +GEN_VXFORM_UIMM(vspltw, 6, 10); | |
1293 | +GEN_VXFORM_UIMM(vcfux, 5, 12); | |
1294 | +GEN_VXFORM_UIMM(vcfsx, 5, 13); | |
1295 | +GEN_VXFORM_UIMM(vctuxs, 5, 14); | |
1296 | +GEN_VXFORM_UIMM(vctsxs, 5, 15); | |
1297 | +#undef GEN_VXFORM_UIMM | |
1298 | + | |
1299 | +#define GEN_VAFORM_PAIRED(name0, name1, opc2) \ | |
1300 | + GEN_HANDLER(name0##_##name1, 0x04, opc2, 0xFF, 0x00000000, PPC_ALTIVEC); | |
1301 | +GEN_VAFORM_PAIRED(vmhaddshs, vmhraddshs, 16) | |
1302 | +GEN_VAFORM_PAIRED(vmsumubm, vmsummbm, 18) | |
1303 | +GEN_VAFORM_PAIRED(vmsumuhm, vmsumuhs, 19) | |
1304 | +GEN_VAFORM_PAIRED(vmsumshm, vmsumshs, 20) | |
1305 | +GEN_VAFORM_PAIRED(vsel, vperm, 21) | |
1306 | +GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23) | |
1307 | +#undef GEN_VAFORM_PAIRED | |
1308 | + | |
1309 | +#define GEN_SPE(name0, name1, opc2, opc3, inval, type) \ | |
1310 | +GEN_HANDLER(name0##_##name1, 0x04, opc2, opc3, inval, type); | |
1311 | +GEN_SPE(evaddw, speundef, 0x00, 0x08, 0x00000000, PPC_SPE); | |
1312 | +GEN_SPE(evaddiw, speundef, 0x01, 0x08, 0x00000000, PPC_SPE); | |
1313 | +GEN_SPE(evsubfw, speundef, 0x02, 0x08, 0x00000000, PPC_SPE); | |
1314 | +GEN_SPE(evsubifw, speundef, 0x03, 0x08, 0x00000000, PPC_SPE); | |
1315 | +GEN_SPE(evabs, evneg, 0x04, 0x08, 0x0000F800, PPC_SPE); | |
1316 | +GEN_SPE(evextsb, evextsh, 0x05, 0x08, 0x0000F800, PPC_SPE); | |
1317 | +GEN_SPE(evrndw, evcntlzw, 0x06, 0x08, 0x0000F800, PPC_SPE); | |
1318 | +GEN_SPE(evcntlsw, brinc, 0x07, 0x08, 0x00000000, PPC_SPE); | |
1319 | +GEN_SPE(speundef, evand, 0x08, 0x08, 0x00000000, PPC_SPE); | |
1320 | +GEN_SPE(evandc, speundef, 0x09, 0x08, 0x00000000, PPC_SPE); | |
1321 | +GEN_SPE(evxor, evor, 0x0B, 0x08, 0x00000000, PPC_SPE); | |
1322 | +GEN_SPE(evnor, eveqv, 0x0C, 0x08, 0x00000000, PPC_SPE); | |
1323 | +GEN_SPE(speundef, evorc, 0x0D, 0x08, 0x00000000, PPC_SPE); | |
1324 | +GEN_SPE(evnand, speundef, 0x0F, 0x08, 0x00000000, PPC_SPE); | |
1325 | +GEN_SPE(evsrwu, evsrws, 0x10, 0x08, 0x00000000, PPC_SPE); | |
1326 | +GEN_SPE(evsrwiu, evsrwis, 0x11, 0x08, 0x00000000, PPC_SPE); | |
1327 | +GEN_SPE(evslw, speundef, 0x12, 0x08, 0x00000000, PPC_SPE); | |
1328 | +GEN_SPE(evslwi, speundef, 0x13, 0x08, 0x00000000, PPC_SPE); | |
1329 | +GEN_SPE(evrlw, evsplati, 0x14, 0x08, 0x00000000, PPC_SPE); | |
1330 | +GEN_SPE(evrlwi, evsplatfi, 0x15, 0x08, 0x00000000, PPC_SPE); | |
1331 | +GEN_SPE(evmergehi, evmergelo, 0x16, 0x08, 0x00000000, PPC_SPE); | |
1332 | +GEN_SPE(evmergehilo, evmergelohi, 0x17, 0x08, 0x00000000, PPC_SPE); | |
1333 | +GEN_SPE(evcmpgtu, evcmpgts, 0x18, 0x08, 0x00600000, PPC_SPE); | |
1334 | +GEN_SPE(evcmpltu, evcmplts, 0x19, 0x08, 0x00600000, PPC_SPE); | |
1335 | +GEN_SPE(evcmpeq, speundef, 0x1A, 0x08, 0x00600000, PPC_SPE); | |
1336 | + | |
1337 | +GEN_SPE(evfsadd, evfssub, 0x00, 0x0A, 0x00000000, PPC_SPE_SINGLE); | |
1338 | +GEN_SPE(evfsabs, evfsnabs, 0x02, 0x0A, 0x0000F800, PPC_SPE_SINGLE); | |
1339 | +GEN_SPE(evfsneg, speundef, 0x03, 0x0A, 0x0000F800, PPC_SPE_SINGLE); | |
1340 | +GEN_SPE(evfsmul, evfsdiv, 0x04, 0x0A, 0x00000000, PPC_SPE_SINGLE); | |
1341 | +GEN_SPE(evfscmpgt, evfscmplt, 0x06, 0x0A, 0x00600000, PPC_SPE_SINGLE); | |
1342 | +GEN_SPE(evfscmpeq, speundef, 0x07, 0x0A, 0x00600000, PPC_SPE_SINGLE); | |
1343 | +GEN_SPE(evfscfui, evfscfsi, 0x08, 0x0A, 0x00180000, PPC_SPE_SINGLE); | |
1344 | +GEN_SPE(evfscfuf, evfscfsf, 0x09, 0x0A, 0x00180000, PPC_SPE_SINGLE); | |
1345 | +GEN_SPE(evfsctui, evfsctsi, 0x0A, 0x0A, 0x00180000, PPC_SPE_SINGLE); | |
1346 | +GEN_SPE(evfsctuf, evfsctsf, 0x0B, 0x0A, 0x00180000, PPC_SPE_SINGLE); | |
1347 | +GEN_SPE(evfsctuiz, speundef, 0x0C, 0x0A, 0x00180000, PPC_SPE_SINGLE); | |
1348 | +GEN_SPE(evfsctsiz, speundef, 0x0D, 0x0A, 0x00180000, PPC_SPE_SINGLE); | |
1349 | +GEN_SPE(evfststgt, evfststlt, 0x0E, 0x0A, 0x00600000, PPC_SPE_SINGLE); | |
1350 | +GEN_SPE(evfststeq, speundef, 0x0F, 0x0A, 0x00600000, PPC_SPE_SINGLE); | |
1351 | + | |
1352 | +GEN_SPE(efsadd, efssub, 0x00, 0x0B, 0x00000000, PPC_SPE_SINGLE); | |
1353 | +GEN_SPE(efsabs, efsnabs, 0x02, 0x0B, 0x0000F800, PPC_SPE_SINGLE); | |
1354 | +GEN_SPE(efsneg, speundef, 0x03, 0x0B, 0x0000F800, PPC_SPE_SINGLE); | |
1355 | +GEN_SPE(efsmul, efsdiv, 0x04, 0x0B, 0x00000000, PPC_SPE_SINGLE); | |
1356 | +GEN_SPE(efscmpgt, efscmplt, 0x06, 0x0B, 0x00600000, PPC_SPE_SINGLE); | |
1357 | +GEN_SPE(efscmpeq, efscfd, 0x07, 0x0B, 0x00600000, PPC_SPE_SINGLE); | |
1358 | +GEN_SPE(efscfui, efscfsi, 0x08, 0x0B, 0x00180000, PPC_SPE_SINGLE); | |
1359 | +GEN_SPE(efscfuf, efscfsf, 0x09, 0x0B, 0x00180000, PPC_SPE_SINGLE); | |
1360 | +GEN_SPE(efsctui, efsctsi, 0x0A, 0x0B, 0x00180000, PPC_SPE_SINGLE); | |
1361 | +GEN_SPE(efsctuf, efsctsf, 0x0B, 0x0B, 0x00180000, PPC_SPE_SINGLE); | |
1362 | +GEN_SPE(efsctuiz, speundef, 0x0C, 0x0B, 0x00180000, PPC_SPE_SINGLE); | |
1363 | +GEN_SPE(efsctsiz, speundef, 0x0D, 0x0B, 0x00180000, PPC_SPE_SINGLE); | |
1364 | +GEN_SPE(efststgt, efststlt, 0x0E, 0x0B, 0x00600000, PPC_SPE_SINGLE); | |
1365 | +GEN_SPE(efststeq, speundef, 0x0F, 0x0B, 0x00600000, PPC_SPE_SINGLE); | |
1366 | + | |
1367 | +GEN_SPE(efdadd, efdsub, 0x10, 0x0B, 0x00000000, PPC_SPE_DOUBLE); | |
1368 | +GEN_SPE(efdcfuid, efdcfsid, 0x11, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1369 | +GEN_SPE(efdabs, efdnabs, 0x12, 0x0B, 0x0000F800, PPC_SPE_DOUBLE); | |
1370 | +GEN_SPE(efdneg, speundef, 0x13, 0x0B, 0x0000F800, PPC_SPE_DOUBLE); | |
1371 | +GEN_SPE(efdmul, efddiv, 0x14, 0x0B, 0x00000000, PPC_SPE_DOUBLE); | |
1372 | +GEN_SPE(efdctuidz, efdctsidz, 0x15, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1373 | +GEN_SPE(efdcmpgt, efdcmplt, 0x16, 0x0B, 0x00600000, PPC_SPE_DOUBLE); | |
1374 | +GEN_SPE(efdcmpeq, efdcfs, 0x17, 0x0B, 0x00600000, PPC_SPE_DOUBLE); | |
1375 | +GEN_SPE(efdcfui, efdcfsi, 0x18, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1376 | +GEN_SPE(efdcfuf, efdcfsf, 0x19, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1377 | +GEN_SPE(efdctui, efdctsi, 0x1A, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1378 | +GEN_SPE(efdctuf, efdctsf, 0x1B, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1379 | +GEN_SPE(efdctuiz, speundef, 0x1C, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1380 | +GEN_SPE(efdctsiz, speundef, 0x1D, 0x0B, 0x00180000, PPC_SPE_DOUBLE); | |
1381 | +GEN_SPE(efdtstgt, efdtstlt, 0x1E, 0x0B, 0x00600000, PPC_SPE_DOUBLE); | |
1382 | +GEN_SPE(efdtsteq, speundef, 0x1F, 0x0B, 0x00600000, PPC_SPE_DOUBLE); | |
1383 | +#undef GEN_SPE | |
1384 | + | |
1385 | +#define GEN_SPEOP_LDST(name, opc2, sh) \ | |
1386 | +GEN_HANDLER(name, 0x04, opc2, 0x0C, 0x00000000, PPC_SPE); | |
1387 | +GEN_SPEOP_LDST(evldd, 0x00, 3); | |
1388 | +GEN_SPEOP_LDST(evldw, 0x01, 3); | |
1389 | +GEN_SPEOP_LDST(evldh, 0x02, 3); | |
1390 | +GEN_SPEOP_LDST(evlhhesplat, 0x04, 1); | |
1391 | +GEN_SPEOP_LDST(evlhhousplat, 0x06, 1); | |
1392 | +GEN_SPEOP_LDST(evlhhossplat, 0x07, 1); | |
1393 | +GEN_SPEOP_LDST(evlwhe, 0x08, 2); | |
1394 | +GEN_SPEOP_LDST(evlwhou, 0x0A, 2); | |
1395 | +GEN_SPEOP_LDST(evlwhos, 0x0B, 2); | |
1396 | +GEN_SPEOP_LDST(evlwwsplat, 0x0C, 2); | |
1397 | +GEN_SPEOP_LDST(evlwhsplat, 0x0E, 2); | |
1398 | + | |
1399 | +GEN_SPEOP_LDST(evstdd, 0x10, 3); | |
1400 | +GEN_SPEOP_LDST(evstdw, 0x11, 3); | |
1401 | +GEN_SPEOP_LDST(evstdh, 0x12, 3); | |
1402 | +GEN_SPEOP_LDST(evstwhe, 0x18, 2); | |
1403 | +GEN_SPEOP_LDST(evstwho, 0x1A, 2); | |
1404 | +GEN_SPEOP_LDST(evstwwe, 0x1C, 2); | |
1405 | +GEN_SPEOP_LDST(evstwwo, 0x1E, 2); | |
1406 | +#undef GEN_SPEOP_LDST | |
1407 | +/* End opcode list */ | |
1408 | +GEN_OPCODE_MARK(end); | |
1409 | + | |
800 | 1410 | /* Invalid instruction */ |
801 | 1411 | static void gen_invalid(DisasContext *ctx) |
802 | 1412 | { |
... | ... | @@ -1082,8 +1692,6 @@ static always_inline void gen_op_arith_add(DisasContext *ctx, TCGv ret, TCGv arg |
1082 | 1692 | } |
1083 | 1693 | /* Add functions with two operands */ |
1084 | 1694 | #define GEN_INT_ARITH_ADD(name, opc3, add_ca, compute_ca, compute_ov) \ |
1085 | -GEN_HANDLER(name, 0x1F, 0x0A, opc3, 0x00000000, PPC_INTEGER); \ | |
1086 | - \ | |
1087 | 1695 | static void glue(gen_, name)(DisasContext *ctx) \ |
1088 | 1696 | { \ |
1089 | 1697 | gen_op_arith_add(ctx, cpu_gpr[rD(ctx->opcode)], \ |
... | ... | @@ -1093,8 +1701,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
1093 | 1701 | /* Add functions with one operand and one immediate */ |
1094 | 1702 | #define GEN_INT_ARITH_ADD_CONST(name, opc3, const_val, \ |
1095 | 1703 | add_ca, compute_ca, compute_ov) \ |
1096 | -GEN_HANDLER(name, 0x1F, 0x0A, opc3, 0x0000F800, PPC_INTEGER); \ | |
1097 | - \ | |
1098 | 1704 | static void glue(gen_, name)(DisasContext *ctx) \ |
1099 | 1705 | { \ |
1100 | 1706 | TCGv t0 = tcg_const_local_tl(const_val); \ |
... | ... | @@ -1219,8 +1825,6 @@ static always_inline void gen_op_arith_divw (DisasContext *ctx, TCGv ret, TCGv a |
1219 | 1825 | } |
1220 | 1826 | /* Div functions */ |
1221 | 1827 | #define GEN_INT_ARITH_DIVW(name, opc3, sign, compute_ov) \ |
1222 | -GEN_HANDLER(name, 0x1F, 0x0B, opc3, 0x00000000, PPC_INTEGER); \ | |
1223 | - \ | |
1224 | 1828 | static void glue(gen_, name)(DisasContext *ctx) \ |
1225 | 1829 | { \ |
1226 | 1830 | gen_op_arith_divw(ctx, cpu_gpr[rD(ctx->opcode)], \ |
... | ... | @@ -1268,8 +1872,6 @@ static always_inline void gen_op_arith_divd (DisasContext *ctx, TCGv ret, TCGv a |
1268 | 1872 | gen_set_Rc0(ctx, ret); |
1269 | 1873 | } |
1270 | 1874 | #define GEN_INT_ARITH_DIVD(name, opc3, sign, compute_ov) \ |
1271 | -GEN_HANDLER(name, 0x1F, 0x09, opc3, 0x00000000, PPC_64B); \ | |
1272 | - \ | |
1273 | 1875 | static void glue(gen_, name)(DisasContext *ctx) \ |
1274 | 1876 | { \ |
1275 | 1877 | gen_op_arith_divd(ctx, cpu_gpr[rD(ctx->opcode)], \ |
... | ... | @@ -1387,8 +1989,6 @@ static void gen_mulli(DisasContext *ctx) |
1387 | 1989 | } |
1388 | 1990 | #if defined(TARGET_PPC64) |
1389 | 1991 | #define GEN_INT_ARITH_MUL_HELPER(name, opc3) \ |
1390 | -GEN_HANDLER(name, 0x1F, 0x09, opc3, 0x00000000, PPC_64B); \ | |
1391 | - \ | |
1392 | 1992 | static void glue(gen_, name)(DisasContext *ctx) \ |
1393 | 1993 | { \ |
1394 | 1994 | gen_helper_##name (cpu_gpr[rD(ctx->opcode)], \ |
... | ... | @@ -1512,8 +2112,6 @@ static always_inline void gen_op_arith_subf(DisasContext *ctx, TCGv ret, TCGv ar |
1512 | 2112 | } |
1513 | 2113 | /* Sub functions with Two operands functions */ |
1514 | 2114 | #define GEN_INT_ARITH_SUBF(name, opc3, add_ca, compute_ca, compute_ov) \ |
1515 | -GEN_HANDLER(name, 0x1F, 0x08, opc3, 0x00000000, PPC_INTEGER); \ | |
1516 | - \ | |
1517 | 2115 | static void glue(gen_, name)(DisasContext *ctx) \ |
1518 | 2116 | { \ |
1519 | 2117 | gen_op_arith_subf(ctx, cpu_gpr[rD(ctx->opcode)], \ |
... | ... | @@ -1523,8 +2121,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
1523 | 2121 | /* Sub functions with one operand and one immediate */ |
1524 | 2122 | #define GEN_INT_ARITH_SUBF_CONST(name, opc3, const_val, \ |
1525 | 2123 | add_ca, compute_ca, compute_ov) \ |
1526 | -GEN_HANDLER(name, 0x1F, 0x08, opc3, 0x0000F800, PPC_INTEGER); \ | |
1527 | - \ | |
1528 | 2124 | static void glue(gen_, name)(DisasContext *ctx) \ |
1529 | 2125 | { \ |
1530 | 2126 | TCGv t0 = tcg_const_local_tl(const_val); \ |
... | ... | @@ -1565,8 +2161,6 @@ static void gen_subfic(DisasContext *ctx) |
1565 | 2161 | |
1566 | 2162 | /*** Integer logical ***/ |
1567 | 2163 | #define GEN_LOGICAL2(name, tcg_op, opc, type) \ |
1568 | -GEN_HANDLER(name, 0x1F, 0x1C, opc, 0x00000000, type); \ | |
1569 | - \ | |
1570 | 2164 | static void glue(gen_, name)(DisasContext *ctx) \ |
1571 | 2165 | { \ |
1572 | 2166 | tcg_op(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)], \ |
... | ... | @@ -1576,8 +2170,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
1576 | 2170 | } |
1577 | 2171 | |
1578 | 2172 | #define GEN_LOGICAL1(name, tcg_op, opc, type) \ |
1579 | -GEN_HANDLER(name, 0x1F, 0x1A, opc, 0x00000000, type); \ | |
1580 | - \ | |
1581 | 2173 | static void glue(gen_, name)(DisasContext *ctx) \ |
1582 | 2174 | { \ |
1583 | 2175 | tcg_op(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)]); \ |
... | ... | @@ -1915,42 +2507,30 @@ static void gen_rlwnm(DisasContext *ctx) |
1915 | 2507 | |
1916 | 2508 | #if defined(TARGET_PPC64) |
1917 | 2509 | #define GEN_PPC64_R2(name, opc1, opc2) \ |
1918 | -GEN_HANDLER2(name##0, stringify(name), opc1, opc2, 0xFF, 0x00000000, PPC_64B);\ | |
1919 | - \ | |
1920 | 2510 | static void glue(gen_, name##0)(DisasContext *ctx) \ |
1921 | 2511 | { \ |
1922 | 2512 | gen_##name(ctx, 0); \ |
1923 | 2513 | } \ |
1924 | -GEN_HANDLER2(name##1, stringify(name), opc1, opc2 | 0x10, 0xFF, 0x00000000, \ | |
1925 | - PPC_64B); \ | |
1926 | 2514 | \ |
1927 | 2515 | static void glue(gen_, name##1)(DisasContext *ctx) \ |
1928 | 2516 | { \ |
1929 | 2517 | gen_##name(ctx, 1); \ |
1930 | 2518 | } |
1931 | 2519 | #define GEN_PPC64_R4(name, opc1, opc2) \ |
1932 | -GEN_HANDLER2(name##0, stringify(name), opc1, opc2, 0xFF, 0x00000000, PPC_64B);\ | |
1933 | - \ | |
1934 | 2520 | static void glue(gen_, name##0)(DisasContext *ctx) \ |
1935 | 2521 | { \ |
1936 | 2522 | gen_##name(ctx, 0, 0); \ |
1937 | 2523 | } \ |
1938 | -GEN_HANDLER2(name##1, stringify(name), opc1, opc2 | 0x01, 0xFF, 0x00000000, \ | |
1939 | - PPC_64B); \ | |
1940 | 2524 | \ |
1941 | 2525 | static void glue(gen_, name##1)(DisasContext *ctx) \ |
1942 | 2526 | { \ |
1943 | 2527 | gen_##name(ctx, 0, 1); \ |
1944 | 2528 | } \ |
1945 | -GEN_HANDLER2(name##2, stringify(name), opc1, opc2 | 0x10, 0xFF, 0x00000000, \ | |
1946 | - PPC_64B); \ | |
1947 | 2529 | \ |
1948 | 2530 | static void glue(gen_, name##2)(DisasContext *ctx) \ |
1949 | 2531 | { \ |
1950 | 2532 | gen_##name(ctx, 1, 0); \ |
1951 | 2533 | } \ |
1952 | -GEN_HANDLER2(name##3, stringify(name), opc1, opc2 | 0x11, 0xFF, 0x00000000, \ | |
1953 | - PPC_64B) \ | |
1954 | 2534 | \ |
1955 | 2535 | static void glue(gen_, name##3)(DisasContext *ctx) \ |
1956 | 2536 | { \ |
... | ... | @@ -2255,8 +2835,6 @@ static void gen_srd(DisasContext *ctx) |
2255 | 2835 | |
2256 | 2836 | /*** Floating-Point arithmetic ***/ |
2257 | 2837 | #define _GEN_FLOAT_ACB(name, op, op1, op2, isfloat, set_fprf, type) \ |
2258 | -GEN_HANDLER(f##name, op1, op2, 0xFF, 0x00000000, type); \ | |
2259 | - \ | |
2260 | 2838 | static void gen_f##name(DisasContext *ctx) \ |
2261 | 2839 | { \ |
2262 | 2840 | if (unlikely(!ctx->fpu_enabled)) { \ |
... | ... | @@ -2280,8 +2858,6 @@ _GEN_FLOAT_ACB(name, name, 0x3F, op2, 0, set_fprf, type); \ |
2280 | 2858 | _GEN_FLOAT_ACB(name##s, name, 0x3B, op2, 1, set_fprf, type); |
2281 | 2859 | |
2282 | 2860 | #define _GEN_FLOAT_AB(name, op, op1, op2, inval, isfloat, set_fprf, type) \ |
2283 | -GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type); \ | |
2284 | - \ | |
2285 | 2861 | static void gen_f##name(DisasContext *ctx) \ |
2286 | 2862 | { \ |
2287 | 2863 | if (unlikely(!ctx->fpu_enabled)) { \ |
... | ... | @@ -2304,8 +2880,6 @@ _GEN_FLOAT_AB(name, name, 0x3F, op2, inval, 0, set_fprf, type); \ |
2304 | 2880 | _GEN_FLOAT_AB(name##s, name, 0x3B, op2, inval, 1, set_fprf, type); |
2305 | 2881 | |
2306 | 2882 | #define _GEN_FLOAT_AC(name, op, op1, op2, inval, isfloat, set_fprf, type) \ |
2307 | -GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type); \ | |
2308 | - \ | |
2309 | 2883 | static void gen_f##name(DisasContext *ctx) \ |
2310 | 2884 | { \ |
2311 | 2885 | if (unlikely(!ctx->fpu_enabled)) { \ |
... | ... | @@ -2328,8 +2902,6 @@ _GEN_FLOAT_AC(name, name, 0x3F, op2, inval, 0, set_fprf, type); \ |
2328 | 2902 | _GEN_FLOAT_AC(name##s, name, 0x3B, op2, inval, 1, set_fprf, type); |
2329 | 2903 | |
2330 | 2904 | #define GEN_FLOAT_B(name, op2, op3, set_fprf, type) \ |
2331 | -GEN_HANDLER(f##name, 0x3F, op2, op3, 0x001F0000, type); \ | |
2332 | - \ | |
2333 | 2905 | static void gen_f##name(DisasContext *ctx) \ |
2334 | 2906 | { \ |
2335 | 2907 | if (unlikely(!ctx->fpu_enabled)) { \ |
... | ... | @@ -2345,8 +2917,6 @@ static void gen_f##name(DisasContext *ctx) \ |
2345 | 2917 | } |
2346 | 2918 | |
2347 | 2919 | #define GEN_FLOAT_BS(name, op1, op2, set_fprf, type) \ |
2348 | -GEN_HANDLER(f##name, op1, op2, 0xFF, 0x001F07C0, type); \ | |
2349 | - \ | |
2350 | 2920 | static void gen_f##name(DisasContext *ctx) \ |
2351 | 2921 | { \ |
2352 | 2922 | if (unlikely(!ctx->fpu_enabled)) { \ |
... | ... | @@ -2848,8 +3418,6 @@ static always_inline void gen_qemu_st64(DisasContext *ctx, TCGv_i64 arg1, TCGv a |
2848 | 3418 | } |
2849 | 3419 | |
2850 | 3420 | #define GEN_LD(name, ldop, opc, type) \ |
2851 | -GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
2852 | - \ | |
2853 | 3421 | static void glue(gen_, name)(DisasContext *ctx) \ |
2854 | 3422 | { \ |
2855 | 3423 | TCGv EA; \ |
... | ... | @@ -2861,8 +3429,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
2861 | 3429 | } |
2862 | 3430 | |
2863 | 3431 | #define GEN_LDU(name, ldop, opc, type) \ |
2864 | -GEN_HANDLER(name##u, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
2865 | - \ | |
2866 | 3432 | static void glue(gen_, name##u)(DisasContext *ctx) \ |
2867 | 3433 | { \ |
2868 | 3434 | TCGv EA; \ |
... | ... | @@ -2883,8 +3449,6 @@ static void glue(gen_, name##u)(DisasContext *ctx) |
2883 | 3449 | } |
2884 | 3450 | |
2885 | 3451 | #define GEN_LDUX(name, ldop, opc2, opc3, type) \ |
2886 | -GEN_HANDLER(name##ux, 0x1F, opc2, opc3, 0x00000001, type); \ | |
2887 | - \ | |
2888 | 3452 | static void glue(gen_, name##ux)(DisasContext *ctx) \ |
2889 | 3453 | { \ |
2890 | 3454 | TCGv EA; \ |
... | ... | @@ -2902,8 +3466,6 @@ static void glue(gen_, name##ux)(DisasContext *ctx) |
2902 | 3466 | } |
2903 | 3467 | |
2904 | 3468 | #define GEN_LDX(name, ldop, opc2, opc3, type) \ |
2905 | -GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); \ | |
2906 | - \ | |
2907 | 3469 | static void glue(gen_, name##x)(DisasContext *ctx) \ |
2908 | 3470 | { \ |
2909 | 3471 | TCGv EA; \ |
... | ... | @@ -3001,8 +3563,6 @@ static void gen_lq(DisasContext *ctx) |
3001 | 3563 | |
3002 | 3564 | /*** Integer store ***/ |
3003 | 3565 | #define GEN_ST(name, stop, opc, type) \ |
3004 | -GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
3005 | - \ | |
3006 | 3566 | static void glue(gen_, name)(DisasContext *ctx) \ |
3007 | 3567 | { \ |
3008 | 3568 | TCGv EA; \ |
... | ... | @@ -3014,8 +3574,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
3014 | 3574 | } |
3015 | 3575 | |
3016 | 3576 | #define GEN_STU(name, stop, opc, type) \ |
3017 | -GEN_HANDLER(stop##u, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
3018 | - \ | |
3019 | 3577 | static void glue(gen_, stop##u)(DisasContext *ctx) \ |
3020 | 3578 | { \ |
3021 | 3579 | TCGv EA; \ |
... | ... | @@ -3035,8 +3593,6 @@ static void glue(gen_, stop##u)(DisasContext *ctx) |
3035 | 3593 | } |
3036 | 3594 | |
3037 | 3595 | #define GEN_STUX(name, stop, opc2, opc3, type) \ |
3038 | -GEN_HANDLER(name##ux, 0x1F, opc2, opc3, 0x00000001, type); \ | |
3039 | - \ | |
3040 | 3596 | static void glue(gen_, name##ux)(DisasContext *ctx) \ |
3041 | 3597 | { \ |
3042 | 3598 | TCGv EA; \ |
... | ... | @@ -3053,8 +3609,6 @@ static void glue(gen_, name##ux)(DisasContext *ctx) |
3053 | 3609 | } |
3054 | 3610 | |
3055 | 3611 | #define GEN_STX(name, stop, opc2, opc3, type) \ |
3056 | -GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); \ | |
3057 | - \ | |
3058 | 3612 | static void glue(gen_, name##x)(DisasContext *ctx) \ |
3059 | 3613 | { \ |
3060 | 3614 | TCGv EA; \ |
... | ... | @@ -3415,8 +3969,6 @@ static void gen_wait(DisasContext *ctx) |
3415 | 3969 | |
3416 | 3970 | /*** Floating-point load ***/ |
3417 | 3971 | #define GEN_LDF(name, ldop, opc, type) \ |
3418 | -GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
3419 | - \ | |
3420 | 3972 | static void glue(gen_, name)(DisasContext *ctx) \ |
3421 | 3973 | { \ |
3422 | 3974 | TCGv EA; \ |
... | ... | @@ -3432,8 +3984,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
3432 | 3984 | } |
3433 | 3985 | |
3434 | 3986 | #define GEN_LDUF(name, ldop, opc, type) \ |
3435 | -GEN_HANDLER(name##u, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
3436 | - \ | |
3437 | 3987 | static void glue(gen_, name##u)(DisasContext *ctx) \ |
3438 | 3988 | { \ |
3439 | 3989 | TCGv EA; \ |
... | ... | @@ -3454,8 +4004,6 @@ static void glue(gen_, name##u)(DisasContext *ctx) |
3454 | 4004 | } |
3455 | 4005 | |
3456 | 4006 | #define GEN_LDUXF(name, ldop, opc, type) \ |
3457 | -GEN_HANDLER(name##ux, 0x1F, 0x17, opc, 0x00000001, type); \ | |
3458 | - \ | |
3459 | 4007 | static void glue(gen_, name##ux)(DisasContext *ctx) \ |
3460 | 4008 | { \ |
3461 | 4009 | TCGv EA; \ |
... | ... | @@ -3476,8 +4024,6 @@ static void glue(gen_, name##ux)(DisasContext *ctx) |
3476 | 4024 | } |
3477 | 4025 | |
3478 | 4026 | #define GEN_LDXF(name, ldop, opc2, opc3, type) \ |
3479 | -GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); \ | |
3480 | - \ | |
3481 | 4027 | static void glue(gen_, name##x)(DisasContext *ctx) \ |
3482 | 4028 | { \ |
3483 | 4029 | TCGv EA; \ |
... | ... | @@ -3516,8 +4062,6 @@ GEN_LDFS(lfs, ld32fs, 0x10, PPC_FLOAT); |
3516 | 4062 | |
3517 | 4063 | /*** Floating-point store ***/ |
3518 | 4064 | #define GEN_STF(name, stop, opc, type) \ |
3519 | -GEN_HANDLER(name, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
3520 | - \ | |
3521 | 4065 | static void glue(gen_, name)(DisasContext *ctx) \ |
3522 | 4066 | { \ |
3523 | 4067 | TCGv EA; \ |
... | ... | @@ -3533,8 +4077,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
3533 | 4077 | } |
3534 | 4078 | |
3535 | 4079 | #define GEN_STUF(name, stop, opc, type) \ |
3536 | -GEN_HANDLER(name##u, opc, 0xFF, 0xFF, 0x00000000, type); \ | |
3537 | - \ | |
3538 | 4080 | static void glue(gen_, name##u)(DisasContext *ctx) \ |
3539 | 4081 | { \ |
3540 | 4082 | TCGv EA; \ |
... | ... | @@ -3555,8 +4097,6 @@ static void glue(gen_, name##u)(DisasContext *ctx) |
3555 | 4097 | } |
3556 | 4098 | |
3557 | 4099 | #define GEN_STUXF(name, stop, opc, type) \ |
3558 | -GEN_HANDLER(name##ux, 0x1F, 0x17, opc, 0x00000001, type); \ | |
3559 | - \ | |
3560 | 4100 | static void glue(gen_, name##ux)(DisasContext *ctx) \ |
3561 | 4101 | { \ |
3562 | 4102 | TCGv EA; \ |
... | ... | @@ -3577,8 +4117,6 @@ static void glue(gen_, name##ux)(DisasContext *ctx) |
3577 | 4117 | } |
3578 | 4118 | |
3579 | 4119 | #define GEN_STXF(name, stop, opc2, opc3, type) \ |
3580 | -GEN_HANDLER(name##x, 0x1F, opc2, opc3, 0x00000001, type); \ | |
3581 | - \ | |
3582 | 4120 | static void glue(gen_, name##x)(DisasContext *ctx) \ |
3583 | 4121 | { \ |
3584 | 4122 | TCGv EA; \ |
... | ... | @@ -3794,8 +4332,6 @@ static void gen_bclr(DisasContext *ctx) |
3794 | 4332 | |
3795 | 4333 | /*** Condition register logical ***/ |
3796 | 4334 | #define GEN_CRLOGIC(name, tcg_op, opc) \ |
3797 | -GEN_HANDLER(name, 0x13, 0x01, opc, 0x00000001, PPC_INTEGER); \ | |
3798 | - \ | |
3799 | 4335 | static void glue(gen_, name)(DisasContext *ctx) \ |
3800 | 4336 | { \ |
3801 | 4337 | uint8_t bitmask; \ |
... | ... | @@ -5761,8 +6297,6 @@ static always_inline void gen_405_mulladd_insn (DisasContext *ctx, |
5761 | 6297 | } |
5762 | 6298 | |
5763 | 6299 | #define GEN_MAC_HANDLER(name, opc2, opc3) \ |
5764 | -GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_405_MAC); \ | |
5765 | - \ | |
5766 | 6300 | static void glue(gen_, name)(DisasContext *ctx) \ |
5767 | 6301 | { \ |
5768 | 6302 | gen_405_mulladd_insn(ctx, opc2, opc3, rA(ctx->opcode), rB(ctx->opcode), \ |
... | ... | @@ -6331,8 +6865,6 @@ static always_inline TCGv_ptr gen_avr_ptr(int reg) |
6331 | 6865 | } |
6332 | 6866 | |
6333 | 6867 | #define GEN_VR_LDX(name, opc2, opc3) \ |
6334 | -GEN_HANDLER(name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); \ | |
6335 | - \ | |
6336 | 6868 | static void glue(gen_, name)(DisasContext *ctx) \ |
6337 | 6869 | { \ |
6338 | 6870 | TCGv EA; \ |
... | ... | @@ -6357,8 +6889,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
6357 | 6889 | } |
6358 | 6890 | |
6359 | 6891 | #define GEN_VR_STX(name, opc2, opc3) \ |
6360 | -GEN_HANDLER(st##name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); \ | |
6361 | - \ | |
6362 | 6892 | static void gen_st##name(DisasContext *ctx) \ |
6363 | 6893 | { \ |
6364 | 6894 | TCGv EA; \ |
... | ... | @@ -6383,8 +6913,6 @@ static void gen_st##name(DisasContext *ctx) \ |
6383 | 6913 | } |
6384 | 6914 | |
6385 | 6915 | #define GEN_VR_LVE(name, opc2, opc3) \ |
6386 | - GEN_HANDLER(lve##name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); \ | |
6387 | - \ | |
6388 | 6916 | static void gen_lve##name(DisasContext *ctx) \ |
6389 | 6917 | { \ |
6390 | 6918 | TCGv EA; \ |
... | ... | @@ -6403,8 +6931,6 @@ static void gen_lve##name(DisasContext *ctx) \ |
6403 | 6931 | } |
6404 | 6932 | |
6405 | 6933 | #define GEN_VR_STVE(name, opc2, opc3) \ |
6406 | - GEN_HANDLER(stve##name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC); \ | |
6407 | - \ | |
6408 | 6934 | static void gen_stve##name(DisasContext *ctx) \ |
6409 | 6935 | { \ |
6410 | 6936 | TCGv EA; \ |
... | ... | @@ -6498,8 +7024,6 @@ static void gen_mtvscr(DisasContext *ctx) |
6498 | 7024 | |
6499 | 7025 | /* Logical operations */ |
6500 | 7026 | #define GEN_VX_LOGICAL(name, tcg_op, opc2, opc3) \ |
6501 | -GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); \ | |
6502 | - \ | |
6503 | 7027 | static void glue(gen_, name)(DisasContext *ctx) \ |
6504 | 7028 | { \ |
6505 | 7029 | if (unlikely(!ctx->altivec_enabled)) { \ |
... | ... | @@ -6517,8 +7041,6 @@ GEN_VX_LOGICAL(vxor, tcg_gen_xor_i64, 2, 19); |
6517 | 7041 | GEN_VX_LOGICAL(vnor, tcg_gen_nor_i64, 2, 20); |
6518 | 7042 | |
6519 | 7043 | #define GEN_VXFORM(name, opc2, opc3) \ |
6520 | -GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); \ | |
6521 | - \ | |
6522 | 7044 | static void glue(gen_, name)(DisasContext *ctx) \ |
6523 | 7045 | { \ |
6524 | 7046 | TCGv_ptr ra, rb, rd; \ |
... | ... | @@ -6623,8 +7145,6 @@ GEN_VXFORM(vmaxfp, 5, 16); |
6623 | 7145 | GEN_VXFORM(vminfp, 5, 17); |
6624 | 7146 | |
6625 | 7147 | #define GEN_VXRFORM1(opname, name, str, opc2, opc3) \ |
6626 | - GEN_HANDLER2(name, str, 0x4, opc2, opc3, 0x00000000, PPC_ALTIVEC); \ | |
6627 | - \ | |
6628 | 7148 | static void glue(gen_, name)(DisasContext *ctx) \ |
6629 | 7149 | { \ |
6630 | 7150 | TCGv_ptr ra, rb, rd; \ |
... | ... | @@ -6660,8 +7180,6 @@ GEN_VXRFORM(vcmpgtfp, 3, 11) |
6660 | 7180 | GEN_VXRFORM(vcmpbfp, 3, 15) |
6661 | 7181 | |
6662 | 7182 | #define GEN_VXFORM_SIMM(name, opc2, opc3) \ |
6663 | - GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); \ | |
6664 | - \ | |
6665 | 7183 | static void glue(gen_, name)(DisasContext *ctx) \ |
6666 | 7184 | { \ |
6667 | 7185 | TCGv_ptr rd; \ |
... | ... | @@ -6682,8 +7200,6 @@ GEN_VXFORM_SIMM(vspltish, 6, 13); |
6682 | 7200 | GEN_VXFORM_SIMM(vspltisw, 6, 14); |
6683 | 7201 | |
6684 | 7202 | #define GEN_VXFORM_NOA(name, opc2, opc3) \ |
6685 | - GEN_HANDLER(name, 0x04, opc2, opc3, 0x001f0000, PPC_ALTIVEC); \ | |
6686 | - \ | |
6687 | 7203 | static void glue(gen_, name)(DisasContext *ctx) \ |
6688 | 7204 | { \ |
6689 | 7205 | TCGv_ptr rb, rd; \ |
... | ... | @@ -6713,8 +7229,6 @@ GEN_VXFORM_NOA(vrfip, 5, 10); |
6713 | 7229 | GEN_VXFORM_NOA(vrfiz, 5, 11); |
6714 | 7230 | |
6715 | 7231 | #define GEN_VXFORM_SIMM(name, opc2, opc3) \ |
6716 | - GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); \ | |
6717 | - \ | |
6718 | 7232 | static void glue(gen_, name)(DisasContext *ctx) \ |
6719 | 7233 | { \ |
6720 | 7234 | TCGv_ptr rd; \ |
... | ... | @@ -6731,8 +7245,6 @@ static void glue(gen_, name)(DisasContext *ctx) |
6731 | 7245 | } |
6732 | 7246 | |
6733 | 7247 | #define GEN_VXFORM_UIMM(name, opc2, opc3) \ |
6734 | - GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC); \ | |
6735 | - \ | |
6736 | 7248 | static void glue(gen_, name)(DisasContext *ctx) \ |
6737 | 7249 | { \ |
6738 | 7250 | TCGv_ptr rb, rd; \ |
... | ... | @@ -6778,8 +7290,6 @@ static void gen_vsldoi(DisasContext *ctx) |
6778 | 7290 | } |
6779 | 7291 | |
6780 | 7292 | #define GEN_VAFORM_PAIRED(name0, name1, opc2) \ |
6781 | - GEN_HANDLER(name0##_##name1, 0x04, opc2, 0xFF, 0x00000000, PPC_ALTIVEC);\ | |
6782 | - \ | |
6783 | 7293 | static void glue(gen_, name0##_##name1)(DisasContext *ctx) \ |
6784 | 7294 | { \ |
6785 | 7295 | TCGv_ptr ra, rb, rc, rd; \ |
... | ... | @@ -6852,8 +7362,6 @@ static always_inline void gen_store_gpr64(int reg, TCGv_i64 t) { |
6852 | 7362 | } |
6853 | 7363 | |
6854 | 7364 | #define GEN_SPE(name0, name1, opc2, opc3, inval, type) \ |
6855 | -GEN_HANDLER(name0##_##name1, 0x04, opc2, opc3, inval, type); \ | |
6856 | - \ | |
6857 | 7365 | static void glue(gen_, name0##_##name1)(DisasContext *ctx) \ |
6858 | 7366 | { \ |
6859 | 7367 | if (Rc(ctx->opcode)) \ |
... | ... | @@ -7754,8 +8262,6 @@ static always_inline void gen_op_evstwwo(DisasContext *ctx, TCGv addr) |
7754 | 8262 | } |
7755 | 8263 | |
7756 | 8264 | #define GEN_SPEOP_LDST(name, opc2, sh) \ |
7757 | -GEN_HANDLER(name, 0x04, opc2, 0x0C, 0x00000000, PPC_SPE); \ | |
7758 | - \ | |
7759 | 8265 | static void glue(gen_, name)(DisasContext *ctx) \ |
7760 | 8266 | { \ |
7761 | 8267 | TCGv t0; \ |
... | ... | @@ -8297,9 +8803,6 @@ GEN_SPE(efdctsiz, speundef, 0x1D, 0x0B, 0x00180000, PPC_SPE_DOUBLE); |
8297 | 8803 | GEN_SPE(efdtstgt, efdtstlt, 0x1E, 0x0B, 0x00600000, PPC_SPE_DOUBLE); // |
8298 | 8804 | GEN_SPE(efdtsteq, speundef, 0x1F, 0x0B, 0x00600000, PPC_SPE_DOUBLE); // |
8299 | 8805 | |
8300 | -/* End opcode list */ | |
8301 | -GEN_OPCODE_MARK(end); | |
8302 | - | |
8303 | 8806 | #include "translate_init.c" |
8304 | 8807 | #include "helper_regs.h" |
8305 | 8808 | ... | ... |