summaryrefslogtreecommitdiff
path: root/src/cpu/legiontrace.hh
diff options
context:
space:
mode:
authorDam Sunwoo <dam.sunwoo@arm.com>2012-01-09 18:08:20 -0600
committerDam Sunwoo <dam.sunwoo@arm.com>2012-01-09 18:08:20 -0600
commit3f9e352de4e1ac34e1f0b83c3f66af2175b524f4 (patch)
tree38397e9b46754ce2211a689639484883ba2ea5be /src/cpu/legiontrace.hh
parent6a6d888ab486546c0b2e3facb9d1ce3ee417e9ae (diff)
downloadgem5-3f9e352de4e1ac34e1f0b83c3f66af2175b524f4.tar.xz
Base: Fixed shift amount in genrand() to work with large numbers
The previous version didn't work correctly with max integer values (2^31-1 for 32-bit, 2^63-1 for 64bit version), causing "shift" to become -1. For smaller numbers, it wouldn't have caused functional errors, but would have resulted in more than necessary loops in the while loop. Special-cased cases when (max + 1 == 0) to prevent the ceilLog2 functions from failing.
Diffstat (limited to 'src/cpu/legiontrace.hh')
0 files changed, 0 insertions, 0 deletions