summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r700_sq.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r600/r700_sq.h')
-rw-r--r--src/gallium/drivers/r600/r700_sq.h246
1 files changed, 123 insertions, 123 deletions
diff --git a/src/gallium/drivers/r600/r700_sq.h b/src/gallium/drivers/r600/r700_sq.h
index fa1387bf835..d881012264d 100644
--- a/src/gallium/drivers/r600/r700_sq.h
+++ b/src/gallium/drivers/r600/r700_sq.h
@@ -27,219 +27,219 @@
#define R700_SQ_H
#define P_SQ_CF_WORD0
-#define S_SQ_CF_WORD0_ADDR(x) (((x) & 0xFFFFFFFF) << 0)
+#define S_SQ_CF_WORD0_ADDR(x) (((unsigned)(x) & 0xFFFFFFFF) << 0)
#define G_SQ_CF_WORD0_ADDR(x) (((x) >> 0) & 0xFFFFFFFF)
#define C_SQ_CF_WORD0_ADDR 0x00000000
#define P_SQ_CF_WORD1
-#define S_SQ_CF_WORD1_POP_COUNT(x) (((x) & 0x7) << 0)
+#define S_SQ_CF_WORD1_POP_COUNT(x) (((unsigned)(x) & 0x7) << 0)
#define G_SQ_CF_WORD1_POP_COUNT(x) (((x) >> 0) & 0x7)
#define C_SQ_CF_WORD1_POP_COUNT 0xFFFFFFF8
-#define S_SQ_CF_WORD1_CF_CONST(x) (((x) & 0x1F) << 3)
+#define S_SQ_CF_WORD1_CF_CONST(x) (((unsigned)(x) & 0x1F) << 3)
#define G_SQ_CF_WORD1_CF_CONST(x) (((x) >> 3) & 0x1F)
#define C_SQ_CF_WORD1_CF_CONST 0xFFFFFF07
-#define S_SQ_CF_WORD1_COND(x) (((x) & 0x3) << 8)
+#define S_SQ_CF_WORD1_COND(x) (((unsigned)(x) & 0x3) << 8)
#define G_SQ_CF_WORD1_COND(x) (((x) >> 8) & 0x3)
#define C_SQ_CF_WORD1_COND 0xFFFFFCFF
-#define S_SQ_CF_WORD1_COUNT(x) (((x) & 0x7) << 10)
+#define S_SQ_CF_WORD1_COUNT(x) (((unsigned)(x) & 0x7) << 10)
#define G_SQ_CF_WORD1_COUNT(x) (((x) >> 10) & 0x7)
#define C_SQ_CF_WORD1_COUNT 0xFFFFE3FF
-#define S_SQ_CF_WORD1_CALL_COUNT(x) (((x) & 0x3F) << 13)
+#define S_SQ_CF_WORD1_CALL_COUNT(x) (((unsigned)(x) & 0x3F) << 13)
#define G_SQ_CF_WORD1_CALL_COUNT(x) (((x) >> 13) & 0x3F)
#define C_SQ_CF_WORD1_CALL_COUNT 0xFFF81FFF
-#define S_SQ_CF_WORD1_END_OF_PROGRAM(x) (((x) & 0x1) << 21)
+#define S_SQ_CF_WORD1_END_OF_PROGRAM(x) (((unsigned)(x) & 0x1) << 21)
#define G_SQ_CF_WORD1_END_OF_PROGRAM(x) (((x) >> 21) & 0x1)
#define C_SQ_CF_WORD1_END_OF_PROGRAM 0xFFDFFFFF
-#define S_SQ_CF_WORD1_VALID_PIXEL_MODE(x) (((x) & 0x1) << 22)
+#define S_SQ_CF_WORD1_VALID_PIXEL_MODE(x) (((unsigned)(x) & 0x1) << 22)
#define G_SQ_CF_WORD1_VALID_PIXEL_MODE(x) (((x) >> 22) & 0x1)
#define C_SQ_CF_WORD1_VALID_PIXEL_MODE 0xFFBFFFFF
-#define S_SQ_CF_WORD1_CF_INST(x) (((x) & 0x7F) << 23)
+#define S_SQ_CF_WORD1_CF_INST(x) (((unsigned)(x) & 0x7F) << 23)
#define G_SQ_CF_WORD1_CF_INST(x) (((x) >> 23) & 0x7F)
#define C_SQ_CF_WORD1_CF_INST 0xC07FFFFF
-#define S_SQ_CF_WORD1_WHOLE_QUAD_MODE(x) (((x) & 0x1) << 30)
+#define S_SQ_CF_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30)
#define G_SQ_CF_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1)
#define C_SQ_CF_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF
-#define S_SQ_CF_WORD1_BARRIER(x) (((x) & 0x1) << 31)
+#define S_SQ_CF_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31)
#define G_SQ_CF_WORD1_BARRIER(x) (((x) >> 31) & 0x1)
#define C_SQ_CF_WORD1_BARRIER 0x7FFFFFFF
-#define S_SQ_CF_WORD1_COUNT_3(x) (((x) & 0x1) << 19)
+#define S_SQ_CF_WORD1_COUNT_3(x) (((unsigned)(x) & 0x1) << 19)
#define G_SQ_CF_WORD1_COUNT_3(x) (((x) >> 19) & 0x1)
#define C_SQ_CF_WORD1_COUNT_3 0xFFF7FFFF
#define P_SQ_CF_ALU_WORD0
-#define S_SQ_CF_ALU_WORD0_ADDR(x) (((x) & 0x3FFFFF) << 0)
+#define S_SQ_CF_ALU_WORD0_ADDR(x) (((unsigned)(x) & 0x3FFFFF) << 0)
#define G_SQ_CF_ALU_WORD0_ADDR(x) (((x) >> 0) & 0x3FFFFF)
#define C_SQ_CF_ALU_WORD0_ADDR 0xFFC00000
-#define S_SQ_CF_ALU_WORD0_KCACHE_BANK0(x) (((x) & 0xF) << 22)
+#define S_SQ_CF_ALU_WORD0_KCACHE_BANK0(x) (((unsigned)(x) & 0xF) << 22)
#define G_SQ_CF_ALU_WORD0_KCACHE_BANK0(x) (((x) >> 22) & 0xF)
#define C_SQ_CF_ALU_WORD0_KCACHE_BANK0 0xFC3FFFFF
-#define S_SQ_CF_ALU_WORD0_KCACHE_BANK1(x) (((x) & 0xF) << 26)
+#define S_SQ_CF_ALU_WORD0_KCACHE_BANK1(x) (((unsigned)(x) & 0xF) << 26)
#define G_SQ_CF_ALU_WORD0_KCACHE_BANK1(x) (((x) >> 26) & 0xF)
#define C_SQ_CF_ALU_WORD0_KCACHE_BANK1 0xC3FFFFFF
-#define S_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((x) & 0x3) << 30)
+#define S_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((unsigned)(x) & 0x3) << 30)
#define G_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((x) >> 30) & 0x3)
#define C_SQ_CF_ALU_WORD0_KCACHE_MODE0 0x3FFFFFFF
#define P_SQ_CF_ALU_WORD1
-#define S_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((x) & 0x3) << 0)
+#define S_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((unsigned)(x) & 0x3) << 0)
#define G_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((x) >> 0) & 0x3)
#define C_SQ_CF_ALU_WORD1_KCACHE_MODE1 0xFFFFFFFC
-#define S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(x) (((x) & 0xFF) << 2)
+#define S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(x) (((unsigned)(x) & 0xFF) << 2)
#define G_SQ_CF_ALU_WORD1_KCACHE_ADDR0(x) (((x) >> 2) & 0xFF)
#define C_SQ_CF_ALU_WORD1_KCACHE_ADDR0 0xFFFFFC03
-#define S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(x) (((x) & 0xFF) << 10)
+#define S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(x) (((unsigned)(x) & 0xFF) << 10)
#define G_SQ_CF_ALU_WORD1_KCACHE_ADDR1(x) (((x) >> 10) & 0xFF)
#define C_SQ_CF_ALU_WORD1_KCACHE_ADDR1 0xFFFC03FF
-#define S_SQ_CF_ALU_WORD1_COUNT(x) (((x) & 0x7F) << 18)
+#define S_SQ_CF_ALU_WORD1_COUNT(x) (((unsigned)(x) & 0x7F) << 18)
#define G_SQ_CF_ALU_WORD1_COUNT(x) (((x) >> 18) & 0x7F)
#define C_SQ_CF_ALU_WORD1_COUNT 0xFE03FFFF
-#define S_SQ_CF_ALU_WORD1_USES_WATERFALL(x) (((x) & 0x1) << 25)
+#define S_SQ_CF_ALU_WORD1_USES_WATERFALL(x) (((unsigned)(x) & 0x1) << 25)
#define G_SQ_CF_ALU_WORD1_USES_WATERFALL(x) (((x) >> 25) & 0x1)
#define C_SQ_CF_ALU_WORD1_USES_WATERFALL 0xFDFFFFFF
-#define S_SQ_CF_ALU_WORD1_CF_INST(x) (((x) & 0xF) << 26)
+#define S_SQ_CF_ALU_WORD1_CF_INST(x) (((unsigned)(x) & 0xF) << 26)
#define G_SQ_CF_ALU_WORD1_CF_INST(x) (((x) >> 26) & 0xF)
#define C_SQ_CF_ALU_WORD1_CF_INST 0xC3FFFFFF
-#define S_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE(x) (((x) & 0x1) << 30)
+#define S_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30)
#define G_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1)
#define C_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF
-#define S_SQ_CF_ALU_WORD1_BARRIER(x) (((x) & 0x1) << 31)
+#define S_SQ_CF_ALU_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31)
#define G_SQ_CF_ALU_WORD1_BARRIER(x) (((x) >> 31) & 0x1)
#define C_SQ_CF_ALU_WORD1_BARRIER 0x7FFFFFFF
-#define S_SQ_CF_ALU_WORD1_ALT_CONST(x) (((x) & 0x1) << 25)
+#define S_SQ_CF_ALU_WORD1_ALT_CONST(x) (((unsigned)(x) & 0x1) << 25)
#define G_SQ_CF_ALU_WORD1_ALT_CONST(x) (((x) >> 25) & 0x1)
#define C_SQ_CF_ALU_WORD1_ALT_CONST 0xFDFFFFFF
#define P_SQ_CF_ALLOC_EXPORT_WORD0
-#define S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(x) (((x) & 0x1FFF) << 0)
+#define S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(x) (((unsigned)(x) & 0x1FFF) << 0)
#define G_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(x) (((x) >> 0) & 0x1FFF)
#define C_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE 0xFFFFE000
-#define S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(x) (((x) & 0x3) << 13)
+#define S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(x) (((unsigned)(x) & 0x3) << 13)
#define G_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(x) (((x) >> 13) & 0x3)
#define C_SQ_CF_ALLOC_EXPORT_WORD0_TYPE 0xFFFF9FFF
#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PIXEL 0x00000000
#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS 0x00000001
#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM 0x00000002
#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_SX 0x00000003
-#define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(x) (((x) & 0x7F) << 15)
+#define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(x) (((unsigned)(x) & 0x7F) << 15)
#define G_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(x) (((x) >> 15) & 0x7F)
#define C_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR 0xFFC07FFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL(x) (((x) & 0x1) << 22)
+#define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL(x) (((unsigned)(x) & 0x1) << 22)
#define G_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL(x) (((x) >> 22) & 0x1)
#define C_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL 0xFFBFFFFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(x) (((x) & 0x7F) << 23)
+#define S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(x) (((unsigned)(x) & 0x7F) << 23)
#define G_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(x) (((x) >> 23) & 0x7F)
#define C_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR 0xC07FFFFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(x) (((x) & 0x3) << 30)
+#define S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(x) (((unsigned)(x) & 0x3) << 30)
#define G_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(x) (((x) >> 30) & 0x3)
#define C_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE 0x3FFFFFFF
#define P_SQ_CF_ALLOC_EXPORT_WORD1
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(x) (((x) & 0xF) << 17)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(x) (((unsigned)(x) & 0xF) << 17)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(x) (((x) >> 17) & 0xF)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT 0xFFE1FFFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(x) (((x) & 0x1) << 21)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(x) (((unsigned)(x) & 0x1) << 21)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(x) (((x) >> 21) & 0x1)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM 0xFFDFFFFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE(x) (((x) & 0x1) << 22)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE(x) (((unsigned)(x) & 0x1) << 22)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE(x) (((x) >> 22) & 0x1)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE 0xFFBFFFFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x) (((x) & 0x7F) << 23)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x) (((unsigned)(x) & 0x7F) << 23)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x) (((x) >> 23) & 0x7F)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST 0xC07FFFFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE(x) (((x) & 0x1) << 30)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(x) (((x) & 0x1) << 31)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(x) (((x) >> 31) & 0x1)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER 0x7FFFFFFF
#define P_SQ_CF_ALLOC_EXPORT_WORD1_BUF
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(x) (((x) & 0xFFF) << 0)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(x) (((unsigned)(x) & 0xFFF) << 0)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(x) (((x) >> 0) & 0xFFF)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE 0xFFFFF000
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(x) (((x) & 0xF) << 12)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(x) (((unsigned)(x) & 0xF) << 12)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(x) (((x) >> 12) & 0xF)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK 0xFFFF0FFF
#define P_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(x) (((x) & 0x7) << 0)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(x) (((unsigned)(x) & 0x7) << 0)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(x) (((x) >> 0) & 0x7)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X 0xFFFFFFF8
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(x) (((x) & 0x7) << 3)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(x) (((unsigned)(x) & 0x7) << 3)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(x) (((x) >> 3) & 0x7)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y 0xFFFFFFC7
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(x) (((x) & 0x7) << 6)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(x) (((unsigned)(x) & 0x7) << 6)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(x) (((x) >> 6) & 0x7)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z 0xFFFFFE3F
-#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(x) (((x) & 0x7) << 9)
+#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(x) (((unsigned)(x) & 0x7) << 9)
#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(x) (((x) >> 9) & 0x7)
#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W 0xFFFFF1FF
#define P_SQ_ALU_WORD0
-#define S_SQ_ALU_WORD0_SRC0_SEL(x) (((x) & 0x1FF) << 0)
+#define S_SQ_ALU_WORD0_SRC0_SEL(x) (((unsigned)(x) & 0x1FF) << 0)
#define G_SQ_ALU_WORD0_SRC0_SEL(x) (((x) >> 0) & 0x1FF)
#define C_SQ_ALU_WORD0_SRC0_SEL 0xFFFFFE00
-#define S_SQ_ALU_WORD0_SRC0_REL(x) (((x) & 0x1) << 9)
+#define S_SQ_ALU_WORD0_SRC0_REL(x) (((unsigned)(x) & 0x1) << 9)
#define G_SQ_ALU_WORD0_SRC0_REL(x) (((x) >> 9) & 0x1)
#define C_SQ_ALU_WORD0_SRC0_REL 0xFFFFFDFF
-#define S_SQ_ALU_WORD0_SRC0_CHAN(x) (((x) & 0x3) << 10)
+#define S_SQ_ALU_WORD0_SRC0_CHAN(x) (((unsigned)(x) & 0x3) << 10)
#define G_SQ_ALU_WORD0_SRC0_CHAN(x) (((x) >> 10) & 0x3)
#define C_SQ_ALU_WORD0_SRC0_CHAN 0xFFFFF3FF
-#define S_SQ_ALU_WORD0_SRC0_NEG(x) (((x) & 0x1) << 12)
+#define S_SQ_ALU_WORD0_SRC0_NEG(x) (((unsigned)(x) & 0x1) << 12)
#define G_SQ_ALU_WORD0_SRC0_NEG(x) (((x) >> 12) & 0x1)
#define C_SQ_ALU_WORD0_SRC0_NEG 0xFFFFEFFF
-#define S_SQ_ALU_WORD0_SRC1_SEL(x) (((x) & 0x1FF) << 13)
+#define S_SQ_ALU_WORD0_SRC1_SEL(x) (((unsigned)(x) & 0x1FF) << 13)
#define G_SQ_ALU_WORD0_SRC1_SEL(x) (((x) >> 13) & 0x1FF)
#define C_SQ_ALU_WORD0_SRC1_SEL 0xFFC01FFF
-#define S_SQ_ALU_WORD0_SRC1_REL(x) (((x) & 0x1) << 22)
+#define S_SQ_ALU_WORD0_SRC1_REL(x) (((unsigned)(x) & 0x1) << 22)
#define G_SQ_ALU_WORD0_SRC1_REL(x) (((x) >> 22) & 0x1)
#define C_SQ_ALU_WORD0_SRC1_REL 0xFFBFFFFF
-#define S_SQ_ALU_WORD0_SRC1_CHAN(x) (((x) & 0x3) << 23)
+#define S_SQ_ALU_WORD0_SRC1_CHAN(x) (((unsigned)(x) & 0x3) << 23)
#define G_SQ_ALU_WORD0_SRC1_CHAN(x) (((x) >> 23) & 0x3)
#define C_SQ_ALU_WORD0_SRC1_CHAN 0xFE7FFFFF
-#define S_SQ_ALU_WORD0_SRC1_NEG(x) (((x) & 0x1) << 25)
+#define S_SQ_ALU_WORD0_SRC1_NEG(x) (((unsigned)(x) & 0x1) << 25)
#define G_SQ_ALU_WORD0_SRC1_NEG(x) (((x) >> 25) & 0x1)
#define C_SQ_ALU_WORD0_SRC1_NEG 0xFDFFFFFF
-#define S_SQ_ALU_WORD0_INDEX_MODE(x) (((x) & 0x7) << 26)
+#define S_SQ_ALU_WORD0_INDEX_MODE(x) (((unsigned)(x) & 0x7) << 26)
#define G_SQ_ALU_WORD0_INDEX_MODE(x) (((x) >> 26) & 0x7)
#define C_SQ_ALU_WORD0_INDEX_MODE 0xE3FFFFFF
-#define S_SQ_ALU_WORD0_PRED_SEL(x) (((x) & 0x3) << 29)
+#define S_SQ_ALU_WORD0_PRED_SEL(x) (((unsigned)(x) & 0x3) << 29)
#define G_SQ_ALU_WORD0_PRED_SEL(x) (((x) >> 29) & 0x3)
#define C_SQ_ALU_WORD0_PRED_SEL 0x9FFFFFFF
-#define S_SQ_ALU_WORD0_LAST(x) (((x) & 0x1) << 31)
+#define S_SQ_ALU_WORD0_LAST(x) (((unsigned)(x) & 0x1) << 31)
#define G_SQ_ALU_WORD0_LAST(x) (((x) >> 31) & 0x1)
#define C_SQ_ALU_WORD0_LAST 0x7FFFFFFF
#define P_SQ_ALU_WORD1
-#define S_SQ_ALU_WORD1_ENCODING(x) (((x) & 0x7) << 15)
+#define S_SQ_ALU_WORD1_ENCODING(x) (((unsigned)(x) & 0x7) << 15)
#define G_SQ_ALU_WORD1_ENCODING(x) (((x) >> 15) & 0x7)
#define C_SQ_ALU_WORD1_ENCODING 0xFFFC7FFF
-#define S_SQ_ALU_WORD1_BANK_SWIZZLE(x) (((x) & 0x7) << 18)
+#define S_SQ_ALU_WORD1_BANK_SWIZZLE(x) (((unsigned)(x) & 0x7) << 18)
#define G_SQ_ALU_WORD1_BANK_SWIZZLE(x) (((x) >> 18) & 0x7)
#define C_SQ_ALU_WORD1_BANK_SWIZZLE 0xFFE3FFFF
-#define S_SQ_ALU_WORD1_DST_GPR(x) (((x) & 0x7F) << 21)
+#define S_SQ_ALU_WORD1_DST_GPR(x) (((unsigned)(x) & 0x7F) << 21)
#define G_SQ_ALU_WORD1_DST_GPR(x) (((x) >> 21) & 0x7F)
#define C_SQ_ALU_WORD1_DST_GPR 0xF01FFFFF
-#define S_SQ_ALU_WORD1_DST_REL(x) (((x) & 0x1) << 28)
+#define S_SQ_ALU_WORD1_DST_REL(x) (((unsigned)(x) & 0x1) << 28)
#define G_SQ_ALU_WORD1_DST_REL(x) (((x) >> 28) & 0x1)
#define C_SQ_ALU_WORD1_DST_REL 0xEFFFFFFF
-#define S_SQ_ALU_WORD1_DST_CHAN(x) (((x) & 0x3) << 29)
+#define S_SQ_ALU_WORD1_DST_CHAN(x) (((unsigned)(x) & 0x3) << 29)
#define G_SQ_ALU_WORD1_DST_CHAN(x) (((x) >> 29) & 0x3)
#define C_SQ_ALU_WORD1_DST_CHAN 0x9FFFFFFF
-#define S_SQ_ALU_WORD1_CLAMP(x) (((x) & 0x1) << 31)
+#define S_SQ_ALU_WORD1_CLAMP(x) (((unsigned)(x) & 0x1) << 31)
#define G_SQ_ALU_WORD1_CLAMP(x) (((x) >> 31) & 0x1)
#define C_SQ_ALU_WORD1_CLAMP 0x7FFFFFFF
#define P_SQ_ALU_WORD1_OP2
-#define S_SQ_ALU_WORD1_OP2_SRC0_ABS(x) (((x) & 0x1) << 0)
+#define S_SQ_ALU_WORD1_OP2_SRC0_ABS(x) (((unsigned)(x) & 0x1) << 0)
#define G_SQ_ALU_WORD1_OP2_SRC0_ABS(x) (((x) >> 0) & 0x1)
#define C_SQ_ALU_WORD1_OP2_SRC0_ABS 0xFFFFFFFE
-#define S_SQ_ALU_WORD1_OP2_SRC1_ABS(x) (((x) & 0x1) << 1)
+#define S_SQ_ALU_WORD1_OP2_SRC1_ABS(x) (((unsigned)(x) & 0x1) << 1)
#define G_SQ_ALU_WORD1_OP2_SRC1_ABS(x) (((x) >> 1) & 0x1)
#define C_SQ_ALU_WORD1_OP2_SRC1_ABS 0xFFFFFFFD
-#define S_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(x) (((x) & 0x1) << 2)
+#define S_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(x) (((unsigned)(x) & 0x1) << 2)
#define G_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(x) (((x) >> 2) & 0x1)
#define C_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK 0xFFFFFFFB
-#define S_SQ_ALU_WORD1_OP2_UPDATE_PRED(x) (((x) & 0x1) << 3)
+#define S_SQ_ALU_WORD1_OP2_UPDATE_PRED(x) (((unsigned)(x) & 0x1) << 3)
#define G_SQ_ALU_WORD1_OP2_UPDATE_PRED(x) (((x) >> 3) & 0x1)
#define C_SQ_ALU_WORD1_OP2_UPDATE_PRED 0xFFFFFFF7
-#define S_SQ_ALU_WORD1_OP2_WRITE_MASK(x) (((x) & 0x1) << 4)
+#define S_SQ_ALU_WORD1_OP2_WRITE_MASK(x) (((unsigned)(x) & 0x1) << 4)
#define G_SQ_ALU_WORD1_OP2_WRITE_MASK(x) (((x) >> 4) & 0x1)
#define C_SQ_ALU_WORD1_OP2_WRITE_MASK 0xFFFFFFEF
-#define S_SQ_ALU_WORD1_OP2_OMOD(x) (((x) & 0x3) << 5)
+#define S_SQ_ALU_WORD1_OP2_OMOD(x) (((unsigned)(x) & 0x3) << 5)
#define G_SQ_ALU_WORD1_OP2_OMOD(x) (((x) >> 5) & 0x3)
#define C_SQ_ALU_WORD1_OP2_OMOD 0xFFFFFF9F
-#define S_SQ_ALU_WORD1_OP2_ALU_INST(x) (((x) & 0x7FF) << 7)
+#define S_SQ_ALU_WORD1_OP2_ALU_INST(x) (((unsigned)(x) & 0x7FF) << 7)
#define G_SQ_ALU_WORD1_OP2_ALU_INST(x) (((x) >> 7) & 0x7FF)
#define C_SQ_ALU_WORD1_OP2_ALU_INST 0xFFFC007F
#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD 0x00000000
@@ -348,19 +348,19 @@
#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT 0x00000078
#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_UINT 0x00000079
#define P_SQ_ALU_WORD1_OP3
-#define S_SQ_ALU_WORD1_OP3_SRC2_SEL(x) (((x) & 0x1FF) << 0)
+#define S_SQ_ALU_WORD1_OP3_SRC2_SEL(x) (((unsigned)(x) & 0x1FF) << 0)
#define G_SQ_ALU_WORD1_OP3_SRC2_SEL(x) (((x) >> 0) & 0x1FF)
#define C_SQ_ALU_WORD1_OP3_SRC2_SEL 0xFFFFFE00
-#define S_SQ_ALU_WORD1_OP3_SRC2_REL(x) (((x) & 0x1) << 9)
+#define S_SQ_ALU_WORD1_OP3_SRC2_REL(x) (((unsigned)(x) & 0x1) << 9)
#define G_SQ_ALU_WORD1_OP3_SRC2_REL(x) (((x) >> 9) & 0x1)
#define C_SQ_ALU_WORD1_OP3_SRC2_REL 0xFFFFFDFF
-#define S_SQ_ALU_WORD1_OP3_SRC2_CHAN(x) (((x) & 0x3) << 10)
+#define S_SQ_ALU_WORD1_OP3_SRC2_CHAN(x) (((unsigned)(x) & 0x3) << 10)
#define G_SQ_ALU_WORD1_OP3_SRC2_CHAN(x) (((x) >> 10) & 0x3)
#define C_SQ_ALU_WORD1_OP3_SRC2_CHAN 0xFFFFF3FF
-#define S_SQ_ALU_WORD1_OP3_SRC2_NEG(x) (((x) & 0x1) << 12)
+#define S_SQ_ALU_WORD1_OP3_SRC2_NEG(x) (((unsigned)(x) & 0x1) << 12)
#define G_SQ_ALU_WORD1_OP3_SRC2_NEG(x) (((x) >> 12) & 0x1)
#define C_SQ_ALU_WORD1_OP3_SRC2_NEG 0xFFFFEFFF
-#define S_SQ_ALU_WORD1_OP3_ALU_INST(x) (((x) & 0x1F) << 13)
+#define S_SQ_ALU_WORD1_OP3_ALU_INST(x) (((unsigned)(x) & 0x1F) << 13)
#define G_SQ_ALU_WORD1_OP3_ALU_INST(x) (((x) >> 13) & 0x1F)
#define C_SQ_ALU_WORD1_OP3_ALU_INST 0xFFFC1FFF
#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT 0x0000000C
@@ -382,164 +382,164 @@
#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT_INT 0x0000001D
#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE_INT 0x0000001E
#define P_SQ_VTX_WORD0
-#define S_SQ_VTX_WORD0_VTX_INST(x) (((x) & 0x1F) << 0)
+#define S_SQ_VTX_WORD0_VTX_INST(x) (((unsigned)(x) & 0x1F) << 0)
#define G_SQ_VTX_WORD0_VTX_INST(x) (((x) >> 0) & 0x1F)
#define C_SQ_VTX_WORD0_VTX_INST 0xFFFFFFE0
-#define S_SQ_VTX_WORD0_FETCH_TYPE(x) (((x) & 0x3) << 5)
+#define S_SQ_VTX_WORD0_FETCH_TYPE(x) (((unsigned)(x) & 0x3) << 5)
#define G_SQ_VTX_WORD0_FETCH_TYPE(x) (((x) >> 5) & 0x3)
#define C_SQ_VTX_WORD0_FETCH_TYPE 0xFFFFFF9F
-#define S_SQ_VTX_WORD0_FETCH_WHOLE_QUAD(x) (((x) & 0x1) << 7)
+#define S_SQ_VTX_WORD0_FETCH_WHOLE_QUAD(x) (((unsigned)(x) & 0x1) << 7)
#define G_SQ_VTX_WORD0_FETCH_WHOLE_QUAD(x) (((x) >> 7) & 0x1)
#define C_SQ_VTX_WORD0_FETCH_WHOLE_QUAD 0xFFFFFF7F
-#define S_SQ_VTX_WORD0_BUFFER_ID(x) (((x) & 0xFF) << 8)
+#define S_SQ_VTX_WORD0_BUFFER_ID(x) (((unsigned)(x) & 0xFF) << 8)
#define G_SQ_VTX_WORD0_BUFFER_ID(x) (((x) >> 8) & 0xFF)
#define C_SQ_VTX_WORD0_BUFFER_ID 0xFFFF00FF
-#define S_SQ_VTX_WORD0_SRC_GPR(x) (((x) & 0x7F) << 16)
+#define S_SQ_VTX_WORD0_SRC_GPR(x) (((unsigned)(x) & 0x7F) << 16)
#define G_SQ_VTX_WORD0_SRC_GPR(x) (((x) >> 16) & 0x7F)
#define C_SQ_VTX_WORD0_SRC_GPR 0xFF80FFFF
-#define S_SQ_VTX_WORD0_SRC_REL(x) (((x) & 0x1) << 23)
+#define S_SQ_VTX_WORD0_SRC_REL(x) (((unsigned)(x) & 0x1) << 23)
#define G_SQ_VTX_WORD0_SRC_REL(x) (((x) >> 23) & 0x1)
#define C_SQ_VTX_WORD0_SRC_REL 0xFF7FFFFF
-#define S_SQ_VTX_WORD0_SRC_SEL_X(x) (((x) & 0x3) << 24)
+#define S_SQ_VTX_WORD0_SRC_SEL_X(x) (((unsigned)(x) & 0x3) << 24)
#define G_SQ_VTX_WORD0_SRC_SEL_X(x) (((x) >> 24) & 0x3)
#define C_SQ_VTX_WORD0_SRC_SEL_X 0xFCFFFFFF
-#define S_SQ_VTX_WORD0_MEGA_FETCH_COUNT(x) (((x) & 0x3F) << 26)
+#define S_SQ_VTX_WORD0_MEGA_FETCH_COUNT(x) (((unsigned)(x) & 0x3F) << 26)
#define G_SQ_VTX_WORD0_MEGA_FETCH_COUNT(x) (((x) >> 26) & 0x3F)
#define C_SQ_VTX_WORD0_MEGA_FETCH_COUNT 0x03FFFFFF
#define P_SQ_VTX_WORD1
-#define S_SQ_VTX_WORD1_DST_SEL_X(x) (((x) & 0x7) << 9)
+#define S_SQ_VTX_WORD1_DST_SEL_X(x) (((unsigned)(x) & 0x7) << 9)
#define G_SQ_VTX_WORD1_DST_SEL_X(x) (((x) >> 9) & 0x7)
#define C_SQ_VTX_WORD1_DST_SEL_X 0xFFFFF1FF
-#define S_SQ_VTX_WORD1_DST_SEL_Y(x) (((x) & 0x7) << 12)
+#define S_SQ_VTX_WORD1_DST_SEL_Y(x) (((unsigned)(x) & 0x7) << 12)
#define G_SQ_VTX_WORD1_DST_SEL_Y(x) (((x) >> 12) & 0x7)
#define C_SQ_VTX_WORD1_DST_SEL_Y 0xFFFF8FFF
-#define S_SQ_VTX_WORD1_DST_SEL_Z(x) (((x) & 0x7) << 15)
+#define S_SQ_VTX_WORD1_DST_SEL_Z(x) (((unsigned)(x) & 0x7) << 15)
#define G_SQ_VTX_WORD1_DST_SEL_Z(x) (((x) >> 15) & 0x7)
#define C_SQ_VTX_WORD1_DST_SEL_Z 0xFFFC7FFF
-#define S_SQ_VTX_WORD1_DST_SEL_W(x) (((x) & 0x7) << 18)
+#define S_SQ_VTX_WORD1_DST_SEL_W(x) (((unsigned)(x) & 0x7) << 18)
#define G_SQ_VTX_WORD1_DST_SEL_W(x) (((x) >> 18) & 0x7)
#define C_SQ_VTX_WORD1_DST_SEL_W 0xFFE3FFFF
-#define S_SQ_VTX_WORD1_USE_CONST_FIELDS(x) (((x) & 0x1) << 21)
+#define S_SQ_VTX_WORD1_USE_CONST_FIELDS(x) (((unsigned)(x) & 0x1) << 21)
#define G_SQ_VTX_WORD1_USE_CONST_FIELDS(x) (((x) >> 21) & 0x1)
#define C_SQ_VTX_WORD1_USE_CONST_FIELDS 0xFFDFFFFF
-#define S_SQ_VTX_WORD1_DATA_FORMAT(x) (((x) & 0x3F) << 22)
+#define S_SQ_VTX_WORD1_DATA_FORMAT(x) (((unsigned)(x) & 0x3F) << 22)
#define G_SQ_VTX_WORD1_DATA_FORMAT(x) (((x) >> 22) & 0x3F)
#define C_SQ_VTX_WORD1_DATA_FORMAT 0xF03FFFFF
-#define S_SQ_VTX_WORD1_NUM_FORMAT_ALL(x) (((x) & 0x3) << 28)
+#define S_SQ_VTX_WORD1_NUM_FORMAT_ALL(x) (((unsigned)(x) & 0x3) << 28)
#define G_SQ_VTX_WORD1_NUM_FORMAT_ALL(x) (((x) >> 28) & 0x3)
#define C_SQ_VTX_WORD1_NUM_FORMAT_ALL 0xCFFFFFFF
-#define S_SQ_VTX_WORD1_FORMAT_COMP_ALL(x) (((x) & 0x1) << 30)
+#define S_SQ_VTX_WORD1_FORMAT_COMP_ALL(x) (((unsigned)(x) & 0x1) << 30)
#define G_SQ_VTX_WORD1_FORMAT_COMP_ALL(x) (((x) >> 30) & 0x1)
#define C_SQ_VTX_WORD1_FORMAT_COMP_ALL 0xBFFFFFFF
-#define S_SQ_VTX_WORD1_SRF_MODE_ALL(x) (((x) & 0x1) << 31)
+#define S_SQ_VTX_WORD1_SRF_MODE_ALL(x) (((unsigned)(x) & 0x1) << 31)
#define G_SQ_VTX_WORD1_SRF_MODE_ALL(x) (((x) >> 31) & 0x1)
#define C_SQ_VTX_WORD1_SRF_MODE_ALL 0x7FFFFFFF
#define P_SQ_VTX_WORD1_GPR
-#define S_SQ_VTX_WORD1_GPR_DST_GPR(x) (((x) & 0x7F) << 0)
+#define S_SQ_VTX_WORD1_GPR_DST_GPR(x) (((unsigned)(x) & 0x7F) << 0)
#define G_SQ_VTX_WORD1_GPR_DST_GPR(x) (((x) >> 0) & 0x7F)
#define C_SQ_VTX_WORD1_GPR_DST_GPR 0xFFFFFF80
-#define S_SQ_VTX_WORD1_GPR_DST_REL(x) (((x) & 0x1) << 7)
+#define S_SQ_VTX_WORD1_GPR_DST_REL(x) (((unsigned)(x) & 0x1) << 7)
#define G_SQ_VTX_WORD1_GPR_DST_REL(x) (((x) >> 7) & 0x1)
#define C_SQ_VTX_WORD1_GPR_DST_REL 0xFFFFFF7F
#define P_SQ_VTX_WORD1_SEM
-#define S_SQ_VTX_WORD1_SEM_SEMANTIC_ID(x) (((x) & 0xFF) << 0)
+#define S_SQ_VTX_WORD1_SEM_SEMANTIC_ID(x) (((unsigned)(x) & 0xFF) << 0)
#define G_SQ_VTX_WORD1_SEM_SEMANTIC_ID(x) (((x) >> 0) & 0xFF)
#define C_SQ_VTX_WORD1_SEM_SEMANTIC_ID 0xFFFFFF00
#define P_SQ_VTX_WORD2
-#define S_SQ_VTX_WORD2_OFFSET(x) (((x) & 0xFFFF) << 0)
+#define S_SQ_VTX_WORD2_OFFSET(x) (((unsigned)(x) & 0xFFFF) << 0)
#define G_SQ_VTX_WORD2_OFFSET(x) (((x) >> 0) & 0xFFFF)
#define C_SQ_VTX_WORD2_OFFSET 0xFFFF0000
-#define S_SQ_VTX_WORD2_ENDIAN_SWAP(x) (((x) & 0x3) << 16)
+#define S_SQ_VTX_WORD2_ENDIAN_SWAP(x) (((unsigned)(x) & 0x3) << 16)
#define G_SQ_VTX_WORD2_ENDIAN_SWAP(x) (((x) >> 16) & 0x3)
#define C_SQ_VTX_WORD2_ENDIAN_SWAP 0xFFFCFFFF
-#define S_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE(x) (((x) & 0x1) << 18)
+#define S_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE(x) (((unsigned)(x) & 0x1) << 18)
#define G_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE(x) (((x) >> 18) & 0x1)
#define C_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE 0xFFFBFFFF
-#define S_SQ_VTX_WORD2_MEGA_FETCH(x) (((x) & 0x1) << 19)
+#define S_SQ_VTX_WORD2_MEGA_FETCH(x) (((unsigned)(x) & 0x1) << 19)
#define G_SQ_VTX_WORD2_MEGA_FETCH(x) (((x) >> 19) & 0x1)
#define C_SQ_VTX_WORD2_MEGA_FETCH 0xFFF7FFFF
-#define S_SQ_VTX_WORD2_ALT_CONST(x) (((x) & 0x1) << 20)
+#define S_SQ_VTX_WORD2_ALT_CONST(x) (((unsigned)(x) & 0x1) << 20)
#define G_SQ_VTX_WORD2_ALT_CONST(x) (((x) >> 20) & 0x1)
#define C_SQ_VTX_WORD2_ALT_CONST 0xFFEFFFFF
#define P_SQ_TEX_WORD0
-#define S_SQ_TEX_WORD0_TEX_INST(x) (((x) & 0x1F) << 0)
+#define S_SQ_TEX_WORD0_TEX_INST(x) (((unsigned)(x) & 0x1F) << 0)
#define G_SQ_TEX_WORD0_TEX_INST(x) (((x) >> 0) & 0x1F)
#define C_SQ_TEX_WORD0_TEX_INST 0xFFFFFFE0
-#define S_SQ_TEX_WORD0_BC_FRAC_MODE(x) (((x) & 0x1) << 5)
+#define S_SQ_TEX_WORD0_BC_FRAC_MODE(x) (((unsigned)(x) & 0x1) << 5)
#define G_SQ_TEX_WORD0_BC_FRAC_MODE(x) (((x) >> 5) & 0x1)
#define C_SQ_TEX_WORD0_BC_FRAC_MODE 0xFFFFFFDF
-#define S_SQ_TEX_WORD0_FETCH_WHOLE_QUAD(x) (((x) & 0x1) << 7)
+#define S_SQ_TEX_WORD0_FETCH_WHOLE_QUAD(x) (((unsigned)(x) & 0x1) << 7)
#define G_SQ_TEX_WORD0_FETCH_WHOLE_QUAD(x) (((x) >> 7) & 0x1)
#define C_SQ_TEX_WORD0_FETCH_WHOLE_QUAD 0xFFFFFF7F
-#define S_SQ_TEX_WORD0_RESOURCE_ID(x) (((x) & 0xFF) << 8)
+#define S_SQ_TEX_WORD0_RESOURCE_ID(x) (((unsigned)(x) & 0xFF) << 8)
#define G_SQ_TEX_WORD0_RESOURCE_ID(x) (((x) >> 8) & 0xFF)
#define C_SQ_TEX_WORD0_RESOURCE_ID 0xFFFF00FF
-#define S_SQ_TEX_WORD0_SRC_GPR(x) (((x) & 0x7F) << 16)
+#define S_SQ_TEX_WORD0_SRC_GPR(x) (((unsigned)(x) & 0x7F) << 16)
#define G_SQ_TEX_WORD0_SRC_GPR(x) (((x) >> 16) & 0x7F)
#define C_SQ_TEX_WORD0_SRC_GPR 0xFF80FFFF
-#define S_SQ_TEX_WORD0_SRC_REL(x) (((x) & 0x1) << 23)
+#define S_SQ_TEX_WORD0_SRC_REL(x) (((unsigned)(x) & 0x1) << 23)
#define G_SQ_TEX_WORD0_SRC_REL(x) (((x) >> 23) & 0x1)
#define C_SQ_TEX_WORD0_SRC_REL 0xFF7FFFFF
-#define S_SQ_TEX_WORD0_ALT_CONST(x) (((x) & 0x1) << 24)
+#define S_SQ_TEX_WORD0_ALT_CONST(x) (((unsigned)(x) & 0x1) << 24)
#define G_SQ_TEX_WORD0_ALT_CONST(x) (((x) >> 24) & 0x1)
#define C_SQ_TEX_WORD0_ALT_CONST 0xFEFFFFFF
#define P_SQ_TEX_WORD1
-#define S_SQ_TEX_WORD1_DST_GPR(x) (((x) & 0x7F) << 0)
+#define S_SQ_TEX_WORD1_DST_GPR(x) (((unsigned)(x) & 0x7F) << 0)
#define G_SQ_TEX_WORD1_DST_GPR(x) (((x) >> 0) & 0x7F)
#define C_SQ_TEX_WORD1_DST_GPR 0xFFFFFF80
-#define S_SQ_TEX_WORD1_DST_REL(x) (((x) & 0x1) << 7)
+#define S_SQ_TEX_WORD1_DST_REL(x) (((unsigned)(x) & 0x1) << 7)
#define G_SQ_TEX_WORD1_DST_REL(x) (((x) >> 7) & 0x1)
#define C_SQ_TEX_WORD1_DST_REL 0xFFFFFF7F
-#define S_SQ_TEX_WORD1_DST_SEL_X(x) (((x) & 0x7) << 9)
+#define S_SQ_TEX_WORD1_DST_SEL_X(x) (((unsigned)(x) & 0x7) << 9)
#define G_SQ_TEX_WORD1_DST_SEL_X(x) (((x) >> 9) & 0x7)
#define C_SQ_TEX_WORD1_DST_SEL_X 0xFFFFF1FF
-#define S_SQ_TEX_WORD1_DST_SEL_Y(x) (((x) & 0x7) << 12)
+#define S_SQ_TEX_WORD1_DST_SEL_Y(x) (((unsigned)(x) & 0x7) << 12)
#define G_SQ_TEX_WORD1_DST_SEL_Y(x) (((x) >> 12) & 0x7)
#define C_SQ_TEX_WORD1_DST_SEL_Y 0xFFFF8FFF
-#define S_SQ_TEX_WORD1_DST_SEL_Z(x) (((x) & 0x7) << 15)
+#define S_SQ_TEX_WORD1_DST_SEL_Z(x) (((unsigned)(x) & 0x7) << 15)
#define G_SQ_TEX_WORD1_DST_SEL_Z(x) (((x) >> 15) & 0x7)
#define C_SQ_TEX_WORD1_DST_SEL_Z 0xFFFC7FFF
-#define S_SQ_TEX_WORD1_DST_SEL_W(x) (((x) & 0x7) << 18)
+#define S_SQ_TEX_WORD1_DST_SEL_W(x) (((unsigned)(x) & 0x7) << 18)
#define G_SQ_TEX_WORD1_DST_SEL_W(x) (((x) >> 18) & 0x7)
#define C_SQ_TEX_WORD1_DST_SEL_W 0xFFE3FFFF
-#define S_SQ_TEX_WORD1_LOD_BIAS(x) (((x) & 0x7F) << 21)
+#define S_SQ_TEX_WORD1_LOD_BIAS(x) (((unsigned)(x) & 0x7F) << 21)
#define G_SQ_TEX_WORD1_LOD_BIAS(x) (((x) >> 21) & 0x7F)
#define C_SQ_TEX_WORD1_LOD_BIAS 0xF01FFFFF
-#define S_SQ_TEX_WORD1_COORD_TYPE_X(x) (((x) & 0x1) << 28)
+#define S_SQ_TEX_WORD1_COORD_TYPE_X(x) (((unsigned)(x) & 0x1) << 28)
#define G_SQ_TEX_WORD1_COORD_TYPE_X(x) (((x) >> 28) & 0x1)
#define C_SQ_TEX_WORD1_COORD_TYPE_X 0xEFFFFFFF
-#define S_SQ_TEX_WORD1_COORD_TYPE_Y(x) (((x) & 0x1) << 29)
+#define S_SQ_TEX_WORD1_COORD_TYPE_Y(x) (((unsigned)(x) & 0x1) << 29)
#define G_SQ_TEX_WORD1_COORD_TYPE_Y(x) (((x) >> 29) & 0x1)
#define C_SQ_TEX_WORD1_COORD_TYPE_Y 0xDFFFFFFF
-#define S_SQ_TEX_WORD1_COORD_TYPE_Z(x) (((x) & 0x1) << 30)
+#define S_SQ_TEX_WORD1_COORD_TYPE_Z(x) (((unsigned)(x) & 0x1) << 30)
#define G_SQ_TEX_WORD1_COORD_TYPE_Z(x) (((x) >> 30) & 0x1)
#define C_SQ_TEX_WORD1_COORD_TYPE_Z 0xBFFFFFFF
-#define S_SQ_TEX_WORD1_COORD_TYPE_W(x) (((x) & 0x1) << 31)
+#define S_SQ_TEX_WORD1_COORD_TYPE_W(x) (((unsigned)(x) & 0x1) << 31)
#define G_SQ_TEX_WORD1_COORD_TYPE_W(x) (((x) >> 31) & 0x1)
#define C_SQ_TEX_WORD1_COORD_TYPE_W 0x7FFFFFFF
#define P_SQ_TEX_WORD2
-#define S_SQ_TEX_WORD2_OFFSET_X(x) (((x) & 0x1F) << 0)
+#define S_SQ_TEX_WORD2_OFFSET_X(x) (((unsigned)(x) & 0x1F) << 0)
#define G_SQ_TEX_WORD2_OFFSET_X(x) (((x) >> 0) & 0x1F)
#define C_SQ_TEX_WORD2_OFFSET_X 0xFFFFFFE0
-#define S_SQ_TEX_WORD2_OFFSET_Y(x) (((x) & 0x1F) << 5)
+#define S_SQ_TEX_WORD2_OFFSET_Y(x) (((unsigned)(x) & 0x1F) << 5)
#define G_SQ_TEX_WORD2_OFFSET_Y(x) (((x) >> 5) & 0x1F)
#define C_SQ_TEX_WORD2_OFFSET_Y 0xFFFFFC1F
-#define S_SQ_TEX_WORD2_OFFSET_Z(x) (((x) & 0x1F) << 10)
+#define S_SQ_TEX_WORD2_OFFSET_Z(x) (((unsigned)(x) & 0x1F) << 10)
#define G_SQ_TEX_WORD2_OFFSET_Z(x) (((x) >> 10) & 0x1F)
#define C_SQ_TEX_WORD2_OFFSET_Z 0xFFFF83FF
-#define S_SQ_TEX_WORD2_SAMPLER_ID(x) (((x) & 0x1F) << 15)
+#define S_SQ_TEX_WORD2_SAMPLER_ID(x) (((unsigned)(x) & 0x1F) << 15)
#define G_SQ_TEX_WORD2_SAMPLER_ID(x) (((x) >> 15) & 0x1F)
#define C_SQ_TEX_WORD2_SAMPLER_ID 0xFFF07FFF
-#define S_SQ_TEX_WORD2_SRC_SEL_X(x) (((x) & 0x7) << 20)
+#define S_SQ_TEX_WORD2_SRC_SEL_X(x) (((unsigned)(x) & 0x7) << 20)
#define G_SQ_TEX_WORD2_SRC_SEL_X(x) (((x) >> 20) & 0x7)
#define C_SQ_TEX_WORD2_SRC_SEL_X 0xFF8FFFFF
-#define S_SQ_TEX_WORD2_SRC_SEL_Y(x) (((x) & 0x7) << 23)
+#define S_SQ_TEX_WORD2_SRC_SEL_Y(x) (((unsigned)(x) & 0x7) << 23)
#define G_SQ_TEX_WORD2_SRC_SEL_Y(x) (((x) >> 23) & 0x7)
#define C_SQ_TEX_WORD2_SRC_SEL_Y 0xFC7FFFFF
-#define S_SQ_TEX_WORD2_SRC_SEL_Z(x) (((x) & 0x7) << 26)
+#define S_SQ_TEX_WORD2_SRC_SEL_Z(x) (((unsigned)(x) & 0x7) << 26)
#define G_SQ_TEX_WORD2_SRC_SEL_Z(x) (((x) >> 26) & 0x7)
#define C_SQ_TEX_WORD2_SRC_SEL_Z 0xE3FFFFFF
-#define S_SQ_TEX_WORD2_SRC_SEL_W(x) (((x) & 0x7) << 29)
+#define S_SQ_TEX_WORD2_SRC_SEL_W(x) (((unsigned)(x) & 0x7) << 29)
#define G_SQ_TEX_WORD2_SRC_SEL_W(x) (((x) >> 29) & 0x7)
#define C_SQ_TEX_WORD2_SRC_SEL_W 0x1FFFFFFF