From 529c07c1c53b484e1876decb3d4d808f289096b5 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 26 Nov 2018 19:12:52 -0800 Subject: [PATCH] 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 --- src/arch/hsail/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'))) -- 2.30.2