On 06/05/16 15:25, Roger Pau Monne wrote:
> Because it's undefined behaviour.
>
> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> ---
> Cc: Andrew Cooper <andrew.coop...@citrix.com>
> ---
>  include/arch/x86/processor.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/arch/x86/processor.h b/include/arch/x86/processor.h
> index c9f253f..841953c 100644
> --- a/include/arch/x86/processor.h
> +++ b/include/arch/x86/processor.h
> @@ -134,7 +134,7 @@
>  /* Segment-based Error Code - supplemental constants. */
>  #define X86_EC_TABLE_MASK (3  << 1)
>  #define X86_EC_SEL_SHIFT  3
> -#define X86_EC_SEL_MASK   (-1 << X86_EC_SEL_SHIFT)
> +#define X86_EC_SEL_MASK   (-1U << X86_EC_SEL_SHIFT)

The resulting expression needs to be signed, to DTRT when implicitly
promoted.  I presume this was clang complaining?

Does using the constant (-9) work?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to