diff options
author | Matt Turner <[email protected]> | 2013-11-25 15:37:18 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-12-04 20:05:43 -0800 |
commit | 942151af300e067f72572cd8785fa3526132570c (patch) | |
tree | 50f11937bd3be3ad6eea746f5ff0d345e2b2b319 | |
parent | 0e4053234df5e3461e80c90dfd743c3ac96006eb (diff) |
i965/fs: Print ARF registers properly in dump_instruction().
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b59ab82c2ae..c21239f0528 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2858,7 +2858,29 @@ fs_visitor::dump_instruction(backend_instruction *be_inst) printf("***u%d***", inst->dst.reg); break; case HW_REG: - printf("hw_reg%d", inst->dst.fixed_hw_reg.nr); + if (inst->dst.fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE) { + switch (inst->dst.fixed_hw_reg.nr) { + case BRW_ARF_NULL: + printf("null"); + break; + case BRW_ARF_ADDRESS: + printf("a0.%d", inst->dst.fixed_hw_reg.subnr); + break; + case BRW_ARF_ACCUMULATOR: + printf("acc%d", inst->dst.fixed_hw_reg.subnr); + break; + case BRW_ARF_FLAG: + printf("f%d.%d", inst->dst.fixed_hw_reg.nr & 0xf, + inst->dst.fixed_hw_reg.subnr); + break; + default: + printf("arf%d.%d", inst->dst.fixed_hw_reg.nr & 0xf, + inst->dst.fixed_hw_reg.subnr); + break; + } + } else { + printf("hw_reg%d", inst->dst.fixed_hw_reg.nr); + } if (inst->dst.fixed_hw_reg.subnr) printf("+%d", inst->dst.fixed_hw_reg.subnr); break; @@ -2911,7 +2933,29 @@ fs_visitor::dump_instruction(backend_instruction *be_inst) printf("-"); if (inst->src[i].fixed_hw_reg.abs) printf("|"); - printf("hw_reg%d", inst->src[i].fixed_hw_reg.nr); + if (inst->src[i].fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE) { + switch (inst->src[i].fixed_hw_reg.nr) { + case BRW_ARF_NULL: + printf("null"); + break; + case BRW_ARF_ADDRESS: + printf("a0.%d", inst->src[i].fixed_hw_reg.subnr); + break; + case BRW_ARF_ACCUMULATOR: + printf("acc%d", inst->src[i].fixed_hw_reg.subnr); + break; + case BRW_ARF_FLAG: + printf("f%d.%d", inst->src[i].fixed_hw_reg.nr & 0xf, + inst->src[i].fixed_hw_reg.subnr); + break; + default: + printf("arf%d.%d", inst->src[i].fixed_hw_reg.nr & 0xf, + inst->src[i].fixed_hw_reg.subnr); + break; + } + } else { + printf("hw_reg%d", inst->src[i].fixed_hw_reg.nr); + } if (inst->src[i].fixed_hw_reg.subnr) printf("+%d", inst->src[i].fixed_hw_reg.subnr); if (inst->src[i].fixed_hw_reg.abs) |