summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-11-15 15:05:57 -0600
committerJason Ekstrand <[email protected]>2019-01-29 18:43:55 +0000
commitfee6bd8d8e138faa90a2fb8e4866bf4c9663732a (patch)
tree34d34deb8fd46070c81b73a57b97a70983b97a7a /src
parentb284d222dbbe7a106dd1e52af7a826dc9855fc3c (diff)
intel/eu: Use GET_BITS in brw_inst_set_send_ex_desc
It's a bit more readable Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_inst.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_inst.h b/src/intel/compiler/brw_inst.h
index ce89bbba72f..753f09e70cf 100644
--- a/src/intel/compiler/brw_inst.h
+++ b/src/intel/compiler/brw_inst.h
@@ -513,11 +513,11 @@ brw_inst_set_send_ex_desc(const struct gen_device_info *devinfo,
brw_inst *inst, uint32_t value)
{
assert(devinfo->gen >= 9);
- brw_inst_set_bits(inst, 94, 91, (value >> 28) & ((1u << 4) - 1));
- brw_inst_set_bits(inst, 88, 85, (value >> 24) & ((1u << 4) - 1));
- brw_inst_set_bits(inst, 83, 80, (value >> 20) & ((1u << 4) - 1));
- brw_inst_set_bits(inst, 67, 64, (value >> 16) & ((1u << 4) - 1));
- assert((value & ((1u << 16) - 1)) == 0);
+ brw_inst_set_bits(inst, 94, 91, GET_BITS(value, 31, 28));
+ brw_inst_set_bits(inst, 88, 85, GET_BITS(value, 27, 24));
+ brw_inst_set_bits(inst, 83, 80, GET_BITS(value, 23, 20));
+ brw_inst_set_bits(inst, 67, 64, GET_BITS(value, 19, 16));
+ assert(GET_BITS(value, 15, 0) == 0);
}
/**