mem-ruby: Fix nonsensical check in MOESI_CMP_token-L1cache

This check always equated to False. It should be an 'or' not an 'and'
comparison.

The Clang 11 compiler threw an "overlapping comparisons always evaluate
to false" error for the code generaed from this.

Change-Id: I299dc6fa8206d5e85d59ba8353bf16102b8e5e1b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45799
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2021-05-20 10:32:42 -07:00
parent 7ef28e9517
commit 4607a67c74

View File

@@ -358,7 +358,7 @@ machine(MachineType:L1Cache, "Token protocol")
}
// You have at least half the token in O-like states
if (state == State:O && state == State:OM) {
if (state == State:O || state == State:OM) {
assert(cache_entry.Tokens > (max_tokens() / 2));
}