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:
authorDJ Delorie <dj@redhat.com>2009-04-21 22:13:32 +0400
committerDJ Delorie <dj@redhat.com>2009-04-21 22:13:32 +0400
commit6e9c1e8dd52d8b43e57b8b664e4cd087b0566cd2 (patch)
tree66583c063e67a17c899ddecc7dd6c2b24163b1f7 /libgloss/mep/sim-crt0.S
parent90791a187977e7c0c6e935a97a7675ab0e67492a (diff)
* mep/Makefile.in (SCRIPTS): Update to new config.
* mep/default.ld: New. * mep/gmap_default.ld: Change default endian to little. * mep/sim-crt0.S: Maintain 8-byte stack alignment. * mep/sim-crtn.S: Likewise.
Diffstat (limited to 'libgloss/mep/sim-crt0.S')
-rw-r--r--libgloss/mep/sim-crt0.S23
1 files changed, 13 insertions, 10 deletions
diff --git a/libgloss/mep/sim-crt0.S b/libgloss/mep/sim-crt0.S
index 0ce5f489b..c96ce2336 100644
--- a/libgloss/mep/sim-crt0.S
+++ b/libgloss/mep/sim-crt0.S
@@ -113,6 +113,17 @@ _start:
movh $sp, %uhi(__stack_table)
or3 $sp, $sp, %lo(__stack_table)
+ # initialize sp, gp, tp
+ # get CPU ID
+ ldc $0, $id
+ srl $0, 16
+
+ # load ID-specific stack pointer
+ sl2ad3 $0, $0, $sp # $0 = ($0 << 2) + $sp
+ lw $sp,($0) # $sp = *($0)
+ mov $0,0xfff8
+ and $sp, $0
+
#ifndef NOVEC
# copy exception vector table
@@ -294,14 +305,6 @@ _start:
.Lend_dc:
# NOVEC
#endif
- # initialize sp, gp, tp
- # get CPU ID
- ldc $0, $id
- srl $0, 16
-
- # load ID-specific stack pointer
- sl2ad3 $0, $0, $sp # $0 = ($0 << 2) + $sp
- lw $sp,($0) # $sp = *($0)
mov $0, 0
movh $gp, %uhi(__sdabase)
@@ -385,13 +388,13 @@ _exit_in_progress: .word 0
.section .init
__invoke_init_section:
- add $sp, -4
+ add $sp, -8
ldc $0, $lp
sw $0, ($sp)
.section .fini
__invoke_fini_section:
- add $sp, -4
+ add $sp, -8
ldc $0, $lp
sw $0, ($sp)