diff options
Diffstat (limited to 'libgloss/nds32/syscall_read.S')
-rw-r--r-- | libgloss/nds32/syscall_read.S | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/libgloss/nds32/syscall_read.S b/libgloss/nds32/syscall_read.S index 5c485c547..6668d214f 100644 --- a/libgloss/nds32/syscall_read.S +++ b/libgloss/nds32/syscall_read.S @@ -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 |