Lines Matching refs:instr
81 struct rogue_instr *instr;
85 instr = rzalloc_size(mem_ctx, sizeof(*instr));
86 if (!instr)
89 instr->opcode = opcode;
90 instr->num_operands = rogue_instr_num_operands(opcode);
93 if (instr->num_operands) {
94 instr->operands = rzalloc_array_size(instr,
95 sizeof(*instr->operands),
96 instr->num_operands);
97 if (!instr->operands) {
98 ralloc_free(instr);
103 return instr;
109 * \param[in] instr The instruction.
113 bool rogue_instr_set_flag(struct rogue_instr *instr, enum rogue_instr_flag flag)
115 instr->flags = ROH(flag);
123 * \param[in] instr The instruction.
128 bool rogue_instr_set_operand_imm(struct rogue_instr *instr,
132 ASSERT_INSTR_OPERAND_INDEX(instr, index);
134 instr->operands[index].type = ROGUE_OPERAND_TYPE_IMMEDIATE;
135 instr->operands[index].immediate.value = value;
143 * \param[in] instr The instruction.
148 bool rogue_instr_set_operand_drc(struct rogue_instr *instr,
152 ASSERT_INSTR_OPERAND_INDEX(instr, index);
154 instr->operands[index].type = ROGUE_OPERAND_TYPE_DRC;
155 instr->operands[index].drc.number = number;
163 * \param[in] instr The instruction.
169 bool rogue_instr_set_operand_reg(struct rogue_instr *instr,
174 ASSERT_INSTR_OPERAND_INDEX(instr, index);
177 instr->operands[index].type = type;
178 instr->operands[index].reg.number = number;
186 * \param[in] instr The instruction.
191 bool rogue_instr_set_operand_vreg(struct rogue_instr *instr,
195 ASSERT_INSTR_OPERAND_INDEX(instr, index);
197 instr->operands[index].type = ROGUE_OPERAND_TYPE_VREG;
198 instr->operands[index].vreg.number = number;
199 instr->operands[index].vreg.is_vector = false;
208 * \param[in] instr The instruction.
214 bool rogue_instr_set_operand_vreg_vec(struct rogue_instr *instr,
219 ASSERT_INSTR_OPERAND_INDEX(instr, index);
221 instr->operands[index].type = ROGUE_OPERAND_TYPE_VREG;
222 instr->operands[index].vreg.number = number;
223 instr->operands[index].vreg.is_vector = true;
224 instr->operands[index].vreg.component = component;