hsail: fix unsigned offset bug in address calculation
authorTony Gutierrez <anthony.gutierrez@amd.com>
Fri, 2 Dec 2016 16:40:52 +0000 (11:40 -0500)
committerTony Gutierrez <anthony.gutierrez@amd.com>
Fri, 2 Dec 2016 16:40:52 +0000 (11:40 -0500)
commit38708f369bc5ec6f6a4db973d0413f0b3ce7f97a
treefaaeaa7a7340dfda883e6733a146ff5dfd8aec0e
parent80607a2a1d32a15cabf9110e27855acb40a06f23
hsail: fix unsigned offset bug in address calculation

it's possible for the offset provided to an HSAIL mem inst to be a negative
value, however the variable we use to hold the offset is an unsigned type.
this can lead to excessively large offset values when the offset is negative,
which will almost certainly cause the access to go out of bounds.
src/arch/hsail/operand.hh