On Mon, Jul 04, 2016 at 03:50:23PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <[email protected]>
> 
> Some IS_ and HAS_ macros can return any non-zero value for true.
> 
> One potential problem with that is that someone could assign
> them to integers and be surprised with the result. Therefore it
> is probably safer to do the conversion to 0/1 in the macros
> themselves.
> 
> Luckily this does not seem to have an effect on code size.

Indeed, gcc is quite happy to remove the !! and combine
e.g. IS_GEN6() || IS_GEN7() into a single testb.

With that,
Reviewed-by: Chris Wilson <[email protected]>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to