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:22:29 +0400
committerJeff Johnston <jjohnstn@redhat.com>2014-03-22 00:22:29 +0400
commit5ff6903e6957efc69f6a5603fa789541bbad37a5 (patch)
tree8aa18d8ec0618fe1c471f47a9d2270003087082e /libgloss/nds32
parent7f4230bdc8cd47571764354da759866cc89b9037 (diff)
2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/crt0.S: Set argc=argv=env=0. * nds32/crt1.S: Ditto.
Diffstat (limited to 'libgloss/nds32')
-rw-r--r--libgloss/nds32/crt0.S7
-rw-r--r--libgloss/nds32/crt1.S6
2 files changed, 13 insertions, 0 deletions
diff --git a/libgloss/nds32/crt0.S b/libgloss/nds32/crt0.S
index d12be761f..97c02c5c4 100644
--- a/libgloss/nds32/crt0.S
+++ b/libgloss/nds32/crt0.S
@@ -94,6 +94,13 @@ _start:
.L_call_main:
+ /* Prepare argc/argv/env for main function.
+ Since there is no operating system so far,
+ we set $r0, $r1, and $r2 to be zero. */
+ movi $r0, 0
+ movi $r1, 0
+ movi $r2, 0
+ /* Call 'main'. */
la $r15, main
jral $r15
diff --git a/libgloss/nds32/crt1.S b/libgloss/nds32/crt1.S
index 26aef5b51..60c18c318 100644
--- a/libgloss/nds32/crt1.S
+++ b/libgloss/nds32/crt1.S
@@ -100,6 +100,12 @@ _start:
exit() has been reached. */
la $r0, _fini
jal atexit
+ /* Prepare argc/argv/env for main function.
+ Since there is no operating system so far,
+ we set $r0, $r1, and $r2 to be zero. */
+ movi $r0, 0
+ movi $r1, 0
+ movi $r2, 0
/* Call 'main'. */
la $r15, main
jral $r15