summaryrefslogtreecommitdiff
path: root/src/cpu/pc_event.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-02-15 17:10:02 -0800
committerGabe Black <gabeblack@google.com>2019-02-20 10:20:46 +0000
commitd07cceb13e13cfe806c37527e602cde0789ea8c3 (patch)
tree5821421e3ae3a7c318a06a4185aef81c70429403 /src/cpu/pc_event.hh
parentcb7fe24ab7effe526a03a51fc34f6cce8056d04f (diff)
downloadgem5-d07cceb13e13cfe806c37527e602cde0789ea8c3.tar.xz
config: Make parameter conversion handle integers in other bases.
Python's float() function/type can't handle hexadecimal notation, but int() can. Since there are also cases where converting to a float and then back to an int (or long) can cause rounding error, this change splits toFloat and toInteger apart and makes them call a worker function which accepts a conversion function which does the work of converting a numeric string into an actual number. in the case of toFloat, it still uses the standard float(), and in the case of toInteger it uses a lambda which wraps int(x, 0). Change-Id: Ic46cf4ae86b7eba6f55d731d1b25e3f84b8bb64c Reviewed-on: https://gem5-review.googlesource.com/c/16504 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/cpu/pc_event.hh')
0 files changed, 0 insertions, 0 deletions