bd8dd776db
This commit adds strace support for Altera's Nios-II. The architecture is supported by Linux since v3.19, and it implements the generic syscall ABI. * configure.ac: Add nios2 support. * cacheflush.c [NIOS2] (sys_cacheflush): New function. * linux/nios2/*: New Nios-II specific files. * Makefile.am (EXTRA_DIST): Add them. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
14 lines
450 B
C
14 lines
450 B
C
/*
|
|
* The system call convention specifies that r2 contains the return
|
|
* value on success or a positive error number on failure. A flag
|
|
* indicating successful completion is written to r7; r7=0 indicates
|
|
* the system call success, r7=1 indicates an error. The positive
|
|
* errno value written in r2.
|
|
*/
|
|
if (check_errno && nios2_regs.regs[7]) {
|
|
tcp->u_rval = -1;
|
|
tcp->u_error = nios2_regs.regs[2];
|
|
} else {
|
|
tcp->u_rval = nios2_regs.regs[2];
|
|
}
|