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