summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-11-26 19:12:52 -0800
committerGabe Black <gabeblack@google.com>2018-11-27 22:02:50 +0000
commit529c07c1c53b484e1876decb3d4d808f289096b5 (patch)
tree8c4e19648ba82aed075655554a7b1afce38d5a9d
parent12311c5540e69750b39f1f2e476546cdf05d1f3e (diff)
downloadgem5-529c07c1c53b484e1876decb3d4d808f289096b5.tar.xz
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 <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com>
-rwxr-xr-xsrc/arch/hsail/gen.py2
1 files changed, 1 insertions, 1 deletions
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')))