Discussion:
[gem5-dev] Change in gem5/gem5[master]: hsail: Fix a warning/build failure for HSAIL_X86.
(too old to reply)
Gabe Black (Gerrit)
2018-11-27 03:15:57 UTC
Permalink
Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/14655


Change subject: hsail: Fix a warning/build failure for HSAIL_X86.
......................................................................

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
---
M src/arch/hsail/gen.py
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/arch/hsail/gen.py b/src/arch/hsail/gen.py
index bb60121..23ce02e 100755
--- a/src/arch/hsail/gen.py
+++ b/src/arch/hsail/gen.py
@@ -703,7 +703,7 @@
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')))
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14655
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I7fbfc6ff264bc32a265f2724c772b8fae08590f7
Gerrit-Change-Number: 14655
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-MessageType: newchange
Gabe Black (Gerrit)
2018-11-27 22:02:51 UTC
Permalink
Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/14655 )

Change subject: hsail: Fix a warning/build failure for HSAIL_X86.
......................................................................

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 <***@amd.com>
Maintainer: Gabe Black <***@google.com>
---
M src/arch/hsail/gen.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
Brandon Potter: Looks good to me, approved
Gabe Black: Looks good to me, approved



diff --git a/src/arch/hsail/gen.py b/src/arch/hsail/gen.py
index bb60121..23ce02e 100755
--- a/src/arch/hsail/gen.py
+++ b/src/arch/hsail/gen.py
@@ -703,7 +703,7 @@
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')))
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14655
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I7fbfc6ff264bc32a265f2724c772b8fae08590f7
Gerrit-Change-Number: 14655
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Brandon Potter <***@amd.com>
Gerrit-Reviewer: Gabe Black <***@google.com>
Gerrit-Reviewer: Jason Lowe-Power <***@lowepower.com>
Gerrit-MessageType: merged
Loading...