Gabe Black
3c84bb7a77
cpu: Add a sendFunctional function to the ThreadContext.
...
This can be used to send a functional packet from the perspective of a
thread context. Currently this will not consider targets within the CPU
like the local APIC on x86. The default implementation sends a packet
using the port on the way out of the CPU.
Change-Id: Idb311e156a416ad51b585794c1e9fa75711d61f1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45861
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com >
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com >
2021-05-24 22:45:14 +00:00
Gabe Black
f511aa977e
cpu: Fix syntax in cpu/simple_thread.hh.
...
Change-Id: Id23de4651eb6b03b569ab48fd1dcf186e7b192dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45860
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com >
2021-05-24 16:58:58 +00:00
Gabe Black
1e99a99c90
cpu: Fix style in cpu/simple/base.hh.
...
Change-Id: Ie5ef296ef82bf974c6bf2448c493242dad40c760
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45859
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com >
2021-05-24 16:58:48 +00:00
Gabe Black
f30d15a29e
cpu: Delete the now unused cpu/o3/impl.hh.
...
Change-Id: I99b6ec745066c154079c3f44086d2e8721c0ed82
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42119
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
f7902540e0
cpu: De-templatize the O3ThreadState.
...
Change-Id: Ifa6342abe396e131ae8edcb8111453852cdbefd7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42118
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
fda2e46a9e
cpu: De-templatize the FullO3CPU class.
...
Change-Id: Ib7f1e40447a2f5a49e0c9a3af8579d075d5d3625
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42117
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
4ba06c8f25
cpu: Delete the unnecessary BaseO3CPU class.
...
This class has no content, and is not used for anything except as an
extra layer between FullO3CPU and BaseCPU.
Change-Id: Idb6258a655b0fb614e94b0fc0e281696d5081ab0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42116
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
157f9757c2
cpu: De-templatize the O3ThreadContext.
...
Change-Id: I1559760949031bd63bd3a48e62c37448c1f6f5b6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42115
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
2021-05-21 01:19:37 +00:00
Gabe Black
e164d08287
cpu: De-templatize the O3 DefaultCommit.
...
Change-Id: I054cb344a5e3829caf6cbd26e931514b877c1577
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42114
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
fe65f1e864
cpu: De-templatize the O3 DefaultRename.
...
Change-Id: I28fbf5f3727c94ddf64a0e047784663508c6bda2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42113
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
03a843cf77
cpu: De-templatize the O3 DefaultIEW.
...
Change-Id: Ieb7b23250573a3bc7e7ff296ff6bf8811a865802
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42112
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
9722ce0075
cpu: De-templatize the O3 LSQ.
...
Change-Id: I7821fe971c0c38b77e730b4c40fb9fb204c6e7fd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42111
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
da4c0590ee
cpu: De-templatize the O3 DefaultDecode.
...
Change-Id: If2cef59654db4f5ff8e7cb73d1951895e5e12c9d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42110
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
f4a3380167
cpu: De-templatize the O3 DefaultFetch.
...
Change-Id: I5d4ce7a269c9f1df497003404872a977e7edb575
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42109
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
9adca30528
cpu: De-templatize the O3 InstructionQueue.
...
Change-Id: Id897b66b4041a6be4c85019585b205e8d8b366e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42108
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-21 01:19:37 +00:00
Gabe Black
0f667aff1f
cpu: De-templatize O3's LSQUnit.
...
Change-Id: Id426950b4fec9b98855b3f9f95e63fc0d9b6e64f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42107
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
2021-05-21 01:19:37 +00:00
Gabe Black
7ef28e9517
cpu: De-templatize the O3 ROB.
...
Change-Id: I257d2a71be5d4254437d84a5bfa59e2e8dc6420a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42106
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-20 20:08:41 +00:00
Gabe Black
2801cc08c0
cpu: De-templatize the O3 MemDepUnit.
...
Change-Id: I4c1d6b1246fe4ca9f8a9cc9d434ca20f512f8d2f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42105
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-20 20:08:24 +00:00
Gabe Black
4f4df67148
cpu: Remove the MemDepPred template parameter from MemDepUnit.
...
Hard code this to StoreSet, the only value ever used with this
parameter. If the dependency predictor needs to be updatable, there
should be a well defined interface for it which can be connected at run
time.
Change-Id: Ie30a742eac98220cc39679d26ada5d08099659a0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42104
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-20 20:08:02 +00:00
Gabe Black
eacc352ebd
cpu: Remove comm types from O3CPUImpl.
...
This struct is now empty, although we still need to keep it until all
the types within O3 have been de-templated and no longer need a template
argument.
Change-Id: I3889bdbb1b8d638f7b04e5bfb7698e35eb7f2e57
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42103
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-20 20:07:47 +00:00
Gabe Black
fc51c87329
cpu: Remove the O3CPU type from the O3CPUImpl.
...
Change-Id: I4dca10ea3ae1c9bb0f2cb55c7d303f1fd8d25283
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42102
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-05-20 20:07:29 +00:00
Gabe Black
2db8b308e0
cpu: Drop the DynInstPtr types from O3CPUImpl.
...
Aside from basic code editting, this also moves some methods from the
.hh files to the _impl.hh files. It also changes the Checker CPU
template to take the DynInstPtr type directly instead of through Impl
since that was the only type it used anyway. Finally it sets up a header
file which predeclares the O3DynInstPtr and O3DynInstConstPtr types so
they can be used without having to also include the BaseO3DynInst class
definition to break circular dependencies.
Change-Id: I5ca6af38ec13e6e820abcdb3748412e4f7fc1c78
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42101
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-20 20:07:09 +00:00
Gabe Black
ab645bf854
cpu: Collapse the SimpleCPUPolicy into O3CPUImpl.
...
Change-Id: I0bc160f28f084c8873c3e19be9a4d7a45f9480a0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42100
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-20 06:40:58 +00:00
Gabe Black
4abe9ac08b
misc: Switch away from the deprecated UNIT_* macros.
...
Expand the macros in place.
Change-Id: I5dba512b99a1204c23a995e112248b86523b77c8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45560
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-19 21:42:34 +00:00
Gabe Black
a0fa1e03b2
cpu: Check the KVM API version with a static_assert instead of macros.
...
Change-Id: Id8d52e25c4582ad802ee59facad5a1c31c2aa216
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45743
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-19 20:06:04 +00:00
Gabe Black
d53c0a95ee
cpu: Make some compiler guards consistent with the other files.
...
Change-Id: I9dd007ad4ea0e1ff93677333a2f5e1f9b5d2a8fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45741
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-19 20:05:46 +00:00
Gabe Black
db21d1bb39
cpu: Eliminate some macros in the minor CPU.
...
These were MINORTRACE, MINORINST, and MINORLINE. Replace them with
inline template functions.
Change-Id: I02b13d60b41349dfe7ac33e6009c0e3e5cf11156
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45620
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-19 00:27:16 +00:00
Gabe Black
26c03495fa
cpu: Stop using macros for constants in the multiperpsective_perceptron.
...
Enums work just as well and respect namespaces and scopes.
Change-Id: If726ff325be7114c9a749f5f4e1a193552a24c2b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45519
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-15 06:30:13 +00:00
Daniel R. Carvalho
9b675ebea8
misc: Add missing compiler.hh include
...
Add some missing base/compiler.hh includes.
Found by manually checking the files in:
grep -r --include \*.hh -L \
'#include "base/compiler.hh"' \
$(grep -r -l "GEM5_" src/)
And occasionally checking some .cc files through
a similar methodology.
Change-Id: I6b6e27189c627bb76ace73c338486743d469be46
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br >
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45459
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
Maintainer: Jason Lowe-Power <power.jg@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-14 10:02:14 +00:00
Gabe Black
02ae343c66
misc: Replace M5_CLASS_VAR_USED with GEM5_CLASS_VAR_USED.
...
Change-Id: Ibd2230d684f41201b07fa9083881145e36176a68
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45241
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
2021-05-11 20:16:31 +00:00
Gabe Black
97ef1472ad
misc: Replace M5_LOCAL and M5_WEAK with GEM5_LOCAL and GEM5_WEAK.
...
Change-Id: Ieb8350e647480f9bf582479b7933f0462f18d14d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45236
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
2021-05-11 20:16:31 +00:00
Gabe Black
ce6b5e7e33
misc: Replace M5_ATTR_PACKED with GEM5_PACKED.
...
Change-Id: Ie59071ca1fc81a76267a54ddd2d35dfc4477995d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45234
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
2021-05-11 20:16:31 +00:00
Gabe Black
11fe13c311
misc: Replace M5_FALLTHROUGH with GEM5_FALLTHROUGH.
...
Change-Id: I058f311b6d9c284f745bcc915db72236d05db21b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45233
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-11 20:16:31 +00:00
Gabe Black
fb3befcc6d
misc: Replace M5_VAR_USED with GEM5_VAR_USED.
...
Change-Id: I64a874ccd1a9ac0541dfa01971d7d620a98c9d32
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45231
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
2021-05-11 20:16:31 +00:00
Gabe Black
f2d3011333
cpu: Get rid of the redundant PhysRegIndex type.
...
It was defined to be effectively the same type as RegIndex, which is a
uint16_t. Having two types for essentially the same thing (which the
compiler would treat as equivalent) adds unnecessary complexity.
Change-Id: Ibf6badc19e3b0a27c3bc3e68def1e686dbef3ea8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45228
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
2021-05-10 20:04:00 +00:00
Gabe Black
8f0b33612e
cpu: Get rid of the unused NumRegClasses constant.
...
Change-Id: Icb2918a97f58a79159307a5d7cba877899268caa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45227
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
2021-05-10 20:03:49 +00:00
Gabe Black
16fa9f9812
arch,cpu: Get rid of is*Reg() methods in RegId.
...
These bake in the existing set of RegClass values and are not flexible
or scalable.
Change-Id: I107460cd82960d96916d1644403b7635820045a0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45226
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-10 20:03:38 +00:00
Gabe Black
ed5832c273
cpu: Delete an unnecessary return in RegId::flatIndex.
...
panic() is marked [[noreturn]], so there's no need to put a dummy return
after it.
Change-Id: Icebba480ef583a149188d4d6f9481fe0bbd95082
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45225
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
2021-05-10 20:03:26 +00:00
Gabe Black
41d934cf18
misc: Collapse all uses of DTRACE(x) to Debug::x.
...
Also mark the DTRACE macro as deprecated.
Change-Id: I99d9a9544b539117b375186e3e425d73d3c5cab7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45009
Tested-by: kokoro <noreply+kokoro@google.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
2021-05-10 20:00:48 +00:00
Gabe Black
d33a693e43
arch,cpu: Rename arch/registers.hh to arch/vecregs.hh.
...
The only thing still in arch/registers.hh were related to vector
registers. To make it obvious that nothing else should be added, this
change renames the file so that it has the much less generic name
arch/vecregs.hh.
Change-Id: I729697dc576e1978047688d9700dc07ff9b17044
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42686
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-05-07 19:36:08 +00:00
Gabe Black
f1cd6341ea
cpu,arch: Move the zero register index into RegClassInfo.
...
There is a design which has been put forward which eliminates the idea
of a zero register entirely, but in the mean time, to get rid of one
more ISA specific constant, this change moves the ZeroReg constant into
the RegClassInfo class, specifically the IntRegClass instance which is
published by each ISA.
When the idea of zero registers has been eliminated entirely from
non ISA specific code, this and the existing machinery can be
eliminated.
Change-Id: I4302a53220dd5ff6b9b47ecc765bddc6698310ca
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42685
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-04-29 12:48:47 +00:00
Gabe Black
7036e2174f
cpu: Pull all remaining non-comm types out of SimpleCPUPolicy.
...
Change-Id: I79c56533cf6a9d1c982cea3ca9bedc83e6afda49
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42099
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-04-29 04:23:25 +00:00
Gabe Black
86059e7a0b
cpu: Extract stage classes from O3's SimpleCPUPolicy.
...
Use the target types directly without that layer of indirection. This
also narrows the scope of some includes.
Change-Id: I152f2ce0684781a9b61bd9d5a38620c39a4c60e8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42098
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-04-29 04:23:01 +00:00
Gabe Black
729ab6d4d8
cpu: Move MaxWidth and MaxThreads from O3CPUImpl to cpu/o3/limits.hh.
...
Change-Id: I2534661bbdbd8537129403f97c8fb767a2eb85d6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42097
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-04-29 03:35:40 +00:00
Gabe Black
605399893c
arch,base,cpu: Move some type aliases into base/types.hh.
...
The arch/generic/types.hh header includes some more complicated types
which in turn bring in more dependencies, adding baggage when other code
only needs the simple RegIndex or ElemIndex types. Also the RegVal type
alias is already in base/types.hh. It doesn't really make sense to have
RegVal in one header and RegIndex in another.
Change-Id: I1360652598b5fa59e0632b1ee0e0535ace2ba563
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42966
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu >
2021-04-27 02:19:11 +00:00
Gabe Black
3c3c2c3076
cpu: Simplify the RegId class a little.
...
Having const and non const reference accessors for the RegId index are
basically the same thing as just making the index value public but with
more complexity. Stop allowing updates through the accessor, and
simplify/fix the one location that was using that.
Also, there is no good reason to return an integer value by const
reference instead of returning it by value, since the value being passed
around (a pointer) is the same size, and just makes the value harder to
access.
Change-Id: I377ffc5878ef9bffa2ac53626a87c019a585ab1a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42684
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-04-22 15:12:42 +00:00
Gabe Black
6f3c197742
cpu: Eliminate the isZeroReg() helper in RegId.
...
The isZeroReg() helper checked if the register was both an integer
register, and if it equaled TheISA::ZeroReg. This bakes in both the
assumption that any zero registers are integer (and that integer
registers are a thing), and also internalizes the plumbing which selects
what index is the zero register.
This change eliminates the isZeroReg helper and moves the logic inside
it into where it was called. In most cases, it was actually not
necessary to check if the register was integer since that was already
implied by context. This also brings the TheISA::ZeroReg constant out,
where it can be replaced by values plumbed in more generally than a
fixed, ISA specific constant.
Change-Id: I651762b6eb01fea83ec0b0076e8be9bf24b5b0da
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42683
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-04-22 12:50:48 +00:00
Gabe Black
8467e183c9
cpu,sim: Set ThreadContext's ContextID right away.
...
The code which registers thread contexts originally returned the ID that
it had chosen, and let the CPU actually set the ID in the object itself.
That opened a window where calling contextId() on the ThreadContext
would return the wrong answer.
Instead, we can just set the ID immediately after it's decided. This
also localizes that logic and removes plumbing for the ID between that
decision and where it's actually applied.
Change-Id: I31ad84c3f9bf6f5b6f72457ca640ea929b24f6a0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44615
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br >
Reviewed-by: Boris Shingarov <shingarov@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
2021-04-20 06:27:07 +00:00
Gabe Black
86301ce456
cpu: Use the built in << for VecReg and VecPredReg in ExeTrace.
...
There's no reason to reimplement printing code when VecReg and
VecPredReg types already know how to print themselves.
Change-Id: I092c28143de286d765312122b81ce865a5184091
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42001
Tested-by: kokoro <noreply+kokoro@google.com >
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com >
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com >
2021-04-20 00:14:09 +00:00
Gabe Black
2d95f59ece
arch,cpu: Separate printing and serialization of VecPredReg.
...
This is equivalent to what was done with VecReg recently.
Change-Id: I8e28c9796bf5cabd35a6bf5b89e55efcf9324d92
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41999
Reviewed-by: Gabe Black <gabe.black@gmail.com >
Maintainer: Gabe Black <gabe.black@gmail.com >
Tested-by: kokoro <noreply+kokoro@google.com >
2021-04-20 00:14:09 +00:00