From abca171e244b27d1c44a9bcdedbe231bdc342cbb Mon Sep 17 00:00:00 2001
From: Nathan Binkert <nate@binkert.org>
Date: Fri, 26 Sep 2008 08:18:56 -0700
Subject: Use logical operator instead of bitwise operator for correctness.

---
 src/arch/mips/mt.hh     | 2 +-
 src/kern/tru64/tru64.hh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/arch/mips/mt.hh b/src/arch/mips/mt.hh
index 6765c27a9..20658df28 100755
--- a/src/arch/mips/mt.hh
+++ b/src/arch/mips/mt.hh
@@ -220,7 +220,7 @@ yieldThread(TC *tc, Fault &fault, int src_reg, uint32_t yield_mask)
             warn("%i: Deactivating Hardware Thread Context #%i", curTick, tc->getThreadNum());
         }
     } else if (src_reg > 0) {
-        if (src_reg & !yield_mask != 0) {
+        if (src_reg && !yield_mask != 0) {
             unsigned vpe_control = tc->readMiscReg(VPEControl);
             tc->setMiscReg(VPEControl, insertBits(vpe_control, VPEC_EXCPT_HI, VPEC_EXCPT_LO, 2));
             fault = new ThreadFault();
diff --git a/src/kern/tru64/tru64.hh b/src/kern/tru64/tru64.hh
index d0c359a1f..dfdb8524d 100644
--- a/src/kern/tru64/tru64.hh
+++ b/src/kern/tru64/tru64.hh
@@ -723,7 +723,7 @@ class Tru64 : public OperatingSystem
             abort();
         }
 
-        if (thread_index < 0 | thread_index > process->numCpus()) {
+        if (thread_index < 0 || thread_index > process->numCpus()) {
             cerr << "nxm_thread_create: bad thread index " << thread_index
                  << endl;
             abort();
-- 
cgit v1.2.3