summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_inst.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/compiler/brw_inst.h')
-rw-r--r--src/intel/compiler/brw_inst.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_inst.h b/src/intel/compiler/brw_inst.h
index 624cbe020ca..5a1e5cfba72 100644
--- a/src/intel/compiler/brw_inst.h
+++ b/src/intel/compiler/brw_inst.h
@@ -1161,6 +1161,7 @@ BRW_IA16_ADDR_IMM(send_dst, -1, -1, 62, 56, 52)
static inline uint64_t
brw_inst_bits(const brw_inst *inst, unsigned high, unsigned low)
{
+ assert(high >= low);
/* We assume the field doesn't cross 64-bit boundaries. */
const unsigned word = high / 64;
assert(word == low / 64);
@@ -1181,6 +1182,7 @@ brw_inst_bits(const brw_inst *inst, unsigned high, unsigned low)
static inline void
brw_inst_set_bits(brw_inst *inst, unsigned high, unsigned low, uint64_t value)
{
+ assert(high >= low);
const unsigned word = high / 64;
assert(word == low / 64);