Set both xcc.c and icc.c on return from a syscall.
authorGabe Black <gblack@eecs.umich.edu>
Tue, 29 Aug 2006 20:07:22 +0000 (16:07 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Tue, 29 Aug 2006 20:07:22 +0000 (16:07 -0400)
--HG--
extra : convert_revision : 9c2b32d735b816021cdd3af24002f309e22a8d64

src/arch/sparc/syscallreturn.hh

index d850f4b65310f87015962abdeca5b67d8ec56d5e..75a063da16fb4d404cfe80c0742184722c7de891 100644 (file)
@@ -79,11 +79,11 @@ namespace SparcISA
         // and put the return value itself in the standard return value reg ().
         if (return_value.successful()) {
             // no error, clear XCC.C
-            regs->setMiscReg(MISCREG_CCR, regs->readMiscReg(MISCREG_CCR) & 0xEF);
+            regs->setMiscReg(MISCREG_CCR, regs->readMiscReg(MISCREG_CCR) & 0xEE);
             regs->setIntReg(ReturnValueReg, return_value.value());
         } else {
             // got an error, set XCC.C
-            regs->setMiscReg(MISCREG_CCR, regs->readMiscReg(MISCREG_CCR) | 0x10);
+            regs->setMiscReg(MISCREG_CCR, regs->readMiscReg(MISCREG_CCR) | 0x11);
             regs->setIntReg(ReturnValueReg, return_value.value());
         }
     }