2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>

* nds32/syscall_extra.h: Define macro.
        * nds32/syscall_argv.S: Use define macro.
        * nds32/syscall_argvlen.S: Ditto.
        * nds32/syscall_chdir.S: Ditto.
        * nds32/syscall_chmod.S: Ditto.
        * nds32/syscall_close.S: Ditto.
        * nds32/syscall_fstat.S: Ditto.
        * nds32/syscall_getpid.S: Ditto.
        * nds32/syscall_gettimeofday.S: Ditto.
        * nds32/syscall_isatty.S: Ditto.
        * nds32/syscall_kill.S: Ditto.
        * nds32/syscall_link.S: Ditto.
        * nds32/syscall_lseek.S: Ditto.
        * nds32/syscall_open.S: Ditto.
        * nds32/syscall_read.S: Ditto.
        * nds32/syscall_rename.S: Ditto.
        * nds32/syscall_stat.S: Ditto.
        * nds32/syscall_system.S: Ditto.
        * nds32/syscall_time.S: Ditto.
        * nds32/syscall_times.S: Ditto.
        * nds32/syscall_unlink.S: Ditto.
        * nds32/syscall_utime.S: Ditto.
        * nds32/syscall_write.S: Ditto.
This commit is contained in:
Jeff Johnston
2014-03-21 20:16:14 +00:00
parent 5805cb1f8c
commit 9246fbeced
24 changed files with 71 additions and 421 deletions

View File

@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.extern errno
.section .text
.global _system
.type _system, @function
.align 2
_system:
/* Make syscall 'SYS_system'.
Reture value '-1' stored in $r0 means there is something wrong.
If there is something wrong, make syscall 'SYS_geterr' to get
error code to see what exactly happens and store it in errno . */
syscall SYS_system
addi $r1, $r0, 1
bnez $r1, .Ldone
syscall SYS_geterr
s.w $r0, errno
movi $r0, -1
.Ldone:
ret
.size _system, .-_system
SYS_WRAPPER _system, SYS_system