aboutsummaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-core/newlib/files/0006-MB-X-intial-commit.patch
blob: 805e755eb9edddb2aecd16910d0634b3b4e03943 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
From 97684eb81807189dbcdca560d086100ba8bfa906 Mon Sep 17 00:00:00 2001
From: Nagaraju Mekala <nmekala@xilix.com>
Date: Fri, 27 Jul 2018 16:10:36 +0530
Subject: [PATCH 06/11] MB-X intial commit

---
 libgloss/microblaze/crt0.S              | 2 +-
 libgloss/microblaze/crt1.S              | 2 +-
 libgloss/microblaze/crt2.S              | 2 +-
 libgloss/microblaze/crt3.S              | 2 +-
 libgloss/microblaze/crt4.S              | 2 +-
 libgloss/microblaze/crtinit.S           | 4 ++--
 libgloss/microblaze/pgcrtinit.S         | 4 ++--
 libgloss/microblaze/sim-crtinit.S       | 4 ++--
 libgloss/microblaze/sim-pgcrtinit.S     | 4 ++--
 newlib/libc/machine/microblaze/strcmp.c | 8 ++++----
 10 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/libgloss/microblaze/crt0.S b/libgloss/microblaze/crt0.S
index b39ea90b3..865a8c269 100644
--- a/libgloss/microblaze/crt0.S
+++ b/libgloss/microblaze/crt0.S
@@ -84,7 +84,7 @@ _vector_hw_exception:
 _start1:
 	la	r13, r0, _SDA_BASE_         /* Set the Small Data Anchors and the stack pointer */
 	la	r2, r0, _SDA2_BASE_
-	la	r1, r0, _stack-16           /* 16 bytes (4 words are needed by crtinit for args and link reg */
+	la	r1, r0, _stack-32           /* 16 bytes (4 words are needed by crtinit for args and link reg */
 
 	brlid	r15, _crtinit               /* Initialize BSS and run program */
 	nop
diff --git a/libgloss/microblaze/crt1.S b/libgloss/microblaze/crt1.S
index 20323ff6d..a8bf74937 100644
--- a/libgloss/microblaze/crt1.S
+++ b/libgloss/microblaze/crt1.S
@@ -75,7 +75,7 @@ _vector_hw_exception:
 _start:
 	la	r13, r0, _SDA_BASE_         /* Set the Small Data Anchors and the stack pointer */
 	la	r2, r0, _SDA2_BASE_
-	la	r1, r0, _stack-16           /* 16 bytes (4 words are needed by crtinit for args and link reg */
+	la	r1, r0, _stack-32           /* 16 bytes (4 words are needed by crtinit for args and link reg */
 
 	brlid	r15, _crtinit               /* Initialize BSS and run program */
 	nop
diff --git a/libgloss/microblaze/crt2.S b/libgloss/microblaze/crt2.S
index e3fb15b26..34d9f951d 100644
--- a/libgloss/microblaze/crt2.S
+++ b/libgloss/microblaze/crt2.S
@@ -73,7 +73,7 @@ _vector_hw_exception:
 _start:
 	la	r13, r0, _SDA_BASE_         /* Set the Small Data Anchors and the stack pointer */
 	la	r2, r0, _SDA2_BASE_
-	la	r1, r0, _stack-16           /* 16 bytes (4 words are needed by crtinit for args and link reg */
+	la	r1, r0, _stack-32           /* 16 bytes (4 words are needed by crtinit for args and link reg */
 
 	brlid	r15, _crtinit               /* Initialize BSS and run program */
 	nop
diff --git a/libgloss/microblaze/crt3.S b/libgloss/microblaze/crt3.S
index 452ea5265..ebcf207f5 100644
--- a/libgloss/microblaze/crt3.S
+++ b/libgloss/microblaze/crt3.S
@@ -59,7 +59,7 @@
 _start:
 	la	r13, r0, _SDA_BASE_         /* Set the Small Data Anchors and the stack pointer */
 	la	r2, r0, _SDA2_BASE_
-	la	r1, r0, _stack-16           /* 16 bytes (4 words are needed by crtinit for args and link reg */
+	la	r1, r0, _stack-32           /* 16 bytes (4 words are needed by crtinit for args and link reg */
 
 	brlid	r15, _crtinit               /* Initialize BSS and run program */
 	nop
diff --git a/libgloss/microblaze/crt4.S b/libgloss/microblaze/crt4.S
index 475acecfd..4cf0b01a4 100644
--- a/libgloss/microblaze/crt4.S
+++ b/libgloss/microblaze/crt4.S
@@ -59,7 +59,7 @@
 _start:
 	la	r13, r0, _SDA_BASE_         /* Set the Small Data Anchors and the stack pointer */
 	la	r2, r0, _SDA2_BASE_
-	la	r1, r0, _stack-16           /* 16 bytes (4 words are needed by crtinit for args and link reg */
+	la	r1, r0, _stack-32           /* 16 bytes (4 words are needed by crtinit for args and link reg */
 
 	brlid	r15, _crtinit               /* Initialize BSS and run program */
 	nop
diff --git a/libgloss/microblaze/crtinit.S b/libgloss/microblaze/crtinit.S
index 78eb76df6..86c6dfcb0 100644
--- a/libgloss/microblaze/crtinit.S
+++ b/libgloss/microblaze/crtinit.S
@@ -33,7 +33,7 @@
 	.ent _crtinit
         .type _crtinit, @function
 _crtinit:
-	addi	r1, r1, -20               	/* Save Link register	 */
+	addi	r1, r1, -40               	/* Save Link register	 */
 	swi	r15, r1, 0
 
     	addi	r6, r0, __sbss_start          	/* clear SBSS */
@@ -82,6 +82,6 @@ _crtinit:
 
         addik   r3, r19, 0                      /* Restore return value */
 	rtsd	r15, 8
-    	addi	r1, r1, 20
+    	addi	r1, r1, 40
 	.end _crtinit
 
diff --git a/libgloss/microblaze/pgcrtinit.S b/libgloss/microblaze/pgcrtinit.S
index fca1bc45e..25930821c 100644
--- a/libgloss/microblaze/pgcrtinit.S
+++ b/libgloss/microblaze/pgcrtinit.S
@@ -33,7 +33,7 @@
 	.ent _crtinit
 
 _crtinit:
-	addi	r1, r1, -20               	/* Save Link register	 */
+	addi	r1, r1, -40               	/* Save Link register	 */
 	swi	r15, r1, 0
 
 	addi	r6, r0, __sbss_start          	/* clear SBSS */
@@ -87,6 +87,6 @@ _crtinit:
 	lw	r15, r1, r0                     /* Return back to CRT */
         addik   r3, r19, 0                      /* Restore return value */  
 	rtsd	r15, 8
-    	addi	r1, r1, 20
+    	addi	r1, r1, 40
 	.end _crtinit
 
diff --git a/libgloss/microblaze/sim-crtinit.S b/libgloss/microblaze/sim-crtinit.S
index d2f59fe6d..74586d9a7 100644
--- a/libgloss/microblaze/sim-crtinit.S
+++ b/libgloss/microblaze/sim-crtinit.S
@@ -39,7 +39,7 @@
 	.ent _crtinit
 
 _crtinit:
-	addi	r1, r1, -20               	/* Save Link register	 */
+	addi	r1, r1, -40               	/* Save Link register	 */
 	swi	r15, r1, 0
 
     	brlid	r15, _program_init              /* Initialize the program  */
@@ -64,6 +64,6 @@ _crtinit:
 	lw	r15, r1, r0                     /* Return back to CRT   */
         addik   r3, r19, 0                      /* Restore return value */
 	rtsd	r15, 8
-    	addi	r1, r1, 20
+    	addi	r1, r1, 40
 	.end _crtinit
 
diff --git a/libgloss/microblaze/sim-pgcrtinit.S b/libgloss/microblaze/sim-pgcrtinit.S
index 3c6ba8371..82ebccad4 100644
--- a/libgloss/microblaze/sim-pgcrtinit.S
+++ b/libgloss/microblaze/sim-pgcrtinit.S
@@ -39,7 +39,7 @@
 	.ent _crtinit
 
 _crtinit:
-	addi	r1, r1, -20               	/* Save Link register	 */
+	addi	r1, r1, -40               	/* Save Link register	 */
 	swi	r15, r1, 0
 
 	brlid	r15, _program_init              /* Initialize the program */
@@ -67,6 +67,6 @@ _crtinit:
 
 	lw	r15, r1, r0                     /* Return back to CRT */
 	rtsd	r15, 8
-    	addi	r1, r1, 20
+    	addi	r1, r1, 40
 	.end _crtinit
 
diff --git a/newlib/libc/machine/microblaze/strcmp.c b/newlib/libc/machine/microblaze/strcmp.c
index 434195e2c..3119d82c5 100644
--- a/newlib/libc/machine/microblaze/strcmp.c
+++ b/newlib/libc/machine/microblaze/strcmp.c
@@ -96,15 +96,15 @@ strcmp (const char *s1,
 
   return (*(unsigned char *) s1) - (*(unsigned char *) s2);
 #else
-  unsigned long *a1;
-  unsigned long *a2;
+  unsigned int *a1;
+  unsigned int *a2;
 
   /* If s1 or s2 are unaligned, then compare bytes. */
   if (!UNALIGNED (s1, s2))
     {  
       /* If s1 and s2 are word-aligned, compare them a word at a time. */
-      a1 = (unsigned long*)s1;
-      a2 = (unsigned long*)s2;
+      a1 = (unsigned int*)s1;
+      a2 = (unsigned int*)s2;
       while (*a1 == *a2)
         {
           /* To get here, *a1 == *a2, thus if we find a null in *a1,
-- 
2.37.1 (Apple Git-137.1)