#
13689:0aa17326eef9 |
|
07-Feb-2019 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
base: Fix enums checkpointing
Creating an extra version of string to number converters (__to_number) in base/str.hh; it will be used by enums only when unserializing them. The reason not to have a single helper for both enums and integers is that std::numeric_limits trait is not specialized for enums. We fix this by using the std::underlying_type trait.
Change-Id: I819e35c0df8c094de7b7a6390152964fa47d513d Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/16382 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
|
#
13530:765c1692adfb |
|
08-Jan-2019 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
base: Make it possible to convert strings to enums
The __to_number helper function defined in base/str.hh is used by unserializing code. Its purpose is to convert a string into an integral/floating point number. Since enums underlying type can only be an integer type, it makes sense to extend the helper function for enums as well. In this way it will be possible to unserialize Enums and containers of Enums without the need of casting.
Change-Id: I74069cc4c04ec8b5eb80939acea7ab18fb366dd4 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15336 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
|
#
13439:bfded2538477 |
|
16-Nov-2018 |
Gabe Black <gabeblack@google.com> |
base: Don't let exceptions leak from the to_number utility function.
This function catches a couple types of exceptions the functions it calls might throw, but if one that it doesn't catch is thrown, then it will propogate that exception to its own callers, and not initialize the value it was asked to convert.
This might be considered desirable behavior since it lets errors propogate and avoids handling them in code that might not know the context of when it's called. On the other hand, it upsets g++ since it thinks that there might be an uninitialized value used elsewhere, even though that value will only be uninitialized if an exception is propogating, and the code that would use it is after a point where that exception would have been caught and execution would have resumed.
To satisfy g++ and to also avoid silently hiding errors, this change adds a catch all which will panic if an unexpected exception is raised.
Change-Id: Ie94dcef3a50f7902566328a3fa2eac59b3cf9aad Reviewed-on: https://gem5-review.googlesource.com/c/14399 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
|
#
10386:c81407818741 |
|
20-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
base: Clean up redundant string functions and use C++11
This patch does a bit of housekeeping on the string helper functions and relies on the C++11 standard library where possible. It also does away with our custom string hash as an implementation is already part of the standard library.
|
#
9142:e9b713df4e1d |
|
06-Aug-2012 |
Steve Reinhardt <steve.reinhardt@amd.com> |
str: add an overloaded startswith() utility method for various string types and use it in a few places.
|
#
8229:78bf55f23338 |
|
15-Apr-2011 |
Nathan Binkert <nate@binkert.org> |
includes: sort all includes
|
#
2665:a124942bacb8 |
|
31-May-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
Updated Authors from bk prs info
|
#
2632:1bb2f91485ea |
|
22-May-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
New directory structure: - simulator source now in 'src' subdirectory - imported files from 'ext' repository - support building in arbitrary places, including outside of the source tree. See comment at top of SConstruct file for more details. Regression tests are temporarily disabled; that syetem needs more extensive revisions.
SConstruct: Update for new directory structure. Modify to support build trees that are not subdirectories of the source tree. See comment at top of file for more details. Regression tests are temporarily disabled. src/arch/SConscript: src/arch/isa_parser.py: src/python/SConscript: Update for new directory structure.
|