diff --git a/src/evergreen_state.h b/src/evergreen_state.h index 40fec22..1d044fa 100644 --- a/src/evergreen_state.h +++ b/src/evergreen_state.h @@ -256,25 +256,25 @@ do { \ /* If register falls in a special area, special commands are issued */ #define PACK0(reg, num) \ do { \ - if ((reg) >= SET_CONFIG_REG_offset && (reg) < SET_CONFIG_REG_end) { \ + if ((int)(reg) >= SET_CONFIG_REG_offset && (int)(reg) < SET_CONFIG_REG_end) { \ PACK3(IT_SET_CONFIG_REG, (num) + 1); \ E32(((reg) - SET_CONFIG_REG_offset) >> 2); \ - } else if ((reg) >= SET_CONTEXT_REG_offset && (reg) < SET_CONTEXT_REG_end) { \ + } else if ((int)(reg) >= SET_CONTEXT_REG_offset && (int)(reg) < SET_CONTEXT_REG_end) { \ PACK3(IT_SET_CONTEXT_REG, (num) + 1); \ E32(((reg) - SET_CONTEXT_REG_offset) >> 2); \ - } else if ((reg) >= SET_RESOURCE_offset && (reg) < SET_RESOURCE_end) { \ + } else if ((int)(reg) >= SET_RESOURCE_offset && (int)(reg) < SET_RESOURCE_end) { \ PACK3(IT_SET_RESOURCE, num + 1); \ E32(((reg) - SET_RESOURCE_offset) >> 2); \ - } else if ((reg) >= SET_SAMPLER_offset && (reg) < SET_SAMPLER_end) { \ + } else if ((int)(reg) >= SET_SAMPLER_offset && (int)(reg) < SET_SAMPLER_end) { \ PACK3(IT_SET_SAMPLER, (num) + 1); \ E32((reg - SET_SAMPLER_offset) >> 2); \ - } else if ((reg) >= SET_CTL_CONST_offset && (reg) < SET_CTL_CONST_end) { \ + } else if ((int)(reg) >= SET_CTL_CONST_offset && (int)(reg) < SET_CTL_CONST_end) { \ PACK3(IT_SET_CTL_CONST, (num) + 1); \ E32(((reg) - SET_CTL_CONST_offset) >> 2); \ - } else if ((reg) >= SET_LOOP_CONST_offset && (reg) < SET_LOOP_CONST_end) { \ + } else if ((int)(reg) >= SET_LOOP_CONST_offset && (int)(reg) < SET_LOOP_CONST_end) { \ PACK3(IT_SET_LOOP_CONST, (num) + 1); \ E32(((reg) - SET_LOOP_CONST_offset) >> 2); \ - } else if ((reg) >= SET_BOOL_CONST_offset && (reg) < SET_BOOL_CONST_end) { \ + } else if ((int)(reg) >= SET_BOOL_CONST_offset && (int)(reg) < SET_BOOL_CONST_end) { \ PACK3(IT_SET_BOOL_CONST, (num) + 1); \ E32(((reg) - SET_BOOL_CONST_offset) >> 2); \ } else { \ diff --git a/src/r600_state.h b/src/r600_state.h index d5785cd..95e92d3 100644 --- a/src/r600_state.h +++ b/src/r600_state.h @@ -240,28 +240,28 @@ do { \ /* If register falls in a special area, special commands are issued */ #define PACK0(ib, reg, num) \ do { \ - if ((reg) >= SET_CONFIG_REG_offset && (reg) < SET_CONFIG_REG_end) { \ + if ((int)(reg) >= SET_CONFIG_REG_offset && (int)(reg) < SET_CONFIG_REG_end) { \ PACK3((ib), IT_SET_CONFIG_REG, (num) + 1); \ E32((ib), ((reg) - SET_CONFIG_REG_offset) >> 2); \ - } else if ((reg) >= SET_CONTEXT_REG_offset && (reg) < SET_CONTEXT_REG_end) { \ + } else if ((int)(reg) >= SET_CONTEXT_REG_offset && (int)(reg) < SET_CONTEXT_REG_end) { \ PACK3((ib), IT_SET_CONTEXT_REG, (num) + 1); \ E32((ib), ((reg) - SET_CONTEXT_REG_offset) >> 2); \ - } else if ((reg) >= SET_ALU_CONST_offset && (reg) < SET_ALU_CONST_end) { \ + } else if ((int)(reg) >= SET_ALU_CONST_offset && (int)(reg) < SET_ALU_CONST_end) { \ PACK3((ib), IT_SET_ALU_CONST, (num) + 1); \ E32((ib), ((reg) - SET_ALU_CONST_offset) >> 2); \ - } else if ((reg) >= SET_RESOURCE_offset && (reg) < SET_RESOURCE_end) { \ + } else if ((int)(reg) >= SET_RESOURCE_offset && (int)(reg) < SET_RESOURCE_end) { \ PACK3((ib), IT_SET_RESOURCE, num + 1); \ E32((ib), ((reg) - SET_RESOURCE_offset) >> 2); \ - } else if ((reg) >= SET_SAMPLER_offset && (reg) < SET_SAMPLER_end) { \ + } else if ((int)(reg) >= SET_SAMPLER_offset && (int)(reg) < SET_SAMPLER_end) { \ PACK3((ib), IT_SET_SAMPLER, (num) + 1); \ E32((ib), (reg - SET_SAMPLER_offset) >> 2); \ - } else if ((reg) >= SET_CTL_CONST_offset && (reg) < SET_CTL_CONST_end) { \ + } else if ((int)(reg) >= SET_CTL_CONST_offset && (int)(reg) < SET_CTL_CONST_end) { \ PACK3((ib), IT_SET_CTL_CONST, (num) + 1); \ E32((ib), ((reg) - SET_CTL_CONST_offset) >> 2); \ - } else if ((reg) >= SET_LOOP_CONST_offset && (reg) < SET_LOOP_CONST_end) { \ + } else if ((int)(reg) >= SET_LOOP_CONST_offset && (int)(reg) < SET_LOOP_CONST_end) { \ PACK3((ib), IT_SET_LOOP_CONST, (num) + 1); \ E32((ib), ((reg) - SET_LOOP_CONST_offset) >> 2); \ - } else if ((reg) >= SET_BOOL_CONST_offset && (reg) < SET_BOOL_CONST_end) { \ + } else if ((int)(reg) >= SET_BOOL_CONST_offset && (int)(reg) < SET_BOOL_CONST_end) { \ PACK3((ib), IT_SET_BOOL_CONST, (num) + 1); \ E32((ib), ((reg) - SET_BOOL_CONST_offset) >> 2); \ } else { \