lima/gpir: Fix 64-bit shift in scheduler spilling
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 18 Sep 2019 17:47:28 +0000 (00:47 +0700)
committerConnor Abbott <cwabbott0@gmail.com>
Tue, 24 Sep 2019 06:44:54 +0000 (08:44 +0200)
There are 64 physical registers so the shift must be 64 bits.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/ir/gp/scheduler.c

index e069079591c82cd925cb606783a08decd02ef0ba..bf8bd63e57cbc12fb2d6745b9ca3cc0f13f91235 100644 (file)
@@ -861,12 +861,12 @@ static uint64_t get_available_regs(sched_ctx *ctx, gpir_node *node,
          if (instr->reg0_use_count == 0)
             use_available = ~0ull;
          else if (!instr->reg0_is_attr)
-            use_available = 0xf << (4 * instr->reg0_index);
+            use_available = 0xfull << (4 * instr->reg0_index);
 
          if (instr->reg1_use_count == 0)
             use_available = ~0ull;
          else
-            use_available |= 0xf << (4 * instr->reg1_index);
+            use_available |= 0xfull << (4 * instr->reg1_index);
 
          available &= use_available;
       }