Commit Graph

1187 Commits

Author SHA1 Message Date
Gabriel Busnot
6fb72d84e1 base: Find lsb set generalization and optimization (#76)
* base: Generalize findLsbSet to std::bitset<N>

* base: Split builtin and fallback implementations of findLsbSet

* base: Add more unit testing for findLsbSet

Change-Id: Id75dfb7d306c9a8228fa893798b1b867137465a9

---------

Co-authored-by: Gabriel Busnot <gabriel.busnot@arteris.com>
2023-07-17 15:32:04 -07:00
Gabriel Busnot
73afee1e0d base: Provide stl_helpers::operator<< for more types
This operator can be safely brought in scope when needed with "using
stl_helpers::operator<<".

In order to provide a specialization for operator<< with
stl_helpers-enabled types without loosing the hability to use it with
other types, a dual-dispatch mechanism is used. The only entry point
in the system is through a primary dispatch function that won't
resolve for non-helped types. Then, recursive calls go through the
secondary dispatch interface that sort between helped and non-helped
types. Helped typed will enter the system back through the primary
dispatch interface while other types will look for operator<< through
regular lookup, especially ADL.

Change-Id: I1609dd6e85e25764f393458d736ec228e025da32
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67666
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2023-07-10 23:00:45 +00:00
Bobby R. Bruce
160681cabf misc: Update version info for develop branch
Change-Id: Iecee9e230c1c80f5675ec14bbeba9f7d9e2b8664
2023-07-10 12:28:44 -07:00
Bobby R. Bruce
54501c3e2b misc: Merge branch 'stable' into 'develop'
This ensures all commits in v23.0 are now in the develop branch.

Change-Id: I791346115dd123f3541a3c8060482e00cf4dbfb5
2023-07-10 12:24:27 -07:00
Bobby R. Bruce
e377e15c07 misc: Update gem5 version to v23.0.0.0
Change-Id: Ie14b35a62a152e3d78b16bcd4c92ec9a790f1396
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71724
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2023-07-08 00:31:31 +00:00
Gabriel Busnot
b8af5f6a6c base: stl_hlp::unordered_{map,set} with stl_hlp::hash by default
Change-Id: Iad01d7fa6ff6293a2d931ba796666ad3550c6e44
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67664
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2023-07-07 10:17:54 +00:00
Gabriel Busnot
eb241e8a99 base: Provide several hash implementations for common types
These types include std::pair, std::tuple, all iterable types and any
composition of these. Convenience hash factory and computation
functions are also provided.

These functions are in the stl_helpers namespace and must not move to
::std which could cause undefined behaviour. This is because
specialization of std templates for std or native types (or
composition of these) is undefined behaviour. This inconvenience can't
be circumvented for generic code. Users are free to bring these hash
implementations to namespace std after specialization for their own
non-std and non-native types.

Change-Id: Ifd0f0b64e5421d5d44890eb25428cc9c53484eb3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67663
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-07-07 10:17:54 +00:00
Gabriel Busnot
5282fac317 base: define is_std_hash_enabled type trait
Change-Id: I7ffb7f80a90006d6b8cd42bdf3d63e34c6dbda01
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71839
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2023-07-07 10:17:54 +00:00
Gabriel Busnot
2f327fa2b8 base: define is_iterable type trait
Change-Id: I38bb0ddcbb95645797f1d20724b78aff3bef4580
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71838
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2023-07-07 10:17:54 +00:00
Yan Lee
b923cbe840 base: add Activate to enable log of particular targets
When the activate list is not empty, only the target name in the list
will be enabled on logging. Even if the target name is in the activate
list, it will need to enable the flag with --debug-flags to enable the
log correctly.

Change-Id: Ic41cb97c8a2530fdc01e954d6cab76ae475d8722
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70617
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2023-05-16 09:02:38 +00:00
Bobby R. Bruce
6dd60a6c1a base,arch,mem: Remove {GE}M5_VAR_USED instances
`[[maybe_unused]]` is to be used to specify that a variable is used.

Change-Id: Ife2ac96111b3af13e182baba1f3456e48c3a9f9b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70397
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2023-05-08 22:54:06 +00:00
Melissa Jost
74072cdc80 base: Update <experimental/filesystem> include
This change addresses an error in the compiler tests:
https://jenkins.gem5.org/job/compiler-checks/573/

For clang versions 6 through 10, as well as GCC 7,
in order to use the "filesystem" module, you must
include the experimental namespace.  In all newer
versions, you can use the "filesystem" module as is.

Because of this, include guards to handle this. They include
"<experimental/filesystem>" for the older clang versions and
the "<filesystem>" for all other versions.

As opposed to checking by version, we now check if the
filesystem library has been defined before using it.

Change-Id: I8fb8d4eaa33f3edc29b7626f44b82ee66ffe72be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69778
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-04-24 23:30:01 +00:00
Yen-lin Lai
e7ae5290f5 base: Fix VNC server initialization
In a previous commit, the initialization of dataFd to -1 is removed.
Add it back so VNC server can properly accept connection.

Fixes: 67fb75d659 ("base,cpu,dev,sim: Pull common logic into ListenSocket::listen().")
Change-Id: I4246d1fddc766cb190a04d4f984fc1ce73af3fb0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69757
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2023-04-19 05:42:24 +00:00
Gabe Black
0af4b60acb base: fatal() if a socket path doesn't fit in sockaddr_un.sun_path.
Normally this would just generate a warning, but a warning is easy to
miss, and truncating the path to fit would be surprising. Since the max
length isn't likely to change, a path which has to be truncated is
essentially fundementally wrong, and could be defined as something
else which is short enough before being used in the config.

Note that this only applies to either the abstract path which is just
a string, or the file name and not the directory path on a file based
socket.

Change-Id: I8702cf02c03053b5d0b6133f25b0e588de666f15
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69677
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Earl Ou <shunhsingou@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-04-12 11:55:31 +00:00
Gabe Black
716c154b51 arch,base,dev,sim: Convert objects to use the HostSocket param type.
This will make it possible to connect any of these objects with a
named socket, in addition to the usual port numbers.

Change-Id: Id441c3628f62d60608a07c5cb697786e33199981
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69166
Reviewed-by: Jui-min Lee <fcrh@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
2023-04-12 02:18:22 +00:00
Gabe Black
2a44f3bfc7 base: Remove the now unused UnixSocketAddr class and associated code.
This job is now handled by the python param code, and the ListenSocket
classes.

Change-Id: I3a29b880b2484c5e25071bdef59fc73e1e8c2760
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69169
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Simon Park <seminpark@google.com>
2023-04-11 21:14:54 +00:00
Gabe Black
57aaccdeff base,python: Add a param type for host sockets.
These can either be set to an integer, in which case it's interpreted
as a TCP port, or a string, in which case it's treated as a unix domain
socket. If the unix domain socket is prefixed with a "@", it will be
treated as an abstract socket.

When stored in the ini file, there is always a prefix added to make
parsing the string more systematic and less ambiguous. A port number is
prefixed with "#", an abstract socket with "@", and a socket file with
the prefix "P" for "path".

Change-Id: I1fc7a579074e849b3becd936238c62fb0d9a2087
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69165
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-04-11 09:11:34 +00:00
Bobby R. Bruce
e79d6616dd base: Use <experimental/filesystem> include for GCC v7
gem5 officially supports GCC 7+. In GCC 7 the "filesystem" module was
added but only in the "experimental" namespace as
"<experimental/filesystem>". In GCC 8+ the module can be found as
"<filesystem>".

Because of this, include guards to handle this. They include
"<experimental/filesystem>" for the GCC v7 case and the "<filesystem>"
for all other versions.

This bug was partially responsible for this compiler tests failures:
https://jenkins.gem5.org/job/compiler-checks/570

Note: gem5 does not support GCC versions <7. Thus the
"#if __GNUC__ >=8 <GCC 8+ code> #else <GCC 7 code> #endif" logic is
valid.

Change-Id: I31db5488f272f9652edebf24ecefca3722369076
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69598
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2023-04-11 06:08:23 +00:00
Gabe Black
7eff90acdc base: Add support for unix domain sockets in ListenSocket.
Change-Id: I6a5fa2cd3e4b567829203bf9d61ad2b55c259697
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69164
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jui-min Lee <fcrh@google.com>
2023-04-10 02:42:37 +00:00
Wei-Han Chen
c98d0d2f93 base: Add missing headers in extensible.hh
Add missing headers <cassert> and <type_traits> in extensible.hh

Change-Id: I01e49c62619383ea4f7da668ceaefe4a41418cd8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69480
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2023-04-08 01:21:48 +00:00
Gabe Black
c00e3b2570 base: Abstract the AF_INET-ness out of ListenSocket.
Put them into a subclass called ListenSocketInet.

Change-Id: I035621463a7f799c1d36a500ed933dc056238e5e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69163
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jui-min Lee <fcrh@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-04-05 06:58:04 +00:00
Gabe Black
d03bc9d33c base,cpu,dev: Add a level of indirection for ListenSockets.
This makes room for there to be different implementations for different
types of sockets.

Change-Id: I8c959e2c3400caec8242e693e11330e072bc2c5f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69162
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2023-03-29 07:27:43 +00:00
Gabe Black
7c614d225b base: Make ListenSocket::listen(int port) protected.
Stop making the old API available.

Change-Id: I70752d081cb572a8ae5bf396d2ea43ecc7be1e9c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69161
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-03-29 03:05:06 +00:00
Gabe Black
67fb75d659 base,cpu,dev,sim: Pull common logic into ListenSocket::listen().
Create a version of listen() which handles common logic internally,
including scanning for an available port number, and notifying what
port was chosen.

The port is managed internal to ListenSocket, so that the logic
interacting with it doesn't need to manually manage a port number, and
hence a port number does not need to exist for non AF_INET sockets.

Change-Id: Ie371eccc4d0da5e7b90714508e4cb72fb0091875
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69160
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2023-03-29 03:05:06 +00:00
Gabe Black
db1a5a367d base,cpu,dev: Simplify ListenSocket::listen().
Remove the "reuse" parameter which default to true and was always
also explicitly set to true. Tidy up the code itself slightly, mostly
by using "panic_if" to remove some nesting.

Change-Id: Ie23971aabf2fe4252d27f1887468360722a72379
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69159
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-03-22 09:19:44 +00:00
Yu-hsin Wang
daaccaa9ae fastmodel: skip vector registers update in remote gdb
iris::ThreadContext doesn't implement the write interface for vector
registers. Skip that part in fastmodel remote_gdb to make updating
common registers work at least.

Change-Id: Ifa071f5dff4bdeee7361ae824b4b76e0b2805460
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69177
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-03-22 08:33:30 +00:00
Gabe Black
2e1d24d048 base,dev: Simplify the ListenSocket::accept method.
Remove the nodelay option which is always set to the same thing, and
simplify the logic of the method itself.

Change-Id: I78cd91f99cbaec9abddedbc7dcddc563daedb81f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69158
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
2023-03-22 08:27:23 +00:00
Gabe Black
fb4eb86711 base: Flip the default for ListenSocket::accept(bool nodelay).
This option was almost always overridden from false to true anyway,
except in one place (in the ethertap device) which was likely just by
accident.

This will give external users a chance to remove the option without
changing behavior, so that the option can be removed entirely in a
later change.

Change-Id: I77add40b8131b91997b2aecbfff6c7de0ee9ead9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69157
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
2023-03-22 03:20:43 +00:00
Giacomo Travaglini
7b39a7f14e misc: Rename DEBUG macro into GEM5_DEBUG
The DEBUG macro is not part of any compiler standards (differently from
NDEBUG, which elides assertions).

It is only meant to differentiate gem5.debug from .fast and .opt builds.
gem5 developers have used it to insert helper code that is supposed to
aid the debugging process in case anything goes wrong.

This generic name is likely to clash with other libraries linked with
gem5.  This is the case of DRAMSim as an example.

Rather than using undef tricks, we just inject a GEM5_DEBUG macro
for gem5.debug builds.

Change-Id: Ie913ca30da615bd0075277a260bbdbc397b7ec87
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69079
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2023-03-21 06:53:55 +00:00
Giacomo Travaglini
2bbd2b9596 base: Remove unnecessary DEBUG guard
There is no performance improvement on guarding a cprint
before a panic. We should just print as many info as possible
anytime we encounter a failure

Change-Id: I3ee9fb2c3b8a8f23bdf6173bb2a010020f2b2572
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69077
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-03-21 06:53:55 +00:00
Razeza
a589d7b569 arch-x86: Add instructions from SSE4.1 set.
The following instructions were implemented: PHMINPOSUW, ROUNDSS, ROUNDSD, EXTRACTPS, INSERTPS, PMULLD, PMULDQ,
PCMPGTQ, PMINUW, PMINUD, PMINSB, MINSD, PMAXUW, PMAXUD, PMAXSB, PMAXSD, PEXTRB, PEXTRW for memory, PEXTRD, PEXTRQ,
PINSRB, PINSRD, PINSRQ, PACKUSDW, PBLENDW, BLENDPS, BLENDPD, BLENDVPD, BLENDVPS, PBLENDVB, PMOVSXDQ, PMOVSXWQ,
PMOVSXWD, PMOVSXBQ, PMOVSXBD, PMOVSXBW, PMOVZXDQ, PMOVZXWQ, PMOVZXWD, PMOVZXWD, PMOVZXBQ, PMOVZXBD, PMOVZXBW.

Also fix bug in PACKUSWB_XMM_M, it was marked as sign operation, though it is unsigned.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-1308

Change-Id: I1a8d26c0426690841dcc80a6fa5dcffb8cbc5d9a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67737
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-03-13 10:24:16 +00:00
Gabriel Busnot
ba19f967d7 sim: Use ref constructor of MemberEventWrapper everywhere
Change-Id: I77989aa7318142634c771c558293138e7b1e8e51
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67657
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2023-03-13 06:47:09 +00:00
Gabriel Busnot
1bb8cd3d44 sim: Switch from EventWrapper to MemberEventWrapper before deprec
Change-Id: I25c81787d522a0dd063112b6727669da46e0f0e7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67655
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2023-03-13 06:47:09 +00:00
Gabriel Busnot
9fe9b2853c base: Create a gem5 type_traits.hh header
That header currently contains type traits that derive the class, the
return type and the arguments of a member function from a pointer to
that member function.

Change-Id: I41dd41056f507016219d6111d25c8cb4c2ad3439
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67652
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-03-13 06:47:09 +00:00
Alex Richardson
18ba4e1278 tests: Fix GCC -W(maybe-)uninitialized warnings
These all look like valid (but harmless) diagnostics to me and are
all simple to fix. Most of them can be fixed by using ASSERT_* variants
of the GTest checkers to ensure that the remainder of the function is
not executed and the uninitialized result isn't touched.

Change-Id: Ib5fe2ac2ec539c880d670ebc3321ce98940c7e38
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68517
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2023-03-07 09:23:25 +00:00
handsomeliu
da050eedde base: support calculating the intersection of two AddrRange
Change-Id: I2f089039c709fe4c3f7086263fb56470c7713bad
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68617
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-03-04 17:45:44 +00:00
Melissa Jost
6884aeb86a base: Fix gcc-13 build error
This change adds relevant errors that allow building with
gcc-13.

Change-Id: Ib97a90ef647a9cd9ec1bf1f2bde61daca85de427
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68497
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-03-04 02:08:41 +00:00
Yan Lee
4dfc312d6d base: extensible: add example codes of extension
Change-Id: Iaab1f2998a3f621b86d63bed7274373ba433d71c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68017
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-02-21 06:03:05 +00:00
Yan Lee
109c327209 base: add extensible type
Extensible is for carrying additional user-defined
information. Each type of the extension will have a unique
extension ID and there is a linked list of extension in every
Extensible object. There will be most one extension with the same type in
the linked list. With the shared_ptr, the extension will be
deleted automatically. That is, the caller should allocate
the extension and add into the packet.

Change-Id: I54729536a305c91c751d5fb059bd2f9a3db05523
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62892
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2023-02-17 03:51:19 +00:00
Gabriel Busnot
d7cb6ac2b1 base: Turn all logging.hh macros into expression kind
In the previous version, the body of several macros was a statement
(do{...} while(0);) and not an expression. In the new version, all
macros are expressions. Expressions can be used everywhere a statement
is expected and in other locations as well.

For instance, expressions can be used with the comma operator. When
doing generic programming, the comma operator helps manipulating
parameter packs.  With a statement-based implementation,
(gem5_assert(args > 0), ...) could not be written while perfectly
sound.

Also, (c1 ?  a : c2 ?  b : (gem5_assert(c3), c)) is a usefull
expression to assert completeness of cascaded conditions that cannot
be easily and efficiently achieved without an expression kind of
assertion.

Change-Id: Ia0efeb15e6deda6b90529a6f0e00ebe2e9b5d2a0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67336
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-02-03 06:11:45 +00:00
Gabriel Busnot
cd2f8b3e6f base: Enable non-copiable types in gem5_assert message formatting
Previous implementation was taking string formatting arguments by value,
which requires copiability or movability. Took the oportunity to scope
the helper functions inside the macro using lambdas.

Change-Id: I2cefc18df1e99b70e60e64588df61eb72a3e5166
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67335
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-02-03 06:11:45 +00:00
Gabriel Busnot
c1b1a702f9 tests: Make the GTestException type accessible to unit tests
Change-Id: I654589a3d90377657393d98e75c0697ba0e72c76
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67455
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2023-02-03 06:11:45 +00:00
Gabriel Busnot
3bdbe482c2 base: Strengthen safe_cast and make it work for reference types
safe_cast now supports the exact same types as dynamic_cast would. In
particular, it now supports l-value references and rejects r-value
references.

The non-debug version has also been updated to make it build only in
the same cases as the debug version of safe_cast would.

Change-Id: I86692561c169b1ad063000c990a52ea80c6637ca
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67453
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-02-03 06:11:45 +00:00
Daniel R. Carvalho
93f0de95d6 misc: Remove the m5 namespace
This namespace has gone through the deprecation period
and can now be removed.

Change-Id: Iffc6d903da1d619c0914379d0ceabc88453b3ac7
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67367
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-01-17 09:16:20 +00:00
Daniel R. Carvalho
1e80ba7862 misc: Remove the Net namespace
This namespace has gone through the deprecation period
and can now be removed.

Change-Id: Ia2e1ef1619f51a0d7c0da9c7b4a160cd88ed8a65
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67366
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2023-01-17 09:16:20 +00:00
Daniel R. Carvalho
cc3d75ad72 base: Remove the Loader namespace
This namespace has gone through the deprecation period
and can now be removed.

Change-Id: I87b763fccfcdf720909dfbda9c3fc8f6dea36a61
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67362
Tested-by: kokoro <noreply+kokoro@google.com>
2023-01-17 09:16:20 +00:00
Daniel R. Carvalho
544d53798b base: Remove the Units namespace
This namespace has gone through the deprecation period
and can now be removed.

Change-Id: I3d885e656caea0f96dfbdda69713832ff5f79d28
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67361
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-01-17 09:16:20 +00:00
Daniel R. Carvalho
d2bfb4aeef base: Remove the Debug namespace
This namespace has gone through the deprecation period
and can now be removed.

Change-Id: I4241501f3683c1daa8554693cba7aa2c022db130
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67360
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2023-01-17 09:16:20 +00:00
Daniel R. Carvalho
4f480fc6fc base: Remove the Stats namespace
This namespace has gone through the deprecation period
and can now be removed.

Change-Id: I80f25af68e03fff3df8316cb4d1d2669687d0fe4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67359
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-01-17 09:16:20 +00:00
Daniel R. Carvalho
65317b6fc9 base: Remove the BloomFilter namespace
This namespace has gone through the deprecation period
and can now be removed.

Change-Id: Ib919285c6270eb53bd29ab534f3f9b5612417bb2
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67358
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
2023-01-17 09:16:20 +00:00