cpu,mem: Add or remove parenthesis to make the compiler happy.

Remove extraneous parenthesis in an if condition, and add some
parenthesis where an assignment was being used as a condition in a while
loop.

Change-Id: Ie12c74ac681ef042138e3b41f257ea1bb2ce4267
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40956
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-02-07 23:53:57 -08:00
parent 28564ef315
commit 55a3e35388
2 changed files with 3 additions and 3 deletions

View File

@@ -773,12 +773,12 @@ InstructionQueue<Impl>::scheduleReadyInsts()
IssueStruct *i2e_info = issueToExecuteQueue->access(0);
DynInstPtr mem_inst;
while (mem_inst = std::move(getDeferredMemInstToExecute())) {
while ((mem_inst = std::move(getDeferredMemInstToExecute()))) {
addReadyMemInst(mem_inst);
}
// See if any cache blocked instructions are able to be executed
while (mem_inst = std::move(getBlockedMemInstToExecute())) {
while ((mem_inst = std::move(getBlockedMemInstToExecute()))) {
addReadyMemInst(mem_inst);
}

View File

@@ -467,7 +467,7 @@ TAGEBase::handleAllocAndUReset(bool alloc, bool taken, BranchInfo* bi,
//Allocate entries
unsigned numAllocated = 0;
for (int i = X; i <= nHistoryTables; i++) {
if ((gtable[i][bi->tableIndices[i]].u == 0)) {
if (gtable[i][bi->tableIndices[i]].u == 0) {
gtable[i][bi->tableIndices[i]].tag = bi->tableTags[i];
gtable[i][bi->tableIndices[i]].ctr = (taken) ? 0 : -1;
++numAllocated;