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:
Diffstat (limited to 'newlib/libc/sys/sysnecv850/crt0.S')
-rw-r--r--newlib/libc/sys/sysnecv850/crt0.S16
1 files changed, 13 insertions, 3 deletions
diff --git a/newlib/libc/sys/sysnecv850/crt0.S b/newlib/libc/sys/sysnecv850/crt0.S
index e006871b3..15d94dc3c 100644
--- a/newlib/libc/sys/sysnecv850/crt0.S
+++ b/newlib/libc/sys/sysnecv850/crt0.S
@@ -5,7 +5,7 @@
_start:
-#if defined __v850e__
+#if defined __v850e__ || defined __v850ea__
movea 255, r0, r20
mov 65535, r21
@@ -23,7 +23,7 @@ _start:
bl .L0
.L1:
jarl ___main, r31
- addi -16, sp, sp
+ addi -12, sp, sp
mov 0, r6
mov 0, r7
mov 0, r8
@@ -42,6 +42,16 @@ _start:
movhi hi(__gp), r0, gp
movea lo(__gp), gp, gp
+ /* Initialise the call table base pointer.
+ We do this even though we are supposedly
+ assembling this file for the v850 as this
+ allows us to use the same binary for all
+ versions of the v850 architecture. */
+
+ movhi hi(__ctbp), r0, r6
+ movea lo(__ctbp), r6, r6
+ ldsr r6, ctbp
+
movhi hi(_edata), r0, r6
movea lo(_edata), r6, r6
movhi hi(_end), r0, r7
@@ -53,7 +63,7 @@ _start:
bl .L0
.L1:
jarl ___main, r31
- addi -16, sp, sp
+ addi -12, sp, sp
mov 0, r6
mov 0, r7
mov 0, r8