tgsi_get_opcode_info(instr->Instruction.Opcode);
if (!lp_build_tgsi_inst_llvm(bld_base, instr)) {
_debug_printf("warning: failed to translate tgsi opcode %s to LLVM\n",
- opcode_info->mnemonic);
+ tgsi_get_opcode_name(instr->Instruction.Opcode));
return FALSE;
}
}
tgsi_get_opcode_info(instr->Instruction.Opcode);
if (!lp_emit_instruction_aos(&bld, instr, opcode_info, &pc))
_debug_printf("warning: failed to translate tgsi opcode %s to LLVM\n",
- opcode_info->mnemonic);
+ tgsi_get_opcode_name(instr->Instruction.Opcode));
}
if (0) {
TXT( " " );
ctx->indent += info->post_indent;
- TXT( info->mnemonic );
+ TXT( tgsi_get_opcode_name(inst->Instruction.Opcode) );
if (inst->Instruction.Saturate) {
TXT( "_SAT" );
}
if (info->num_dst != inst->Instruction.NumDstRegs) {
- report_error( ctx, "%s: Invalid number of destination operands, should be %u", info->mnemonic, info->num_dst );
+ report_error( ctx, "%s: Invalid number of destination operands, should be %u",
+ tgsi_get_opcode_name(inst->Instruction.Opcode), info->num_dst );
}
if (info->num_src != inst->Instruction.NumSrcRegs) {
- report_error( ctx, "%s: Invalid number of source operands, should be %u", info->mnemonic, info->num_src );
+ report_error( ctx, "%s: Invalid number of source operands, should be %u",
+ tgsi_get_opcode_name(inst->Instruction.Opcode), info->num_src );
}
/* Check destination and source registers' validity.
const struct tgsi_opcode_info *info)
{
const char *cur = *pcur;
+ const char *mnemonic = tgsi_get_opcode_name(info->opcode);
/* simple case: the whole string matches the instruction name */
- if (str_match_nocase_whole(&cur, info->mnemonic)) {
+ if (str_match_nocase_whole(&cur, mnemonic)) {
*pcur = cur;
*saturate = 0;
*precise = 0;
return TRUE;
}
- if (str_match_no_case(&cur, info->mnemonic)) {
+ if (str_match_no_case(&cur, mnemonic)) {
/* the instruction has a suffix, figure it out */
if (str_match_no_case(&cur, "_SAT")) {
*pcur = cur;