diff options
author | Nathan Binkert <nate@binkert.org> | 2008-09-27 21:03:49 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-09-27 21:03:49 -0700 |
commit | 80d9be86e616e819cc3c9a0bbc8a42a5beb41247 (patch) | |
tree | 311a579c3be054b5dfb603ac6040af3027d416a2 /src/arch/mips/utility.cc | |
parent | cf7ddd8e8ac92cf5b90cd89a028414dd782c645a (diff) | |
download | gem5-80d9be86e616e819cc3c9a0bbc8a42a5beb41247.tar.xz |
gcc: Add extra parens to quell warnings.
Even though we're not incorrect about operator precedence, let's add
some parens in some particularly confusing places to placate GCC 4.3
so that we don't have to turn the warning off. Agreed that this is a
bit of a pain for those users who get the order of operations correct,
but it is likely to prevent bugs in certain cases.
Diffstat (limited to 'src/arch/mips/utility.cc')
-rw-r--r-- | src/arch/mips/utility.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/mips/utility.cc b/src/arch/mips/utility.cc index 36cf76c67..1985c0f43 100644 --- a/src/arch/mips/utility.cc +++ b/src/arch/mips/utility.cc @@ -145,7 +145,7 @@ genCCVector(uint32_t fcsr, int cc_num, uint32_t cc_val) { int cc_idx = (cc_num == 0) ? 23 : cc_num + 24; - fcsr = bits(fcsr, 31, cc_idx + 1) << cc_idx + 1 | + fcsr = bits(fcsr, 31, cc_idx + 1) << (cc_idx + 1) | cc_val << cc_idx | bits(fcsr, cc_idx - 1, 0); |