Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2014-03-22 00:34:46 +0400
committerJeff Johnston <jjohnstn@redhat.com>2014-03-22 00:34:46 +0400
commit8194dcec36afbfb8ceab9409605d72eba5f773ea (patch)
tree2001465d3dc19048e64b8f9c713a8f021854d13d /libgloss/nds32
parentc18decccef958c6e37acc341391a6712d4570ade (diff)
2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/syscall_argv.S: Correct the method to set errno. * nds32/syscall_argvlen.S: Ditto. * nds32/syscall_chdir.S: Ditto. * nds32/syscall_chmod.S: Ditto. * nds32/syscall_close.S: Ditto. * nds32/syscall_error_handler.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_sbrk.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.
Diffstat (limited to 'libgloss/nds32')
-rw-r--r--libgloss/nds32/syscall_argv.S1
-rw-r--r--libgloss/nds32/syscall_argvlen.S1
-rw-r--r--libgloss/nds32/syscall_chdir.S1
-rw-r--r--libgloss/nds32/syscall_chmod.S1
-rw-r--r--libgloss/nds32/syscall_close.S1
-rw-r--r--libgloss/nds32/syscall_error_handler.S5
-rw-r--r--libgloss/nds32/syscall_fstat.S1
-rw-r--r--libgloss/nds32/syscall_getpid.S1
-rw-r--r--libgloss/nds32/syscall_gettimeofday.S1
-rw-r--r--libgloss/nds32/syscall_isatty.S1
-rw-r--r--libgloss/nds32/syscall_kill.S1
-rw-r--r--libgloss/nds32/syscall_link.S1
-rw-r--r--libgloss/nds32/syscall_lseek.S1
-rw-r--r--libgloss/nds32/syscall_open.S1
-rw-r--r--libgloss/nds32/syscall_read.S1
-rw-r--r--libgloss/nds32/syscall_rename.S1
-rw-r--r--libgloss/nds32/syscall_sbrk.S4
-rw-r--r--libgloss/nds32/syscall_stat.S1
-rw-r--r--libgloss/nds32/syscall_system.S1
-rw-r--r--libgloss/nds32/syscall_time.S1
-rw-r--r--libgloss/nds32/syscall_times.S1
-rw-r--r--libgloss/nds32/syscall_unlink.S1
-rw-r--r--libgloss/nds32/syscall_utime.S1
-rw-r--r--libgloss/nds32/syscall_write.S1
24 files changed, 6 insertions, 25 deletions
diff --git a/libgloss/nds32/syscall_argv.S b/libgloss/nds32/syscall_argv.S
index 77278934a..2fcf1f1d8 100644
--- a/libgloss/nds32/syscall_argv.S
+++ b/libgloss/nds32/syscall_argv.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _argv, SYS_argv
diff --git a/libgloss/nds32/syscall_argvlen.S b/libgloss/nds32/syscall_argvlen.S
index c74d087de..3f88a418f 100644
--- a/libgloss/nds32/syscall_argvlen.S
+++ b/libgloss/nds32/syscall_argvlen.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _argvlen, SYS_argvlen
diff --git a/libgloss/nds32/syscall_chdir.S b/libgloss/nds32/syscall_chdir.S
index 080e3dcef..0fd291e18 100644
--- a/libgloss/nds32/syscall_chdir.S
+++ b/libgloss/nds32/syscall_chdir.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _chdir, SYS_chdir
diff --git a/libgloss/nds32/syscall_chmod.S b/libgloss/nds32/syscall_chmod.S
index 5827ee144..70c903da5 100644
--- a/libgloss/nds32/syscall_chmod.S
+++ b/libgloss/nds32/syscall_chmod.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _chmod, SYS_chmod
diff --git a/libgloss/nds32/syscall_close.S b/libgloss/nds32/syscall_close.S
index 82733a93e..c0abe59b3 100644
--- a/libgloss/nds32/syscall_close.S
+++ b/libgloss/nds32/syscall_close.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _close, SYS_close
diff --git a/libgloss/nds32/syscall_error_handler.S b/libgloss/nds32/syscall_error_handler.S
index dbb5f6856..9398c5171 100644
--- a/libgloss/nds32/syscall_error_handler.S
+++ b/libgloss/nds32/syscall_error_handler.S
@@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
+ .extern _impure_ptr /* The first element is _errno. */
.text
.global __syscall_error_handler
.type __syscall_error_handler, @function
@@ -41,7 +41,8 @@ __syscall_error_handler:
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. */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
move $r0, -1
1:
ret
diff --git a/libgloss/nds32/syscall_fstat.S b/libgloss/nds32/syscall_fstat.S
index 855c982b8..94e58ad1f 100644
--- a/libgloss/nds32/syscall_fstat.S
+++ b/libgloss/nds32/syscall_fstat.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _fstat, SYS_fstat
diff --git a/libgloss/nds32/syscall_getpid.S b/libgloss/nds32/syscall_getpid.S
index 4bf9ba48f..8468d3f5b 100644
--- a/libgloss/nds32/syscall_getpid.S
+++ b/libgloss/nds32/syscall_getpid.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _getpid, SYS_getpid
diff --git a/libgloss/nds32/syscall_gettimeofday.S b/libgloss/nds32/syscall_gettimeofday.S
index 433d2b45d..85e2eaec3 100644
--- a/libgloss/nds32/syscall_gettimeofday.S
+++ b/libgloss/nds32/syscall_gettimeofday.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _gettimeofday, SYS_gettimeofday
diff --git a/libgloss/nds32/syscall_isatty.S b/libgloss/nds32/syscall_isatty.S
index 2dd7931ae..bd30248db 100644
--- a/libgloss/nds32/syscall_isatty.S
+++ b/libgloss/nds32/syscall_isatty.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _isatty, SYS_isatty
diff --git a/libgloss/nds32/syscall_kill.S b/libgloss/nds32/syscall_kill.S
index 196bcef79..4a040f668 100644
--- a/libgloss/nds32/syscall_kill.S
+++ b/libgloss/nds32/syscall_kill.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _kill, SYS_kill
diff --git a/libgloss/nds32/syscall_link.S b/libgloss/nds32/syscall_link.S
index bd4e23c5e..cbcb7592b 100644
--- a/libgloss/nds32/syscall_link.S
+++ b/libgloss/nds32/syscall_link.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _link, SYS_link
diff --git a/libgloss/nds32/syscall_lseek.S b/libgloss/nds32/syscall_lseek.S
index 269f531c7..86e2d31d5 100644
--- a/libgloss/nds32/syscall_lseek.S
+++ b/libgloss/nds32/syscall_lseek.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _lseek, SYS_lseek
diff --git a/libgloss/nds32/syscall_open.S b/libgloss/nds32/syscall_open.S
index d9ba24858..6ef79cb84 100644
--- a/libgloss/nds32/syscall_open.S
+++ b/libgloss/nds32/syscall_open.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _open, SYS_open
diff --git a/libgloss/nds32/syscall_read.S b/libgloss/nds32/syscall_read.S
index 6668d214f..ad15dd40d 100644
--- a/libgloss/nds32/syscall_read.S
+++ b/libgloss/nds32/syscall_read.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _read, SYS_read
diff --git a/libgloss/nds32/syscall_rename.S b/libgloss/nds32/syscall_rename.S
index bf394bf55..0781e3a88 100644
--- a/libgloss/nds32/syscall_rename.S
+++ b/libgloss/nds32/syscall_rename.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _rename, SYS_rename
diff --git a/libgloss/nds32/syscall_sbrk.S b/libgloss/nds32/syscall_sbrk.S
index 3c2d9d4f0..ae32e8dcd 100644
--- a/libgloss/nds32/syscall_sbrk.S
+++ b/libgloss/nds32/syscall_sbrk.S
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../syscall.h"
#include "syscall_extra.h"
+ .extern _impure_ptr /* The first element is _errno. */
.extern _end
.global _sbrk
@@ -66,7 +67,8 @@ _sbrk:
.Lerror:
movi $r0, 12
- s.w $r0, errno /* Set error code: 12 (ENOMEM) to errno. */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
movi $r0, -1 /* Reture value is -1. */
ret
diff --git a/libgloss/nds32/syscall_stat.S b/libgloss/nds32/syscall_stat.S
index 06b35ecd0..105fda4cb 100644
--- a/libgloss/nds32/syscall_stat.S
+++ b/libgloss/nds32/syscall_stat.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _stat, SYS_stat
diff --git a/libgloss/nds32/syscall_system.S b/libgloss/nds32/syscall_system.S
index 648235e03..3422d8672 100644
--- a/libgloss/nds32/syscall_system.S
+++ b/libgloss/nds32/syscall_system.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _system, SYS_system
diff --git a/libgloss/nds32/syscall_time.S b/libgloss/nds32/syscall_time.S
index 9af57ac82..811dd126d 100644
--- a/libgloss/nds32/syscall_time.S
+++ b/libgloss/nds32/syscall_time.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _time, SYS_time
diff --git a/libgloss/nds32/syscall_times.S b/libgloss/nds32/syscall_times.S
index 51c48afaa..2d21814e4 100644
--- a/libgloss/nds32/syscall_times.S
+++ b/libgloss/nds32/syscall_times.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _times, SYS_times
diff --git a/libgloss/nds32/syscall_unlink.S b/libgloss/nds32/syscall_unlink.S
index aa98efba4..77a62d6ff 100644
--- a/libgloss/nds32/syscall_unlink.S
+++ b/libgloss/nds32/syscall_unlink.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _unlink, SYS_unlink
diff --git a/libgloss/nds32/syscall_utime.S b/libgloss/nds32/syscall_utime.S
index b53a21f4d..45af323cc 100644
--- a/libgloss/nds32/syscall_utime.S
+++ b/libgloss/nds32/syscall_utime.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _utime, SYS_utime
diff --git a/libgloss/nds32/syscall_write.S b/libgloss/nds32/syscall_write.S
index d5f542b2a..1b1752c5a 100644
--- a/libgloss/nds32/syscall_write.S
+++ b/libgloss/nds32/syscall_write.S
@@ -31,5 +31,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "syscall_extra.h"
- .extern errno
SYS_WRAPPER _write, SYS_write