summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_eu_defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/compiler/brw_eu_defines.h')
-rw-r--r--src/intel/compiler/brw_eu_defines.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_eu_defines.h b/src/intel/compiler/brw_eu_defines.h
index b7bd104be59..4640c98140f 100644
--- a/src/intel/compiler/brw_eu_defines.h
+++ b/src/intel/compiler/brw_eu_defines.h
@@ -41,14 +41,14 @@
/* Using the GNU statement expression extension */
#define SET_FIELD(value, field) \
({ \
- uint32_t fieldval = (value) << field ## _SHIFT; \
+ uint32_t fieldval = (uint32_t)(value) << field ## _SHIFT; \
assert((fieldval & ~ field ## _MASK) == 0); \
fieldval & field ## _MASK; \
})
#define SET_BITS(value, high, low) \
({ \
- const uint32_t fieldval = (value) << (low); \
+ const uint32_t fieldval = (uint32_t)(value) << (low); \
assert((fieldval & ~INTEL_MASK(high, low)) == 0); \
fieldval & INTEL_MASK(high, low); \
})