summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-08-02 12:05:34 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-08-23 13:54:55 +0200
commit438177aa190d4ee99e2230f1fcc5df1df59e21f4 (patch)
tree080ad8d174f6e8aba6f48486ee267d06adf4695a
parent2f7c55c23f5fabde3dd1d4c6b85850cfe0132b73 (diff)
gallium: use tgsi_get_opcode_name instead of tgsi_opcode_info::mnemonic
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sanity.c6
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c5
5 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
index ebd4fe5f6a..d7e92aa838 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
@@ -531,7 +531,7 @@ lp_build_tgsi_llvm(
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;
}
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
index b76c065e32..2529c6a8bf 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
@@ -956,7 +956,7 @@ lp_build_tgsi_aos(struct gallivm_state *gallivm,
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) {
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index b58e64511c..f6c85390e9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -578,7 +578,7 @@ iter_instruction(
TXT( " " );
ctx->indent += info->post_indent;
- TXT( info->mnemonic );
+ TXT( tgsi_get_opcode_name(inst->Instruction.Opcode) );
if (inst->Instruction.Saturate) {
TXT( "_SAT" );
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index a95bbfa988..2c9ad99333 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -326,10 +326,12 @@ iter_instruction(
}
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.
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 4cb67c5f06..02241a66bf 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1003,16 +1003,17 @@ match_inst(const char **pcur,
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;