From dd57e9216ac723d0cff2c211cb323385c685c86c Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Thu, 20 May 2021 10:32:42 -0700 Subject: [PATCH] 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 Reviewed-by: Matt Sinclair Maintainer: Jason Lowe-Power Maintainer: Matt Sinclair Tested-by: kokoro Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45829 Maintainer: Bobby R. Bruce --- src/mem/ruby/protocol/MOESI_CMP_token-L1cache.sm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/ruby/protocol/MOESI_CMP_token-L1cache.sm b/src/mem/ruby/protocol/MOESI_CMP_token-L1cache.sm index 5c3d5f79d1..c9fe135ae7 100644 --- a/src/mem/ruby/protocol/MOESI_CMP_token-L1cache.sm +++ b/src/mem/ruby/protocol/MOESI_CMP_token-L1cache.sm @@ -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)); }