Lines Matching refs:p_insn
653 struct tic30_par_insn p_insn; variable
664 memset (&p_insn, '\0', sizeof (p_insn)); in tic30_parallel_insn()
676 p_insn.tm = p_opcode; in tic30_parallel_insn()
722 p_insn.tm = p_opcode; in tic30_parallel_insn()
723 p_insn.swap_operands = 1; in tic30_parallel_insn()
797 p_insn.operands[found_separator]++; in tic30_parallel_insn()
798 if (p_insn.operands[found_separator] > MAX_OPERANDS) in tic30_parallel_insn()
808 p_insn.operand_type[found_separator][p_insn.operands[found_separator] - 1] = in tic30_parallel_insn()
811 if (!p_insn.operand_type[found_separator][p_insn.operands[found_separator] - 1]) in tic30_parallel_insn()
843 if (p_insn.swap_operands) in tic30_parallel_insn()
848 temp_num = p_insn.operands[0]; in tic30_parallel_insn()
849 p_insn.operands[0] = p_insn.operands[1]; in tic30_parallel_insn()
850 p_insn.operands[1] = temp_num; in tic30_parallel_insn()
853 temp_op = p_insn.operand_type[0][i]; in tic30_parallel_insn()
854 p_insn.operand_type[0][i] = p_insn.operand_type[1][i]; in tic30_parallel_insn()
855 p_insn.operand_type[1][i] = temp_op; in tic30_parallel_insn()
859 if (p_insn.operands[0] != p_insn.tm->operands_1) in tic30_parallel_insn()
865 if (p_insn.operands[1] != p_insn.tm->operands_2) in tic30_parallel_insn()
871 debug ("Number of operands in first insn: %d\n", p_insn.operands[0]); in tic30_parallel_insn()
872 debug ("Number of operands in second insn: %d\n", p_insn.operands[1]); in tic30_parallel_insn()
883 for (i = 0; i < p_insn.operands[count]; i++) in tic30_parallel_insn()
885 if ((p_insn.operand_type[count][i]->op_type & in tic30_parallel_insn()
886 p_insn.tm->operand_types[count][i]) == 0) in tic30_parallel_insn()
898 if ((p_insn.operand_type[count][i]->op_type & Rn) && i < 2) in tic30_parallel_insn()
900 else if ((p_insn.operand_type[count][i]->op_type & Indirect) in tic30_parallel_insn()
906 if ((p_insn.tm->operand_types[0][0] & (Indirect | Rn)) in tic30_parallel_insn()
923 if ((p_insn.operand_type[0][2]->reg.opcode != 0x00) in tic30_parallel_insn()
924 && (p_insn.operand_type[0][2]->reg.opcode != 0x01)) in tic30_parallel_insn()
930 if ((p_insn.operand_type[1][2]->reg.opcode != 0x02) in tic30_parallel_insn()
931 && (p_insn.operand_type[1][2]->reg.opcode != 0x03)) in tic30_parallel_insn()
938 if (p_insn.operand_type[0][0]->op_type & Indirect) in tic30_parallel_insn()
940 if (p_insn.operand_type[0][1]->op_type & Indirect) in tic30_parallel_insn()
941 p_insn.p_field = 0x00000000; /* Ind * Ind, Rn +/- Rn. */ in tic30_parallel_insn()
942 else if (p_insn.operand_type[1][0]->op_type & Indirect) in tic30_parallel_insn()
943 p_insn.p_field = 0x01000000; /* Ind * Rn, Ind +/- Rn. */ in tic30_parallel_insn()
945 p_insn.p_field = 0x03000000; /* Ind * Rn, Rn +/- Ind. */ in tic30_parallel_insn()
949 if (p_insn.operand_type[0][1]->op_type & Rn) in tic30_parallel_insn()
950 p_insn.p_field = 0x02000000; /* Rn * Rn, Ind +/- Ind. */ in tic30_parallel_insn()
951 else if (p_insn.operand_type[1][0]->op_type & Indirect) in tic30_parallel_insn()
954 p_insn.p_field = 0x01000000; /* Rn * Ind, Ind +/- Rn. */ in tic30_parallel_insn()
958 temp = p_insn.operand_type[0][0]; in tic30_parallel_insn()
959 p_insn.operand_type[0][0] = p_insn.operand_type[0][1]; in tic30_parallel_insn()
960 p_insn.operand_type[0][1] = temp; in tic30_parallel_insn()
965 p_insn.p_field = 0x03000000; /* Rn * Ind, Rn +/- Ind. */ in tic30_parallel_insn()
966 temp = p_insn.operand_type[0][0]; in tic30_parallel_insn()
967 p_insn.operand_type[0][0] = p_insn.operand_type[0][1]; in tic30_parallel_insn()
968 p_insn.operand_type[0][1] = temp; in tic30_parallel_insn()
974 debug ("P field: %08X\n", p_insn.p_field); in tic30_parallel_insn()
979 p_insn.opcode = p_insn.tm->base_opcode; in tic30_parallel_insn()
981 switch (p_insn.tm->oporder) in tic30_parallel_insn()
984 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum); in tic30_parallel_insn()
985 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 3); in tic30_parallel_insn()
986 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8); in tic30_parallel_insn()
987 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11); in tic30_parallel_insn()
988 p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16); in tic30_parallel_insn()
989 p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 22); in tic30_parallel_insn()
993 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum); in tic30_parallel_insn()
994 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 3); in tic30_parallel_insn()
995 p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.ARnum << 8); in tic30_parallel_insn()
996 p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.mod << 11); in tic30_parallel_insn()
997 p_insn.opcode |= (p_insn.operand_type[1][1]->reg.opcode << 19); in tic30_parallel_insn()
998 p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 22); in tic30_parallel_insn()
999 if (p_insn.operand_type[1][1]->reg.opcode == p_insn.operand_type[0][1]->reg.opcode) in tic30_parallel_insn()
1004 p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.ARnum); in tic30_parallel_insn()
1005 p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.mod << 3); in tic30_parallel_insn()
1006 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8); in tic30_parallel_insn()
1007 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11); in tic30_parallel_insn()
1008 p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16); in tic30_parallel_insn()
1009 p_insn.opcode |= (p_insn.operand_type[0][0]->reg.opcode << 22); in tic30_parallel_insn()
1013 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum); in tic30_parallel_insn()
1014 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 3); in tic30_parallel_insn()
1015 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8); in tic30_parallel_insn()
1016 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11); in tic30_parallel_insn()
1017 p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16); in tic30_parallel_insn()
1018 p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 19); in tic30_parallel_insn()
1019 p_insn.opcode |= (p_insn.operand_type[0][2]->reg.opcode << 22); in tic30_parallel_insn()
1023 p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.ARnum); in tic30_parallel_insn()
1024 p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.mod << 3); in tic30_parallel_insn()
1025 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8); in tic30_parallel_insn()
1026 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11); in tic30_parallel_insn()
1027 p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16); in tic30_parallel_insn()
1028 p_insn.opcode |= (p_insn.operand_type[0][0]->reg.opcode << 19); in tic30_parallel_insn()
1029 p_insn.opcode |= (p_insn.operand_type[0][2]->reg.opcode << 22); in tic30_parallel_insn()
1033 p_insn.opcode |= p_insn.p_field; in tic30_parallel_insn()
1034 if (p_insn.operand_type[0][2]->reg.opcode == 0x01) in tic30_parallel_insn()
1035 p_insn.opcode |= 0x00800000; in tic30_parallel_insn()
1036 if (p_insn.operand_type[1][2]->reg.opcode == 0x03) in tic30_parallel_insn()
1037 p_insn.opcode |= 0x00400000; in tic30_parallel_insn()
1039 switch (p_insn.p_field) in tic30_parallel_insn()
1042 p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.ARnum); in tic30_parallel_insn()
1043 p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.mod << 3); in tic30_parallel_insn()
1044 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum << 8); in tic30_parallel_insn()
1045 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 11); in tic30_parallel_insn()
1046 p_insn.opcode |= (p_insn.operand_type[1][1]->reg.opcode << 16); in tic30_parallel_insn()
1047 p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 19); in tic30_parallel_insn()
1050 p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.ARnum); in tic30_parallel_insn()
1051 p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.mod << 3); in tic30_parallel_insn()
1052 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum << 8); in tic30_parallel_insn()
1053 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 11); in tic30_parallel_insn()
1054 p_insn.opcode |= (p_insn.operand_type[1][1]->reg.opcode << 16); in tic30_parallel_insn()
1055 p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 19); in tic30_parallel_insn()
1058 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum); in tic30_parallel_insn()
1059 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 3); in tic30_parallel_insn()
1060 p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.ARnum << 8); in tic30_parallel_insn()
1061 p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.mod << 11); in tic30_parallel_insn()
1062 p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 16); in tic30_parallel_insn()
1063 p_insn.opcode |= (p_insn.operand_type[0][0]->reg.opcode << 19); in tic30_parallel_insn()
1066 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum); in tic30_parallel_insn()
1067 p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 3); in tic30_parallel_insn()
1068 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum << 8); in tic30_parallel_insn()
1069 p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 11); in tic30_parallel_insn()
1070 p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16); in tic30_parallel_insn()
1071 p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 19); in tic30_parallel_insn()
1081 md_number_to_chars (p, (valueT) p_insn.opcode, INSN_SIZE); in tic30_parallel_insn()
1088 for (j = 0; j < p_insn.operands[i]; j++) in tic30_parallel_insn()
1089 free (p_insn.operand_type[i][j]); in tic30_parallel_insn()
1092 debug ("Final opcode: %08X\n", p_insn.opcode); in tic30_parallel_insn()