History log of /gem5/src/base/cprintf_formats.hh
Revision Date Author Comments
# 12481:f8324edb4d24 29-Jan-2018 Gabe Black <gabeblack@google.com>

base: Remove the ability to cprintf stringstreams directly.

The cprintf functions don't know ahead of time what format characters
are going to be used with what underlying data types, and so any
type must be minimally usable with the default specialization of
format_integer, format_char, format_float and format_string. All of
those functions ultimately print their parameter with out << data
except the one which prints stringstreams. That function accesses the
buffer of the string stream with .str(), and then prints that instead.

That should technically work out ok as long as stringstreams are only
printed using %s, but there's no way to guarantee that ahead of time.
To avoid that problem, and because gem5 doesn't ever actually use the
ability to print stringstreams directly, this change removes that
feature and modifies the corresponding part of the unit test.

If we ever do want to print the contents of a string stream, it won't
be difficult to add a .str() to it.

Change-Id: Id902eaff042b96b374efe0183e5e3be9626e8c88
Reviewed-on: https://gem5-review.googlesource.com/7642
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12480:8ea05a9ce49e 29-Jan-2018 Gabe Black <gabeblack@google.com>

base: Delete commented out versions of the format_integer function.

If they're needed, they'd be fairly easy to recreate and are also
available in the revision history.

Change-Id: I5cf5e4b1271ce488016464048de69bc643dee4d9
Reviewed-on: https://gem5-review.googlesource.com/7641
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12365:4444393b3551 04-Dec-2017 Gabe Black <gabeblack@google.com>

base: Handle zero fill in cprintf when printing floats.

The fill_zero flag was being followed for ints, but not for floats.
This makes the cprintf unit test pass.

Change-Id: I4d17a3c9327aea05e0a3c81be1886c0c9256f03c
Reviewed-on: https://gem5-review.googlesource.com/6322
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 10375:b1bc989611da 19-Sep-2014 Andreas Hansson <andreas.hansson@arm.com>

misc: Restore ostream flags where needed

This patch ensures we adhere to the normal ostream usage rules, and
restore the flags after modifying them.


# 10360:919c02740209 09-Sep-2014 Andreas Hansson <andreas.hansson@arm.com>

misc: Fix a number of unitialised variables and members

Static analysis unearther a bunch of uninitialised variables and
members, and this patch addresses the problem. In all cases these
omissions seem benign in the end, but at least fixing them means less
false positives next time round.


# 5756:88038cdbb9e1 03-Dec-2008 Nathan Binkert <nate@binkert.org>

cprintf: support a configurable width and precision ("*" in printf)


# 5546:4ffc3cafba9b 19-Sep-2008 Nathan Binkert <nate@binkert.org>

Use the proper version of C++ headers


# 4039:b910b61a52b9 08-Feb-2007 Nathan Binkert <binkertn@umich.edu>

Get rid of the gross operator,()/variadic macro hack
that made ccprintf and friends work, turn it into a
normal function (though it still has a slightly strange
implementation.) All instances of variadic macros
are not yet removed, but I know how, and it will happen.

One side effect of this new implementation is that a
cprintf statement can now only have 16 parameters, though
it's easy enough to raise this number if needed.


# 3940:b87f85bb4275 27-Jan-2007 Ali Saidi <saidi@eecs.umich.edu>

While I'm waiting for legion to run make m5 compile with a few more compilers

SConstruct:
src/SConscript:
Add flags for Intel CC while i'm at it
src/base/compiler.hh:
the _Pragma stuff needst to be called this way unless someone happens to have a cleaner way
src/base/cprintf_formats.hh:
add std:: where appropriate
src/base/statistics.hh:
use this->map since icc was getting confused about std::map vs the locally defined map
src/cpu/static_inst.hh:
Add some more dummy returns where needed
src/mem/packet.hh:
add more dummy returns where needed
src/sim/host.hh:
use limits to come up with max tick


# 3857:2d724684bef3 18-Dec-2006 Nathan Binkert <binkertn@umich.edu>

cast chars to int when we want to print integers so we get a number
instead of a character


# 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.