]> sourceware.org Git - newlib-cygwin.git/commitdiff
2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
authorJeff Johnston <jjohnstn@redhat.com>
Fri, 21 Mar 2014 20:16:14 +0000 (20:16 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Fri, 21 Mar 2014 20:16:14 +0000 (20:16 +0000)
        * 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.

24 files changed:
libgloss/ChangeLog
libgloss/nds32/syscall_argv.S
libgloss/nds32/syscall_argvlen.S
libgloss/nds32/syscall_chdir.S
libgloss/nds32/syscall_chmod.S
libgloss/nds32/syscall_close.S
libgloss/nds32/syscall_extra.h
libgloss/nds32/syscall_fstat.S
libgloss/nds32/syscall_getpid.S
libgloss/nds32/syscall_gettimeofday.S
libgloss/nds32/syscall_isatty.S
libgloss/nds32/syscall_kill.S
libgloss/nds32/syscall_link.S
libgloss/nds32/syscall_lseek.S
libgloss/nds32/syscall_open.S
libgloss/nds32/syscall_read.S
libgloss/nds32/syscall_rename.S
libgloss/nds32/syscall_stat.S
libgloss/nds32/syscall_system.S
libgloss/nds32/syscall_time.S
libgloss/nds32/syscall_times.S
libgloss/nds32/syscall_unlink.S
libgloss/nds32/syscall_utime.S
libgloss/nds32/syscall_write.S

index 29ce9c456188067fb8163866c3c0bb5501f87053..a6965cdc1717521b930ce0fcefecad2b090c271c 100644 (file)
@@ -1,3 +1,29 @@
+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.
+
 2014-02-27  Joey Ye  <joey.ye@arm.com>
 
        * libnosys/sbrk.c (_sbrk): Remove TWS
index f11247856ce5c92c42fdda35116eaee44a1ca5b8..77278934a8d7caa2d694ef80cf1d549566177ce4 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _argv
-       .type   _argv, @function
-       .align 2
-_argv:
-       /* Make syscall 'SYS_argv'.
-          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_argv
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _argv, .-_argv
+SYS_WRAPPER _argv, SYS_argv
index dd2ca191276371ddf3a7bb470a1c216ecf85349c..c74d087defddb01f91821ab20e9052b8234ae370 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _argvlen
-       .type   _argvlen, @function
-       .align 2
-_argvlen:
-       /* Make syscall 'SYS_argvlen'.
-          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_argvlen
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _argvlen, .-_argvlen
+SYS_WRAPPER _argvlen, SYS_argvlen
index 5309e2b9ba90f96eeb511ae96519fa854774264e..080e3dcef8466b1d4799cc08f1d7f169ebaba1e1 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _chdir
-       .type   _chdir, @function
-       .align 2
-_chdir:
-       /* Make syscall 'SYS_chdir'.
-          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_chdir
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _chdir, .-_chdir
+SYS_WRAPPER _chdir, SYS_chdir
index afd549b5a2a1f5236e47060207183e3b119023cf..5827ee144f4d16304d974d597f3674d74e6e709c 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _chmod
-       .type   _chmod, @function
-       .align 2
-_chmod:
-       /* Make syscall 'SYS_chmod'.
-          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_chmod
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _chmod, .-_chmod
+SYS_WRAPPER _chmod, SYS_chmod
index c1a7efa5a417fefe732d6b605fd53234c2e907f7..82733a93e67e2b8ed0c33dd98422eb7402e8d4ae 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _close
-       .type   _close, @function
-       .align 2
-_close:
-       /* Make syscall 'SYS_close'.
-          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_close
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _close, .-_close
+SYS_WRAPPER _close, SYS_close
index f2ab2d56222e7c4f18bfa2296c5675ece456b552..73d36b973ce4dc1e44f0139fa4dd49b9b026e8ef 100644 (file)
@@ -38,4 +38,27 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define SYS_geterr       6001
 
+
+/* Define macros that generate assembly output.  */
+.macro SYS_WRAPPER name num
+       .text
+       .global \name
+       .type   \name, @function
+       .align  2
+\name:
+       /* Make syscall with arg=`\num'.
+          Reture value `-1' stored in $r0 means there is something wrong.
+          If there is something wrong, make syscall to get `SYS_geterr' to get
+          error code to see what exactly happens and store it in errno  .  */
+       syscall \num            /* Make syscall with arg=`\num'.  */
+       addi    $r1, $r0, 1
+       bnez    $r1, 1f         /* Branch if success.  */
+       syscall SYS_geterr      /* There is something wrong.  */
+       s.w     $r0, errno      /* Store error code into errno.  */
+       move    $r0, -1
+1:
+       ret
+       .size   \name, .-\name
+.endm
+
 #endif /* _SYSCALL_EXTRA_H */
index a3ab279a68375c7c20f4164f5cef22dc55a6222f..855c982b8d0c5815cf8aee224a376bdf66901699 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _fstat
-       .type   _fstat, @function
-       .align 2
-_fstat:
-       /* Make syscall 'SYS_fstat'.
-          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_fstat
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _fstat, .-_fstat
+SYS_WRAPPER _fstat, SYS_fstat
index f1f25d80b55fd480d755236eabe27885a12242b4..4bf9ba48ff002bca24077f6f173a948bb0e6b67b 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _getpid
-       .type   _getpid, @function
-       .align 2
-_getpid:
-       /* Make syscall 'SYS_getpid'.
-          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_getpid
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _getpid, .-_getpid
+SYS_WRAPPER _getpid, SYS_getpid
index bd995a8f6e09b27d947b76e8d66615f887ac28a3..433d2b45d87a9e04d5bf0702c41f80ee3427918c 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _gettimeofday
-       .type   _gettimeofday, @function
-       .align 2
-_gettimeofday:
-       /* Make syscall 'SYS_gettimeofday'.
-          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_gettimeofday
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _gettimeofday, .-_gettimeofday
+SYS_WRAPPER _gettimeofday, SYS_gettimeofday
index e8f538d95d921c45295b51ffa2efb90d9fcb8b6c..2dd7931ae377827e14e98bc8f6f6d63de4ba63e4 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _isatty
-       .type   _isatty, @function
-       .align 2
-_isatty:
-       /* Make syscall 'SYS_isatty'.
-          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_isatty
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _isatty, .-_isatty
+SYS_WRAPPER _isatty, SYS_isatty
index e04c5b9c4f11182a12c7afeaed24576b8fe930af..196bcef79271176b0ee0e3896efb3f9b5aad332e 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _kill
-       .type   _kill, @function
-       .align 2
-_kill:
-       /* Make syscall 'SYS_kill'.
-          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_kill
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _kill, .-_kill
+SYS_WRAPPER _kill, SYS_kill
index 044b632a0cf3261c6665a22ede35331214ee69e9..bd4e23c5ed19d19e5d96db69899169a8de614184 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _link
-       .type   _link, @function
-       .align 2
-_link:
-       /* Make syscall 'SYS_link'.
-          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_link
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _link, .-_link
+SYS_WRAPPER _link, SYS_link
index 3515a47875f4738bc11e479933a0cbc7c3974983..269f531c7cd0aeeb954470e024de660375952db8 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _lseek
-       .type   _lseek, @function
-       .align 2
-_lseek:
-       /* Make syscall 'SYS_lseek'.
-          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_lseek
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _lseek, .-_lseek
+SYS_WRAPPER _lseek, SYS_lseek
index d160b07d3c5471c838c87d2064792890857d6789..d9ba24858aa2934709b1845fe0aebaf95718d9da 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _open
-       .type   _open, @function
-       .align 2
-_open:
-       /* Make syscall 'SYS_open'.
-          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_open
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _open, .-_open
+SYS_WRAPPER _open, SYS_open
index 5c485c5474f4dc571d428fe4ae1a426d052a7357..6668d214f5b1d3af120d19dcef92dd22798a2b74 100644 (file)
@@ -32,25 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _read
-       .type   _read, @function
-       .align 2
-_read:
-       /* Make syscall 'SYS_read'.
-          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_read
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       /* Return value '11' stored in $r0 means we need to try again.  */
-       addi    $r1, $r0, -11
-       beqz    $r1, _read
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _read, .-_read
+SYS_WRAPPER _read, SYS_read
index 6b07cdad18776980564487382f2479873fa7be1f..bf394bf55f183a608a392be15a11c52ca09a5ddd 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _rename
-       .type   _rename, @function
-       .align 2
-_rename:
-       /* Make syscall 'SYS_rename'.
-          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_rename
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _rename, .-_rename
+SYS_WRAPPER _rename, SYS_rename
index b7679b4a6b5363fb1d20687b96b416fa2bc4b777..06b35ecd0c237e4d2f0ccbbebeb289df4fca0cc8 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _stat
-       .type   _stat, @function
-       .align 2
-_stat:
-       /* Make syscall 'SYS_stat'.
-          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_stat
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _stat, .-_stat
+SYS_WRAPPER _stat, SYS_stat
index ce4388a7a7671f005db08f8eb7bc0e4f5166eb62..648235e03ac78d29d5ed9f8c77124fda3ab64fc3 100644 (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
index 3fee97d63ae057a41b3002a11668b074bff126c3..9af57ac82f2b0972a38c76426d3d18ca2a0320d5 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _time
-       .type   _time, @function
-       .align 2
-_time:
-       /* Make syscall 'SYS_time'.
-          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_time
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _time, .-_time
+SYS_WRAPPER _time, SYS_time
index 7e4a260d0b51e428b8411cf9a47f1628877010f3..51c48afaa382a275e0b855f0df889ae5164f139e 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _times
-       .type   _times, @function
-       .align 2
-_times:
-       /* Make syscall 'SYS_times'.
-          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_times
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _times, .-_times
+SYS_WRAPPER _times, SYS_times
index 17607062d46baf0c10d3823f84b920d7b025034a..aa98efba42c92171a0ec1a316257ee7efef9c49c 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _unlink
-       .type   _unlink, @function
-       .align 2
-_unlink:
-       /* Make syscall 'SYS_unlink'.
-          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_unlink
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _unlink, .-_unlink
+SYS_WRAPPER _unlink, SYS_unlink
index 7090d359e577fef98acb0eb5aaa967d90048a2c3..b53a21f4d8e701d38bd2f04fd2c23c4900f2b63d 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _utime
-       .type   _utime, @function
-       .align 2
-_utime:
-       /* Make syscall 'SYS_utime'.
-          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_utime
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _utime, .-_utime
+SYS_WRAPPER _utime, SYS_utime
index 0b10f7e5f624d00a44ecbac0270fbed1467006ba..d5f542b2a5e211c8fb95646d48eb0affb1961746 100644 (file)
@@ -32,22 +32,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
        .extern errno
-
-       .section .text
-       .global _write
-       .type   _write, @function
-       .align 2
-_write:
-       /* Make syscall 'SYS_write'.
-          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_write
-       addi    $r1, $r0, 1
-       bnez    $r1, .Ldone
-       syscall SYS_geterr
-       s.w     $r0, errno
-       movi    $r0, -1 
-.Ldone:
-       ret
-       .size   _write, .-_write
+SYS_WRAPPER _write, SYS_write
This page took 0.060459 seconds and 5 git commands to generate.