Commit Graph

13453 Commits

Author SHA1 Message Date
Giacomo Travaglini
424643e91e arch-arm: Fix format specifier in encodeAArch64SysReg panic
The panic was using the wrong format specifier: %n instead of %d

Change-Id: I92f0be85dc24da06373cba5c20bab6de7d7b4537
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60729
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-06-24 14:03:16 +00:00
Gabe Black
85a18e22a1 arch,cpu: Keep track of the RegClassType of a RegClass.
This makes it possible to do more things with a RegClass locally.

Change-Id: Ib7d7fa3e2d88a34d5b5681fcc4aab26696c71205
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49779
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-24 11:27:23 +00:00
Gabe Black
4c55722ccd cpu: Stop using or providing legacy (read|set)Reg* accessors.
These have now all been replaced with (get|set)Reg* accessors throughout
the code base.

Change-Id: I7d16d697ecfb813eb870068677f77636d41af28b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49778
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-24 11:27:06 +00:00
Gabe Black
d222f4095b cpu: Merge TimingExprSrcReg and TimingExprReadIntReg.
Make it possible to read any type of reg, assuming it fits in a RegVal.
This avoids assuming building in a dependency on the readIntReg
accessor.

It also avoids setting up a situation where the API could at least
theoretically base the timing expression on the value of *any* int reg,
even ones the instruction does not interact with. The ...ReadIntReg
expression was only ever used with the result of the ...SrcReg
expression, and in my opinion, that's realy the only way it makes sense
to use it. It doesn't seem useful to split that operation into two
parts.

If it actually does make sense (although I doubt this), these operations
can't really be generalized easily since the TimingExpr... classes all
expect to pass around uint64_ts, and a RegId, the *real* value of a
SrcReg index which does not assume a register type, would not fit in
that in the general case.

Change-Id: I253a0a058dc078deeb28ef0babead4c8ffc3b792
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49776
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-06-24 11:26:51 +00:00
Matt Sinclair
590719a383 arch-vega: explain when op encoder ignores src reg
Previously b40b361bee added support for the Vega operand encoder.  As
part of this, it made sure to check for the S_GETPC_B64 instruction,
which appears to be the only instruction in the Vega ISA that does not
use the source register.  However, at the time the commit used magic
numbers without comment, which can be difficult for users to interpret.

To resolve this, this commit adds a comment to explain where the magic
numbers come from (Table 58 in the Vega ISA manual).

Change-Id: Ic5007b510e0175558d21ede8eb6db273113187b2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60650
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
2022-06-22 17:14:35 +00:00
Matt Sinclair
00008b725c arch-vega: some Vega instructions don't use dest reg
Some of the Vega scalar instructions (S_SETPC_B64, S_RFE_B64,
S_CBRANCH_JOIN, and S_SET_GPR_IDX_IDX) do not use the SDST scalar
destination register.  However, Vega's operand encoding function for the
SOP1 instruction type's class assumed all instructions used the
destination register, which results in an assert failure for these
instructions.

To resolve this, this commit updates the Vega SOP1 operand encoder to
ignore the destination register for these specific instructions.

Change-Id: I2f0d830f6264fc7f47c0694a2fd5da5d33d2ea0b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60649
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
2022-06-22 17:14:35 +00:00
Matt Sinclair
9c1af09605 mem-ruby, gpu-compute: update TCP,SQC to pass hit/miss
Previously, the GPU SQC and TCP Ruby protocols always told the Sequencer
that the externalHit field was false.  This impacts the statistics and
profiling, because the Sequencer uses this hit/miss information both for
profiling and the coalescer's statistics.

To resolve this, this commit updates the GPU SQC and TCP Ruby protocols
to pass the appropriate hit/miss information into the Sequencer's
readCallback and hitCallback functions.

Change-Id: Ib74af09b66fa8866eee72d3a9ab0e8a8f2196c03
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60652
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-21 22:59:05 +00:00
Matt Sinclair
669eb6a6fa mem-ruby, gpu-compute: add hit/miss profiling to SQC
This commit updates the Ruby SQC (GPU L1 I$) to perform hit and miss
profiling on each request that reaches it.

Change-Id: I736521b89b5d37d950265f32cf1a6d2ee5316dba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60651
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-21 22:58:42 +00:00
Michael Boyer
81058189af arch-vega,arch-gcn3: Implement S_MEMTIME instruction
Change-Id: I3e286eb6ff8af4097ad03d4066be79f73d938cea
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53603
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-21 20:19:46 +00:00
Bobby R. Bruce
b31192f539 misc: Revert gem5 versioning for develop branch
Change-Id: I80cbfc766c71a3137a427d38da4f46b80cd39856
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60639
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-20 19:56:24 +00:00
Bobby R. Bruce
978558defe misc: Revert "stdlib: Update the resources.json version to v22.0"
This reverts commit 73da4d794c.
https://gem5-review.googlesource.com/c/public/gem5/+/60531

Change-Id: I01c3879b1f96bd92db60195369354f542f3e829e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60636
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-20 19:56:24 +00:00
Bobby Bruce
bd295a2e41 Merge "miscL Merge stable branch (v22.0.0.1) into develop" into develop 2022-06-20 19:56:24 +00:00
Gabe Black
e57205f539 arch-riscv: Revamp float regs.
Change-Id: I6bb7a4f78e59082c3f783a5d4c2cb79f9c6df61f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49773
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-20 04:04:05 +00:00
Gabe Black
0fa9bc0780 arch-riscv: Revamp int regs.
Change-Id: Ie4773178843757acede4fe9e77ca327f7b024270
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49772
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-06-20 04:03:52 +00:00
Gabe Black
6a73a3a2d0 arch: Switch the generic register ABI over to use RegId.
Change-Id: I4bbe884fe01fe14d7f18574f494a831dee2996d3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49774
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-19 07:48:14 +00:00
Gabe Black
644ab97727 arch-sparc: Revamp the float registers.
Change-Id: Iec52e15f1529319345795496a82a37e1f0aeebae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49769
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-06-19 07:21:37 +00:00
Gabe Black
0de5b1f173 arch-sparc: Revamp the int regs.
Change-Id: Ifa968e42e55f78cea9eb92e9fc6fc906e0784594
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49768
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-19 07:21:14 +00:00
Gabe Black
a0e278863f arch-sparc: Remove unused fixed register operands.
These had been used to manually feed arguments to pseudoInsts (I think)
which is now handled automatically. Regardless, these are not used and
can be eliminated.

Change-Id: I1aeeb00627bbbfaaf550c878ee88b0b2f7f6b61d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49807
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-19 07:21:00 +00:00
Gabe Black
93fa99041d arch-mips: Convert float, int, and misc regs.
Convert them to use namespaces, style guide compliant names, and (except
for misc regs) the new accessors.

Change-Id: I6f190658447d40b9933e498ce766ac6c629b6cbb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49761
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-19 07:20:34 +00:00
Bobby R. Bruce
938d017fed miscL Merge stable branch (v22.0.0.1) into develop
Change-Id: I502c1ed209d2707ed6271cc31ab58f1e8884335b
2022-06-18 11:47:03 -04:00
Bobby R. Bruce
39f85b7a3b misc: Update version info to v22.0.0.1 2022-06-18 04:59:02 -07:00
Bobby R. Bruce
a10073119e misc: Add v22.0.0.1 hotfix
This hotfix fixes a bad import in
src/python/gem5/components/processors/simple_core.py
2022-06-18 03:36:27 -07:00
Bobby R. Bruce
7b9364b5c0 misc: Merge branch 'release-staging-v22-0' into stable 2022-06-17 20:21:37 -04:00
Yu-hsin Wang
72290f00fd systemc: align the style in sc_ext
Change-Id: I0a45ad9d9e3a2603878ee9bcdc1d416bb241deeb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59650
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-17 07:08:16 +00:00
Bobby R. Bruce
73da4d794c stdlib: Update the resources.json version to v22.0
This is used to ensure the stdlib obtains the resources for v22.0.

Change-Id: Ib38e331dcc96cd2d50922dfeeb7edfee3f19d321
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60531
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-17 05:34:13 +00:00
Bobby R. Bruce
fd7bfca33b base: Update the version to v22.0.0.0
Change-Id: I945304167e3835d3492cb2b81e22372608cb89a5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60529
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-17 05:34:13 +00:00
Charles Jamieson
7170c365be arch-vega: implement S_GETREG_B32 instruction
This commit adds support for the Vega GPU ISA's S_GETREG_B32
instruction.

This work was done by Charles Jamieson but I am committing.

Change-Id: Ic2e24f667ed1aec7b8b1404a06e17e7ffb192fba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60589
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-17 02:24:05 +00:00
Mingyuan Xiang
928c5807db mem-ruby: Add RubyHitMiss debug flags to print hit and miss information
Add RubyHitMiss debug flags to print hit and miss information. This can be
used to test the replacement policies by the traffic generator.

Change-Id: If9fe42c37e09be0534077fbf912d8699debd80fd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21719
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-06-15 20:51:16 +00:00
Yu-hsin Wang
d4456b3ee0 systemc: define control extension
There are some flags in gem5 Packet class to specifying the control
signals, like priv bit, secure bit, etc. For now we don't have the
corresponding way to bridge the information in gem5 and SystemC. The
control extension would be responsible for control signals.

Change-Id: I35ba8610210e0750917a78fa0adb321991968f6a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59649
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2022-06-15 08:02:21 +00:00
Gabe Black
9e821b3233 cpu: Switch to the (get|set)Reg API in the checker CPU.
Change-Id: I7ab1319ae6fc6d0d5bc62322fbe92c7131ce6403
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49777
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 22:11:36 +00:00
Giacomo Travaglini
87c2f36fa8 cpu: Fix InvalidRegClass access in CheckerCPU
This is fixing long regressions:

https://jenkins.gem5.org/job/nightly/252/console

Change-Id: Ica56b950e5091d3357060f566e02195cc8136924
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60449
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-08 21:58:27 +00:00
Gabe Black
179e4ad070 cpu: Fix style in cpu/timing_expr.cc.
Change-Id: Ic3d9d870b2f7648fd8b215692c33580f05cdb364
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49775
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-08 20:36:07 +00:00
Gabe Black
0d18112f0f arch-power: Revamp float regs.
Change-Id: I77a5a021da82c8528d092f7363a927dec224d5ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49771
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 20:35:16 +00:00
Gabe Black
23087f124a arch-power: Revamp int registers.
Change-Id: I2e11601a6bf37d6ca161d0ce99d7bfff1ee2f0eb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49770
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-06-08 20:35:01 +00:00
Gabe Black
112f4104b9 arch-arm: Fix up code related to the float reg file?
ARM no longer uses it's primitive FloatRegClass register file, but the
code in tarmac_record.cc still seems to access it? Should this code be
deleted, or rewritten to use the vector register file?

This code was used in the 32 bit ARM KVM code as well.

Change-Id: I6ed2ed9ae853fa4313294fdde4ce08d134fc12da
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49767
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-08 20:34:38 +00:00
Gabe Black
7f61db0f2e arch-arm: Switch from (set|read)Vec* to (get|set)Reg* accessors.
Change-Id: I9e9b51b965402b3c8c94cce1593d62aa2118cd0c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49766
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 20:34:19 +00:00
Gabe Black
8f180369fd arch-arm: Rework the condition code regs.
Change-Id: I0cfaaecb4da27cecc3dc6464b094fe2cf03b407a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49765
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-08 20:34:01 +00:00
Gabe Black
5efe4d4a3a arch-arm: Rework the int regs.
Change-Id: I352e12d4742f0771859bdbf9634ac87e2c153427
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49764
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-08 20:33:42 +00:00
Bobby R. Bruce
fda4137780 stdlib: Refactor multi-isa stdlib incorporation
The previous version of this requires the user to set the `main-isa` at
runtime, as inplemented via
https://gem5-review.googlesource.com/c/public/gem5/+/55423. In order to
keep this work in-sync with how the multi-protocol approach will work
(see here: https://gem5-review.googlesource.com/c/public/gem5/+/59193),
it's been decided this should be set at compile time. With this we are
keeping the `TARGET_ISA` parameter. If this is set, this is the de
facto "main-isa". The `main-isa` parameter has been removed from the
gem5 command-line.

If the `TARGET_ISA` parameter is not set, but only one ISA is compiled,
then this single ISA is assumed to be the `main-isa` for simulation. If
neither `TARGET_ISA` is set or the binary is compiled to a single ISA,
an exception is thrown when `get_runtime_isa` is called.

At the time of writing this change is moot as the multi-isa work has
yet to be merged into the gem5 develop branch. It exists here:
https://gem5.googlesource.com/public/gem5/+/refs/heads/multi-isa and
will need refactored to work with this patch.

The multi-isa tests have been updated. As we no longer pass the
`main-isa` as a run-time parameter, we remove many tests which validated
this use-case.

Change-Id: If3366212fe1dacbae389efa43d79349deb907537
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59949
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-08 17:24:13 +00:00
Gabe Black
7e6fd8423e arch-x86: Rework float regs for getReg and setReg.
Change-Id: I9ef7493225678923964721bf91f2fd2c43d4d1e7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49760
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-06-08 07:09:32 +00:00
Gabe Black
d40bedc019 arch-x86: Rework CCRegs for getReg, setReg.
Put them in a namespace, make them match the style guide, turn them into
RegIds, and replace readCCReg and setCCReg with getReg and setReg.

Change-Id: I46f766a544696caf3dcfc6b34b50f02b86766da4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49759
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 07:09:18 +00:00
Gabe Black
84ae0afa59 arch-x86: Put misc reg indexes into a name space.
Also make them match the style guide.

Change-Id: I845f141f85d4499a5acf56c2161240764906a232
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49758
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2022-06-08 07:09:05 +00:00
Gabe Black
c4ea43f462 arch-x86: De-indent arch/x86/regs/misc.hh.
Namespaces are not supposed to increase indentation.

Change-Id: I6736c5049ea8d853dc67f319192b9eaa97d27cb1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49757
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 07:08:50 +00:00
Gabe Black
88143c940b arch-x86: Convert segment indices to fit the style guide.
Capitalize only their first letter, and use a namespace to namespace
them instead of a SEGMENT_REG_ prefix.

Change-Id: I69778c8d052ad6cc0ffd9e74dd1c643e9d28048d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49756
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2022-06-08 07:08:37 +00:00
Gabe Black
b836e6a495 arch-x86: Stop using (read|set)IntReg.
These accessors just translate a RegIndex x into a RegId(IntRegClass, x)
and then does (get|set)Reg. Instead, we can just do (get|set)Reg
directly, since all the integer register named constants are just RegIds
now.

Change-Id: I9e7551ed66a6979e83c745f2891c452ded1eff0e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49755
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 07:08:23 +00:00
Gabe Black
16f7b17fc5 arch-x86: Convert the int register constants from RegIndex to RegId.
This will let them be used in APIs which expect either, and will help
transition between the two.

Change-Id: I73fc9e55418ad3ab9e08406f0928aa4b1ef30a49
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49754
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 07:08:10 +00:00
Gabe Black
ee1262ae40 cpu: constexpr most of RegId's methods, and add a RegIndex operator.
That will let a RegId be used where a RegId is required, but also let it
be downconverted into a scalar RegIndex if using an older API. Note that
this does *not* let you automatically upconvert from a RegIndex into a
RegId, since there would be no way to know what class of register to
use.

Change-Id: I5fff224dce5e02959d5fc3e717014bf7eaa9c022
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49753
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-08 07:07:53 +00:00
Gabe Black
9b2328d637 arch-x86: Use a namespace for integer registers.
Also reformat the integer register index constants to fit with the style
guide, ie remove the INTREG_ prefix (replaced by the namespace) and
captialize only the first letter.

Change-Id: I682a337944f64a1b96b971a1beb895289b9d299e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49752
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 07:07:44 +00:00
Gabe Black
a52f92dccb arch: Remove plumbing for an op_idx value in ISA operands.
Now that op_idx is trivial to calculate (just src_reg_idx or
dest_reg_idx), there's no need to have the indirection and extra
mechanism to funnel a precalculated value around.

Change-Id: I37daeb646b85e050c4b832af28d054ecc3c338b1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49750
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-06-08 07:07:35 +00:00
Gabe Black
a1b439f91c arch: Remove plumbing for operand predication.
The operand predication mechanism has been replaced by mapping
predicate-false register reads/writes to InvalidRegClass.

Change-Id: I57e7aadb7a0d682c225f6a5fe673cba8ddf1c4f8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49749
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 07:07:15 +00:00