i965: Fix undefined signed overflow in INTEL_MASK for bitfields of 31 bits.

Most likely we had only ever used this macro on bitfields of less than
31 bits -- That's going to change shortly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Francisco Jerez 2016-07-21 21:58:56 -07:00
parent f3cb2c34f2
commit 4e990b67ce

View file

@ -29,7 +29,7 @@
* Keith Whitwell <keithw@vmware.com>
*/
#define INTEL_MASK(high, low) (((1<<((high)-(low)+1))-1)<<(low))
#define INTEL_MASK(high, low) (((1u<<((high)-(low)+1))-1)<<(low))
/* Using the GNU statement expression extension */
#define SET_FIELD(value, field) \
({ \