isa_traits.hh (2632:1bb2f91485ea) isa_traits.hh (2646:c5f20661d9f3)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 158 unchanged lines hidden (view full) ---

167#if !FULL_SYSTEM
168 static inline void setSyscallReturn(SyscallReturn return_value,
169 RegFile *regs)
170 {
171 // check for error condition. SPARC syscall convention is to
172 // indicate success/failure in reg the carry bit of the ccr
173 // and put the return value itself in the standard return value reg ().
174 if (return_value.successful()) {
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 158 unchanged lines hidden (view full) ---

167#if !FULL_SYSTEM
168 static inline void setSyscallReturn(SyscallReturn return_value,
169 RegFile *regs)
170 {
171 // check for error condition. SPARC syscall convention is to
172 // indicate success/failure in reg the carry bit of the ccr
173 // and put the return value itself in the standard return value reg ().
174 if (return_value.successful()) {
175 // no error
176 regs->setMiscReg(MISCREG_CCR_XCC_C, 0);
175 // no error, clear XCC.C
176 regs->setMiscReg(MISCREG_CCR, regs->readMiscReg(MISCREG_CCR) & 0xEF);
177 regs->setIntReg(ReturnValueReg, return_value.value());
178 } else {
177 regs->setIntReg(ReturnValueReg, return_value.value());
178 } else {
179 // got an error, return details
180 regs->setMiscReg(MISCREG_CCR_XCC_C, 1);
179 // got an error, set XCC.C
180 regs->setMiscReg(MISCREG_CCR, regs->readMiscReg(MISCREG_CCR) | 0x10);
181 regs->setIntReg(ReturnValueReg, return_value.value());
182 }
183 }
184#endif
185};
186
187#endif // __ARCH_SPARC_ISA_TRAITS_HH__
181 regs->setIntReg(ReturnValueReg, return_value.value());
182 }
183 }
184#endif
185};
186
187#endif // __ARCH_SPARC_ISA_TRAITS_HH__