hsail: fix unsigned offset bug in address calculation
Review Request #3691 - Created Oct. 31, 2016 and submitted
| Information | |
|---|---|
| Tony Gutierrez | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 11880:38d5aefff9bd --------------------------- 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.
LGTM. Just to double check, if the offset is -3, then offset.hi is 0 and offset.low is -3 in two's complement? I.e., if the instruction is 32-bits, the offset is NOT sign extended in BRIG?
