blob: 18b78f09086c80c00510819cdd8ac880a0d8d42b [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001From bb9e95aa1da6c1f8974702685db9b8486210ac5c Mon Sep 17 00:00:00 2001
2From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Fri, 27 Jul 2018 16:10:36 +0530
4Subject: [PATCH 06/11] MB-X intial commit
5
6---
7 libgloss/microblaze/crt0.S | 2 +-
8 libgloss/microblaze/crt1.S | 2 +-
9 libgloss/microblaze/crt2.S | 2 +-
10 libgloss/microblaze/crt3.S | 2 +-
11 libgloss/microblaze/crt4.S | 2 +-
12 libgloss/microblaze/crtinit.S | 4 ++--
13 libgloss/microblaze/pgcrtinit.S | 4 ++--
14 libgloss/microblaze/sim-crtinit.S | 4 ++--
15 libgloss/microblaze/sim-pgcrtinit.S | 4 ++--
16 newlib/libc/machine/microblaze/strcmp.c | 8 ++++----
17 10 files changed, 17 insertions(+), 17 deletions(-)
18
19diff --git a/libgloss/microblaze/crt0.S b/libgloss/microblaze/crt0.S
20index b39ea90..865a8c2 100644
21--- a/libgloss/microblaze/crt0.S
22+++ b/libgloss/microblaze/crt0.S
23@@ -84,7 +84,7 @@ _vector_hw_exception:
24 _start1:
25 la r13, r0, _SDA_BASE_ /* Set the Small Data Anchors and the stack pointer */
26 la r2, r0, _SDA2_BASE_
27- la r1, r0, _stack-16 /* 16 bytes (4 words are needed by crtinit for args and link reg */
28+ la r1, r0, _stack-32 /* 16 bytes (4 words are needed by crtinit for args and link reg */
29
30 brlid r15, _crtinit /* Initialize BSS and run program */
31 nop
32diff --git a/libgloss/microblaze/crt1.S b/libgloss/microblaze/crt1.S
33index 20323ff..a8bf749 100644
34--- a/libgloss/microblaze/crt1.S
35+++ b/libgloss/microblaze/crt1.S
36@@ -75,7 +75,7 @@ _vector_hw_exception:
37 _start:
38 la r13, r0, _SDA_BASE_ /* Set the Small Data Anchors and the stack pointer */
39 la r2, r0, _SDA2_BASE_
40- la r1, r0, _stack-16 /* 16 bytes (4 words are needed by crtinit for args and link reg */
41+ la r1, r0, _stack-32 /* 16 bytes (4 words are needed by crtinit for args and link reg */
42
43 brlid r15, _crtinit /* Initialize BSS and run program */
44 nop
45diff --git a/libgloss/microblaze/crt2.S b/libgloss/microblaze/crt2.S
46index e3fb15b..34d9f95 100644
47--- a/libgloss/microblaze/crt2.S
48+++ b/libgloss/microblaze/crt2.S
49@@ -73,7 +73,7 @@ _vector_hw_exception:
50 _start:
51 la r13, r0, _SDA_BASE_ /* Set the Small Data Anchors and the stack pointer */
52 la r2, r0, _SDA2_BASE_
53- la r1, r0, _stack-16 /* 16 bytes (4 words are needed by crtinit for args and link reg */
54+ la r1, r0, _stack-32 /* 16 bytes (4 words are needed by crtinit for args and link reg */
55
56 brlid r15, _crtinit /* Initialize BSS and run program */
57 nop
58diff --git a/libgloss/microblaze/crt3.S b/libgloss/microblaze/crt3.S
59index 452ea52..ebcf207 100644
60--- a/libgloss/microblaze/crt3.S
61+++ b/libgloss/microblaze/crt3.S
62@@ -59,7 +59,7 @@
63 _start:
64 la r13, r0, _SDA_BASE_ /* Set the Small Data Anchors and the stack pointer */
65 la r2, r0, _SDA2_BASE_
66- la r1, r0, _stack-16 /* 16 bytes (4 words are needed by crtinit for args and link reg */
67+ la r1, r0, _stack-32 /* 16 bytes (4 words are needed by crtinit for args and link reg */
68
69 brlid r15, _crtinit /* Initialize BSS and run program */
70 nop
71diff --git a/libgloss/microblaze/crt4.S b/libgloss/microblaze/crt4.S
72index 475acec..4cf0b01 100644
73--- a/libgloss/microblaze/crt4.S
74+++ b/libgloss/microblaze/crt4.S
75@@ -59,7 +59,7 @@
76 _start:
77 la r13, r0, _SDA_BASE_ /* Set the Small Data Anchors and the stack pointer */
78 la r2, r0, _SDA2_BASE_
79- la r1, r0, _stack-16 /* 16 bytes (4 words are needed by crtinit for args and link reg */
80+ la r1, r0, _stack-32 /* 16 bytes (4 words are needed by crtinit for args and link reg */
81
82 brlid r15, _crtinit /* Initialize BSS and run program */
83 nop
84diff --git a/libgloss/microblaze/crtinit.S b/libgloss/microblaze/crtinit.S
85index 78eb76d..86c6dfc 100644
86--- a/libgloss/microblaze/crtinit.S
87+++ b/libgloss/microblaze/crtinit.S
88@@ -33,7 +33,7 @@
89 .ent _crtinit
90 .type _crtinit, @function
91 _crtinit:
92- addi r1, r1, -20 /* Save Link register */
93+ addi r1, r1, -40 /* Save Link register */
94 swi r15, r1, 0
95
96 addi r6, r0, __sbss_start /* clear SBSS */
97@@ -82,6 +82,6 @@ _crtinit:
98
99 addik r3, r19, 0 /* Restore return value */
100 rtsd r15, 8
101- addi r1, r1, 20
102+ addi r1, r1, 40
103 .end _crtinit
104
105diff --git a/libgloss/microblaze/pgcrtinit.S b/libgloss/microblaze/pgcrtinit.S
106index fca1bc4..2593082 100644
107--- a/libgloss/microblaze/pgcrtinit.S
108+++ b/libgloss/microblaze/pgcrtinit.S
109@@ -33,7 +33,7 @@
110 .ent _crtinit
111
112 _crtinit:
113- addi r1, r1, -20 /* Save Link register */
114+ addi r1, r1, -40 /* Save Link register */
115 swi r15, r1, 0
116
117 addi r6, r0, __sbss_start /* clear SBSS */
118@@ -87,6 +87,6 @@ _crtinit:
119 lw r15, r1, r0 /* Return back to CRT */
120 addik r3, r19, 0 /* Restore return value */
121 rtsd r15, 8
122- addi r1, r1, 20
123+ addi r1, r1, 40
124 .end _crtinit
125
126diff --git a/libgloss/microblaze/sim-crtinit.S b/libgloss/microblaze/sim-crtinit.S
127index d2f59fe..74586d9 100644
128--- a/libgloss/microblaze/sim-crtinit.S
129+++ b/libgloss/microblaze/sim-crtinit.S
130@@ -39,7 +39,7 @@
131 .ent _crtinit
132
133 _crtinit:
134- addi r1, r1, -20 /* Save Link register */
135+ addi r1, r1, -40 /* Save Link register */
136 swi r15, r1, 0
137
138 brlid r15, _program_init /* Initialize the program */
139@@ -64,6 +64,6 @@ _crtinit:
140 lw r15, r1, r0 /* Return back to CRT */
141 addik r3, r19, 0 /* Restore return value */
142 rtsd r15, 8
143- addi r1, r1, 20
144+ addi r1, r1, 40
145 .end _crtinit
146
147diff --git a/libgloss/microblaze/sim-pgcrtinit.S b/libgloss/microblaze/sim-pgcrtinit.S
148index 3c6ba83..82ebcca 100644
149--- a/libgloss/microblaze/sim-pgcrtinit.S
150+++ b/libgloss/microblaze/sim-pgcrtinit.S
151@@ -39,7 +39,7 @@
152 .ent _crtinit
153
154 _crtinit:
155- addi r1, r1, -20 /* Save Link register */
156+ addi r1, r1, -40 /* Save Link register */
157 swi r15, r1, 0
158
159 brlid r15, _program_init /* Initialize the program */
160@@ -67,6 +67,6 @@ _crtinit:
161
162 lw r15, r1, r0 /* Return back to CRT */
163 rtsd r15, 8
164- addi r1, r1, 20
165+ addi r1, r1, 40
166 .end _crtinit
167
168diff --git a/newlib/libc/machine/microblaze/strcmp.c b/newlib/libc/machine/microblaze/strcmp.c
169index 434195e..3119d82 100644
170--- a/newlib/libc/machine/microblaze/strcmp.c
171+++ b/newlib/libc/machine/microblaze/strcmp.c
172@@ -96,15 +96,15 @@ strcmp (const char *s1,
173
174 return (*(unsigned char *) s1) - (*(unsigned char *) s2);
175 #else
176- unsigned long *a1;
177- unsigned long *a2;
178+ unsigned int *a1;
179+ unsigned int *a2;
180
181 /* If s1 or s2 are unaligned, then compare bytes. */
182 if (!UNALIGNED (s1, s2))
183 {
184 /* If s1 and s2 are word-aligned, compare them a word at a time. */
185- a1 = (unsigned long*)s1;
186- a2 = (unsigned long*)s2;
187+ a1 = (unsigned int*)s1;
188+ a2 = (unsigned int*)s2;
189 while (*a1 == *a2)
190 {
191 /* To get here, *a1 == *a2, thus if we find a null in *a1,
192--
1932.7.4
194