From: Gabe Black Date: Tue, 27 Nov 2018 03:12:52 +0000 (-0800) Subject: hsail: Fix a warning/build failure for HSAIL_X86. X-Git-Tag: v19.0.0.0~1369 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=529c07c1c53b484e1876decb3d4d808f289096b5;p=gem5.git hsail: Fix a warning/build failure for HSAIL_X86. The Bitselect operation definition used ~ to invert the bits of a mask value, but if that mask value is of type bool, that generates a warning. This change casts that value to a uint64_t so that it can always have ~ applied to it. Change-Id: I7fbfc6ff264bc32a265f2724c772b8fae08590f7 Reviewed-on: https://gem5-review.googlesource.com/c/14655 Reviewed-by: Brandon Potter Maintainer: Gabe Black --- diff --git a/src/arch/hsail/gen.py b/src/arch/hsail/gen.py index bb6012112..23ce02e87 100755 --- a/src/arch/hsail/gen.py +++ b/src/arch/hsail/gen.py @@ -703,7 +703,7 @@ gen('And', bit_types, 'src0 & src1') gen('Or', bit_types, 'src0 | src1') gen('Xor', bit_types, 'src0 ^ src1') -gen('Bitselect', bit_types, '(src1 & src0) | (src2 & ~src0)') +gen('Bitselect', bit_types, '(src1 & src0) | (src2 & ~(uint64_t)src0)') gen('Popcount', ('U32',), '__builtin_popcount(src0)', 'PopcountInst', \ ('sourceType', ('B32', 'B64')))