diff mbox

[54/90] assembler: Fix comparisons between reg.type and Architecture registers

Message ID 1359991705-5254-55-git-send-email-damien.lespiau@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lespiau, Damien Feb. 4, 2013, 3:27 p.m. UTC
Of course the assertion is there to make sure GRF and MRF have a reg.nr
< 128. To exclude ARF registers, reg.file has be checked, not reg.type
(channel type). Most likely a typo never caught.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 assembler/brw_eu_emit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/assembler/brw_eu_emit.c b/assembler/brw_eu_emit.c
index ed24e48..119eb34 100644
--- a/assembler/brw_eu_emit.c
+++ b/assembler/brw_eu_emit.c
@@ -240,7 +240,7 @@  brw_set_src0(struct brw_compile *p, struct brw_instruction *insn,
    struct brw_context *brw = p->brw;
    struct intel_context *intel = &brw->intel;
 
-   if (reg.type != BRW_ARCHITECTURE_REGISTER_FILE)
+   if (reg.file != BRW_ARCHITECTURE_REGISTER_FILE)
       assert(reg.nr < 128);
 
    gen7_convert_mrf_to_grf(p, &reg);
@@ -332,7 +332,7 @@  void brw_set_src1(struct brw_compile *p,
 {
    assert(reg.file != BRW_MESSAGE_REGISTER_FILE);
 
-   if (reg.type != BRW_ARCHITECTURE_REGISTER_FILE)
+   if (reg.file != BRW_ARCHITECTURE_REGISTER_FILE)
       assert(reg.nr < 128);
 
    gen7_convert_mrf_to_grf(p, &reg);