diff options
Diffstat (limited to 'cpu/exec_context.hh')
-rw-r--r-- | cpu/exec_context.hh | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh index bc3551b4f..97bfc5f0d 100644 --- a/cpu/exec_context.hh +++ b/cpu/exec_context.hh @@ -464,19 +464,7 @@ class ExecContext void setSyscallReturn(SyscallReturn return_value) { - // check for error condition. Alpha syscall convention is to - // indicate success/failure in reg a3 (r19) and put the - // return value itself in the standard return value reg (v0). - const int RegA3 = 19; // only place this is used - if (return_value.successful()) { - // no error - regs.intRegFile[RegA3] = 0; - regs.intRegFile[TheISA::ReturnValueReg] = return_value.value(); - } else { - // got an error, return details - regs.intRegFile[RegA3] = (TheISA::IntReg) -1; - regs.intRegFile[TheISA::ReturnValueReg] = -return_value.value(); - } + TheISA::setSyscallReturn(return_value, ®s); } void syscall() |