debuggers.hg

annotate stubdom/newlib.patch @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 26afc8557f9f
children
rev   line source
keir@17071 1 There is a mix between longs and long longs.
keir@17071 2
keir@17071 3 Index: newlib/libc/include/inttypes.h
keir@17071 4 ===================================================================
keir@17071 5 RCS file: /cvs/src/src/newlib/libc/include/inttypes.h,v
keir@17071 6 retrieving revision 1.3
keir@17071 7 diff -u -p -r1.3 inttypes.h
keir@17071 8 --- newlib/libc/include/inttypes.h 16 Dec 2005 19:03:12 -0000 1.3
keir@17071 9 +++ newlib/libc/include/inttypes.h 8 Nov 2007 16:32:44 -0000
keir@17071 10 @@ -163,12 +163,12 @@
keir@17071 11
keir@17071 12
keir@17071 13 /* 64-bit types */
keir@17071 14 -#if __have_longlong64
keir@17071 15 -#define __PRI64(x) __STRINGIFY(ll##x)
keir@17071 16 -#define __SCN64(x) __STRINGIFY(ll##x)
keir@17071 17 -#elif __have_long64
keir@17071 18 +#if __have_long64
keir@17071 19 #define __PRI64(x) __STRINGIFY(l##x)
keir@17071 20 #define __SCN64(x) __STRINGIFY(l##x)
keir@17071 21 +#elif __have_longlong64
keir@17071 22 +#define __PRI64(x) __STRINGIFY(ll##x)
keir@17071 23 +#define __SCN64(x) __STRINGIFY(ll##x)
keir@17071 24 #else
keir@17071 25 #define __PRI64(x) __STRINGIFY(x)
keir@17071 26 #define __SCN64(x) __STRINGIFY(x)
keir@17071 27 @@ -217,12 +217,12 @@
keir@17071 28 #endif
keir@17071 29
keir@17071 30 /* max-bit types */
keir@17071 31 -#if __have_longlong64
keir@17071 32 -#define __PRIMAX(x) __STRINGIFY(ll##x)
keir@17071 33 -#define __SCNMAX(x) __STRINGIFY(ll##x)
keir@17071 34 -#elif __have_long64
keir@17071 35 +#if __have_long64
keir@17071 36 #define __PRIMAX(x) __STRINGIFY(l##x)
keir@17071 37 #define __SCNMAX(x) __STRINGIFY(l##x)
keir@17071 38 +#elif __have_longlong64
keir@17071 39 +#define __PRIMAX(x) __STRINGIFY(ll##x)
keir@17071 40 +#define __SCNMAX(x) __STRINGIFY(ll##x)
keir@17071 41 #else
keir@17071 42 #define __PRIMAX(x) __STRINGIFY(x)
keir@17071 43 #define __SCNMAX(x) __STRINGIFY(x)
keir@17071 44 @@ -242,12 +242,12 @@
keir@17071 45 #define SCNxMAX __SCNMAX(x)
keir@17071 46
keir@17071 47 /* ptr types */
keir@17071 48 -#if __have_longlong64
keir@17071 49 -#define __PRIPTR(x) __STRINGIFY(ll##x)
keir@17071 50 -#define __SCNPTR(x) __STRINGIFY(ll##x)
keir@17071 51 -#elif __have_long64
keir@17071 52 +#if __have_long64
keir@17071 53 #define __PRIPTR(x) __STRINGIFY(l##x)
keir@17071 54 #define __SCNPTR(x) __STRINGIFY(l##x)
keir@17071 55 +#elif __have_longlong64
keir@17071 56 +#define __PRIPTR(x) __STRINGIFY(ll##x)
keir@17071 57 +#define __SCNPTR(x) __STRINGIFY(ll##x)
keir@17071 58 #else
keir@17071 59 #define __PRIPTR(x) __STRINGIFY(x)
keir@17071 60 #define __SCNPTR(x) __STRINGIFY(x)
keir@17071 61
keir@17071 62 We don't want u?int32_t to be long as our code assume in a lot of places to be
keir@17071 63 int.
keir@17071 64
keir@17071 65 Index: newlib/libc/include/stdint.h
keir@17071 66 ===================================================================
keir@17071 67 RCS file: /cvs/src/src/newlib/libc/include/stdint.h,v
keir@17071 68 retrieving revision 1.10
keir@17071 69 diff -u -p -r1.10 stdint.h
keir@17071 70 --- newlib/libc/include/stdint.h 16 Aug 2006 21:39:43 -0000 1.10
keir@17071 71 +++ newlib/libc/include/stdint.h 12 Feb 2008 13:07:52 -0000
keir@17071 72 @@ -38,7 +38,7 @@ extern "C" {
keir@17071 73 #if __STDINT_EXP(LONG_MAX) > 0x7fffffff
keir@17071 74 #define __have_long64 1
keir@17071 75 #elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
keir@17071 76 -#define __have_long32 1
keir@17071 77 +/* #define __have_long32 1 */
keir@17071 78 #endif
keir@17071 79
keir@17071 80 #if __STDINT_EXP(SCHAR_MAX) == 0x7f
keir@17071 81
keir@17071 82 Define the basic ia64 jump buffer
keir@17071 83
keir@17071 84 Index: newlib/libc/include/machine/setjmp.h
keir@17071 85 ===================================================================
keir@17071 86 RCS file: /cvs/src/src/newlib/libc/include/machine/setjmp.h,v
keir@17071 87 retrieving revision 1.34
keir@17071 88 diff -u -p -r1.34 setjmp.h
keir@17071 89 --- newlib/libc/include/machine/setjmp.h 7 Nov 2007 21:42:24 -0000 1.34
keir@17071 90 +++ newlib/libc/include/machine/setjmp.h 11 Jan 2008 18:10:43 -0000
keir@17071 91 @@ -72,6 +72,11 @@ _BEGIN_STD_C
keir@17071 92 #define _JBLEN 8
keir@17071 93 #endif
keir@17071 94
keir@17071 95 +#ifdef __ia64__
keir@17071 96 +#define _JBTYPE long
keir@17071 97 +#define _JBLEN 70
keir@17071 98 +#endif
keir@17071 99 +
keir@17071 100 #ifdef __i960__
keir@17071 101 #define _JBLEN 35
keir@17071 102 #endif
keir@17071 103
keir@17071 104 In mini-os we use a dynamic reentrency buffer.
keir@17071 105
keir@17071 106 Index: newlib/libc/include/sys/config.h
keir@17071 107 ===================================================================
keir@17071 108 RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
keir@17071 109 retrieving revision 1.47
keir@17071 110 diff -u -p -r1.47 config.h
keir@17071 111 --- newlib/libc/include/sys/config.h 15 Mar 2007 21:32:12 -0000 1.47
keir@17071 112 +++ newlib/libc/include/sys/config.h 8 Nov 2007 16:32:44 -0000
keir@17071 113 @@ -71,6 +71,10 @@
keir@17071 114 #endif
keir@17071 115 #endif
keir@17071 116
keir@17071 117 +#ifndef __DYNAMIC_REENT__
keir@17071 118 +#define __DYNAMIC_REENT__
keir@17071 119 +#endif
keir@17071 120 +
keir@17071 121 #ifdef __mn10200__
keir@17071 122 #define __SMALL_BITFIELDS
keir@17071 123 #endif
keir@17071 124
keir@17071 125 Dynamic pointer to our reentrancy zone
keir@17071 126
keir@17071 127 Index: newlib/libc/reent/getreent.c
keir@17071 128 ===================================================================
keir@17071 129 RCS file: /cvs/src/src/newlib/libc/reent/getreent.c,v
keir@17071 130 retrieving revision 1.2
keir@17071 131 diff -u -p -r1.2 getreent.c
keir@17071 132 --- newlib/libc/reent/getreent.c 7 Sep 2007 00:45:55 -0000 1.2
keir@17071 133 +++ newlib/libc/reent/getreent.c 8 Nov 2007 16:32:44 -0000
keir@17071 134 @@ -3,12 +3,20 @@
keir@17071 135 #include <_ansi.h>
keir@17071 136 #include <reent.h>
keir@17071 137
keir@17071 138 +#define weak_alias(name, aliasname) \
keir@17071 139 + extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
keir@17071 140 +
keir@17071 141 #ifdef __getreent
keir@17071 142 #undef __getreent
keir@17071 143 #endif
keir@17071 144 +#ifdef __libc_getreent
keir@17071 145 +#undef __libc_getreent
keir@17071 146 +#endif
keir@17071 147
keir@17071 148 struct _reent *
keir@17071 149 -_DEFUN_VOID(__getreent)
keir@17071 150 +__libc_getreent (void)
keir@17071 151 {
keir@17071 152 return _impure_ptr;
keir@17071 153 }
keir@17071 154 +weak_alias(__libc_getreent,__getreent)
keir@17071 155 +
keir@17071 156
keir@17071 157 We can't provide a red zone in mini-os.
keir@17071 158
keir@17071 159 Index: newlib/libc/machine/x86_64/memcpy.S
keir@17071 160 ===================================================================
keir@17071 161 RCS file: /cvs/src/src/newlib/libc/machine/x86_64/memcpy.S,v
keir@17071 162 retrieving revision 1.1
keir@17071 163 diff -u -p -r1.1 memcpy.S
keir@17071 164 --- newlib/libc/machine/x86_64/memcpy.S 28 Aug 2007 21:56:49 -0000 1.1
keir@17071 165 +++ newlib/libc/machine/x86_64/memcpy.S 8 Nov 2007 16:32:44 -0000
keir@17071 166 @@ -30,10 +30,18 @@ quadword_aligned:
keir@17071 167 cmpq $256, rdx
keir@17071 168 jb quadword_copy
keir@17071 169
keir@17071 170 +#if 1
keir@17071 171 + subq $32, rsp
keir@17071 172 + movq rax, 24 (rsp)
keir@17071 173 + movq r12, 16 (rsp)
keir@17071 174 + movq r13, 8 (rsp)
keir@17071 175 + movq r14, 0 (rsp)
keir@17071 176 +#else
keir@17071 177 movq rax, -8 (rsp)
keir@17071 178 movq r12, -16 (rsp)
keir@17071 179 movq r13, -24 (rsp)
keir@17071 180 movq r14, -32 (rsp)
keir@17071 181 +#endif
keir@17071 182
keir@17071 183 movq rdx, rcx /* Copy 128 bytes at a time with minimum cache polution */
keir@17071 184 shrq $7, rcx
keir@17071 185 @@ -89,10 +97,18 @@ loop:
keir@17071 186 movq rdx, rcx
keir@17071 187 andq $127, rcx
keir@17071 188 rep movsb
keir@17071 189 +#if 1
keir@17071 190 + movq 24 (rsp), rax
keir@17071 191 + movq 16 (rsp), r12
keir@17071 192 + movq 8 (rsp), r13
keir@17071 193 + movq 0 (rsp), r14
keir@17071 194 + addq $32, rsp
keir@17071 195 +#else
keir@17071 196 movq -8 (rsp), rax
keir@17071 197 movq -16 (rsp), r12
keir@17071 198 movq -24 (rsp), r13
keir@17071 199 movq -32 (rsp), r14
keir@17071 200 +#endif
keir@17071 201 ret
keir@17071 202
keir@17071 203
keir@18077 204 --- newlib/libc/machine/x86_64/x86_64mach.h.orig 2008-07-11 14:57:23.062269000 +0100
keir@18077 205 +++ newlib/libc/machine/x86_64/x86_64mach.h 2008-07-11 14:58:01.262503000 +0100
keir@18077 206 @@ -22,81 +22,81 @@
keir@18077 207
keir@18077 208 #define REG(x) CONCAT1(__REG_PREFIX__, x)
keir@18077 209
keir@18077 210 -#define rax REG(rax)
keir@18077 211 -#define rbx REG(rbx)
keir@18077 212 -#define rcx REG(rcx)
keir@18077 213 -#define rdx REG(rdx)
keir@18077 214 -#define rsi REG(rsi)
keir@18077 215 -#define rdi REG(rdi)
keir@18077 216 -#define rbp REG(rbp)
keir@18077 217 -#define rsp REG(rsp)
keir@18077 218 -
keir@18077 219 -#define r8 REG(r8)
keir@18077 220 -#define r9 REG(r9)
keir@18077 221 -#define r10 REG(r10)
keir@18077 222 -#define r11 REG(r11)
keir@18077 223 -#define r12 REG(r12)
keir@18077 224 -#define r13 REG(r13)
keir@18077 225 -#define r14 REG(r14)
keir@18077 226 -#define r15 REG(r15)
keir@18077 227 -
keir@18077 228 -#define eax REG(eax)
keir@18077 229 -#define ebx REG(ebx)
keir@18077 230 -#define ecx REG(ecx)
keir@18077 231 -#define edx REG(edx)
keir@18077 232 -#define esi REG(esi)
keir@18077 233 -#define edi REG(edi)
keir@18077 234 -#define ebp REG(ebp)
keir@18077 235 -#define esp REG(esp)
keir@18077 236 -
keir@18077 237 -#define st0 REG(st)
keir@18077 238 -#define st1 REG(st(1))
keir@18077 239 -#define st2 REG(st(2))
keir@18077 240 -#define st3 REG(st(3))
keir@18077 241 -#define st4 REG(st(4))
keir@18077 242 -#define st5 REG(st(5))
keir@18077 243 -#define st6 REG(st(6))
keir@18077 244 -#define st7 REG(st(7))
keir@18077 245 -
keir@18077 246 -#define ax REG(ax)
keir@18077 247 -#define bx REG(bx)
keir@18077 248 -#define cx REG(cx)
keir@18077 249 -#define dx REG(dx)
keir@18077 250 -
keir@18077 251 -#define ah REG(ah)
keir@18077 252 -#define bh REG(bh)
keir@18077 253 -#define ch REG(ch)
keir@18077 254 -#define dh REG(dh)
keir@18077 255 -
keir@18077 256 -#define al REG(al)
keir@18077 257 -#define bl REG(bl)
keir@18077 258 -#define cl REG(cl)
keir@18077 259 -#define dl REG(dl)
keir@18077 260 -
keir@18077 261 -#define sil REG(sil)
keir@18077 262 -
keir@18077 263 -#define mm1 REG(mm1)
keir@18077 264 -#define mm2 REG(mm2)
keir@18077 265 -#define mm3 REG(mm3)
keir@18077 266 -#define mm4 REG(mm4)
keir@18077 267 -#define mm5 REG(mm5)
keir@18077 268 -#define mm6 REG(mm6)
keir@18077 269 -#define mm7 REG(mm7)
keir@18077 270 -
keir@18077 271 -#define xmm0 REG(xmm0)
keir@18077 272 -#define xmm1 REG(xmm1)
keir@18077 273 -#define xmm2 REG(xmm2)
keir@18077 274 -#define xmm3 REG(xmm3)
keir@18077 275 -#define xmm4 REG(xmm4)
keir@18077 276 -#define xmm5 REG(xmm5)
keir@18077 277 -#define xmm6 REG(xmm6)
keir@18077 278 -#define xmm7 REG(xmm7)
keir@18077 279 -
keir@18077 280 -#define cr0 REG(cr0)
keir@18077 281 -#define cr1 REG(cr1)
keir@18077 282 -#define cr2 REG(cr2)
keir@18077 283 -#define cr3 REG(cr3)
keir@18077 284 -#define cr4 REG(cr4)
keir@18077 285 +#define rax %rax
keir@18077 286 +#define rbx %rbx
keir@18077 287 +#define rcx %rcx
keir@18077 288 +#define rdx %rdx
keir@18077 289 +#define rsi %rsi
keir@18077 290 +#define rdi %rdi
keir@18077 291 +#define rbp %rbp
keir@18077 292 +#define rsp %rsp
keir@18077 293 +
keir@18077 294 +#define r8 %r8
keir@18077 295 +#define r9 %r9
keir@18077 296 +#define r10 %r10
keir@18077 297 +#define r11 %r11
keir@18077 298 +#define r12 %r12
keir@18077 299 +#define r13 %r13
keir@18077 300 +#define r14 %r14
keir@18077 301 +#define r15 %r15
keir@18077 302 +
keir@18077 303 +#define eax %eax
keir@18077 304 +#define ebx %ebx
keir@18077 305 +#define ecx %ecx
keir@18077 306 +#define edx %edx
keir@18077 307 +#define esi %esi
keir@18077 308 +#define edi %edi
keir@18077 309 +#define ebp %ebp
keir@18077 310 +#define esp %esp
keir@18077 311 +
keir@18077 312 +#define st0 %st
keir@18077 313 +#define st1 %st(1)
keir@18077 314 +#define st2 %st(2)
keir@18077 315 +#define st3 %st(3)
keir@18077 316 +#define st4 %st(4)
keir@18077 317 +#define st5 %st(5)
keir@18077 318 +#define st6 %st(6)
keir@18077 319 +#define st7 %st(7)
keir@18077 320 +
keir@18077 321 +#define ax %ax
keir@18077 322 +#define bx %bx
keir@18077 323 +#define cx %cx
keir@18077 324 +#define dx %dx
keir@18077 325 +
keir@18077 326 +#define ah %ah
keir@18077 327 +#define bh %bh
keir@18077 328 +#define ch %ch
keir@18077 329 +#define dh %dh
keir@18077 330 +
keir@18077 331 +#define al %al
keir@18077 332 +#define bl %bl
keir@18077 333 +#define cl %cl
keir@18077 334 +#define dl %dl
keir@18077 335 +
keir@18077 336 +#define sil %sil
keir@18077 337 +
keir@18077 338 +#define mm1 %mm1
keir@18077 339 +#define mm2 %mm2
keir@18077 340 +#define mm3 %mm3
keir@18077 341 +#define mm4 %mm4
keir@18077 342 +#define mm5 %mm5
keir@18077 343 +#define mm6 %mm6
keir@18077 344 +#define mm7 %mm7
keir@18077 345 +
keir@18077 346 +#define xmm0 %xmm0
keir@18077 347 +#define xmm1 %xmm1
keir@18077 348 +#define xmm2 %xmm2
keir@18077 349 +#define xmm3 %xmm3
keir@18077 350 +#define xmm4 %xmm4
keir@18077 351 +#define xmm5 %xmm5
keir@18077 352 +#define xmm6 %xmm6
keir@18077 353 +#define xmm7 %xmm7
keir@18077 354 +
keir@18077 355 +#define cr0 %cr0
keir@18077 356 +#define cr1 %cr1
keir@18077 357 +#define cr2 %cr2
keir@18077 358 +#define cr3 %cr3
keir@18077 359 +#define cr4 %cr4
keir@18077 360
keir@18077 361 #ifdef _I386MACH_NEED_SOTYPE_FUNCTION
keir@18077 362 #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
keir@18077 363 --- newlib/libc/machine/x86_64/memcpy.S.orig 2008-07-11 15:12:27.494693000 +0100
keir@18077 364 +++ newlib/libc/machine/x86_64/memcpy.S 2008-07-11 15:12:29.448706000 +0100
keir@18077 365 @@ -60,14 +60,14 @@
keir@18077 366 movq 48 (rsi), r13
keir@18077 367 movq 56 (rsi), r14
keir@18077 368
keir@18077 369 - movntiq rax, (rdi)
keir@18077 370 - movntiq r8 , 8 (rdi)
keir@18077 371 - movntiq r9 , 16 (rdi)
keir@18077 372 - movntiq r10, 24 (rdi)
keir@18077 373 - movntiq r11, 32 (rdi)
keir@18077 374 - movntiq r12, 40 (rdi)
keir@18077 375 - movntiq r13, 48 (rdi)
keir@18077 376 - movntiq r14, 56 (rdi)
keir@18077 377 + movnti rax, (rdi)
keir@18077 378 + movnti r8 , 8 (rdi)
keir@18077 379 + movnti r9 , 16 (rdi)
keir@18077 380 + movnti r10, 24 (rdi)
keir@18077 381 + movnti r11, 32 (rdi)
keir@18077 382 + movnti r12, 40 (rdi)
keir@18077 383 + movnti r13, 48 (rdi)
keir@18077 384 + movnti r14, 56 (rdi)
keir@18077 385
keir@18077 386 movq 64 (rsi), rax
keir@18077 387 movq 72 (rsi), r8
keir@18077 388 @@ -78,14 +78,14 @@
keir@18077 389 movq 112 (rsi), r13
keir@18077 390 movq 120 (rsi), r14
keir@18077 391
keir@18077 392 - movntiq rax, 64 (rdi)
keir@18077 393 - movntiq r8 , 72 (rdi)
keir@18077 394 - movntiq r9 , 80 (rdi)
keir@18077 395 - movntiq r10, 88 (rdi)
keir@18077 396 - movntiq r11, 96 (rdi)
keir@18077 397 - movntiq r12, 104 (rdi)
keir@18077 398 - movntiq r13, 112 (rdi)
keir@18077 399 - movntiq r14, 120 (rdi)
keir@18077 400 + movnti rax, 64 (rdi)
keir@18077 401 + movnti r8 , 72 (rdi)
keir@18077 402 + movnti r9 , 80 (rdi)
keir@18077 403 + movnti r10, 88 (rdi)
keir@18077 404 + movnti r11, 96 (rdi)
keir@18077 405 + movnti r12, 104 (rdi)
keir@18077 406 + movnti r13, 112 (rdi)
keir@18077 407 + movnti r14, 120 (rdi)
keir@18077 408
keir@18077 409 leaq 128 (rsi), rsi
keir@18077 410 leaq 128 (rdi), rdi
keir@18077 411 --- newlib/libc/machine/i386/i386mach.h 2000-08-28 18:50:06.000000000 +0100
keir@18077 412 +++ newlib/libc/machine/i386/i386mach.h 2008-07-11 15:17:13.874409000 +0100
keir@18077 413 @@ -27,46 +27,46 @@
keir@18077 414
keir@18077 415 #define REG(x) CONCAT1(__REG_PREFIX__, x)
keir@18077 416
keir@18077 417 -#define eax REG(eax)
keir@18077 418 -#define ebx REG(ebx)
keir@18077 419 -#define ecx REG(ecx)
keir@18077 420 -#define edx REG(edx)
keir@18077 421 -#define esi REG(esi)
keir@18077 422 -#define edi REG(edi)
keir@18077 423 -#define ebp REG(ebp)
keir@18077 424 -#define esp REG(esp)
keir@18077 425 -
keir@18077 426 -#define st0 REG(st)
keir@18077 427 -#define st1 REG(st(1))
keir@18077 428 -#define st2 REG(st(2))
keir@18077 429 -#define st3 REG(st(3))
keir@18077 430 -#define st4 REG(st(4))
keir@18077 431 -#define st5 REG(st(5))
keir@18077 432 -#define st6 REG(st(6))
keir@18077 433 -#define st7 REG(st(7))
keir@18077 434 -
keir@18077 435 -#define ax REG(ax)
keir@18077 436 -#define bx REG(bx)
keir@18077 437 -#define cx REG(cx)
keir@18077 438 -#define dx REG(dx)
keir@18077 439 -
keir@18077 440 -#define ah REG(ah)
keir@18077 441 -#define bh REG(bh)
keir@18077 442 -#define ch REG(ch)
keir@18077 443 -#define dh REG(dh)
keir@18077 444 -
keir@18077 445 -#define al REG(al)
keir@18077 446 -#define bl REG(bl)
keir@18077 447 -#define cl REG(cl)
keir@18077 448 -#define dl REG(dl)
keir@18077 449 -
keir@18077 450 -#define mm1 REG(mm1)
keir@18077 451 -#define mm2 REG(mm2)
keir@18077 452 -#define mm3 REG(mm3)
keir@18077 453 -#define mm4 REG(mm4)
keir@18077 454 -#define mm5 REG(mm5)
keir@18077 455 -#define mm6 REG(mm6)
keir@18077 456 -#define mm7 REG(mm7)
keir@18077 457 +#define eax %eax
keir@18077 458 +#define ebx %ebx
keir@18077 459 +#define ecx %ecx
keir@18077 460 +#define edx %edx
keir@18077 461 +#define esi %esi
keir@18077 462 +#define edi %edi
keir@18077 463 +#define ebp %ebp
keir@18077 464 +#define esp %esp
keir@18077 465 +
keir@18077 466 +#define st0 %st
keir@18077 467 +#define st1 %st(1)
keir@18077 468 +#define st2 %st(2)
keir@18077 469 +#define st3 %st(3)
keir@18077 470 +#define st4 %st(4)
keir@18077 471 +#define st5 %st(5)
keir@18077 472 +#define st6 %st(6)
keir@18077 473 +#define st7 %st(7)
keir@18077 474 +
keir@18077 475 +#define ax %ax
keir@18077 476 +#define bx %bx
keir@18077 477 +#define cx %cx
keir@18077 478 +#define dx %dx
keir@18077 479 +
keir@18077 480 +#define ah %ah
keir@18077 481 +#define bh %bh
keir@18077 482 +#define ch %ch
keir@18077 483 +#define dh %dh
keir@18077 484 +
keir@18077 485 +#define al %al
keir@18077 486 +#define bl %bl
keir@18077 487 +#define cl %cl
keir@18077 488 +#define dl %dl
keir@18077 489 +
keir@18077 490 +#define mm1 %mm1
keir@18077 491 +#define mm2 %mm2
keir@18077 492 +#define mm3 %mm3
keir@18077 493 +#define mm4 %mm4
keir@18077 494 +#define mm5 %mm5
keir@18077 495 +#define mm6 %mm6
keir@18077 496 +#define mm7 %mm7
keir@18077 497
keir@18077 498 #ifdef _I386MACH_NEED_SOTYPE_FUNCTION
keir@18077 499 #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
keir@18077 500 --- newlib/libc/machine/x86_64/memset.S 2007-08-28 22:56:49.000000000 +0100
keir@18077 501 +++ newlib/libc/machine/x86_64/memset.S 2008-07-11 15:16:59.098320000 +0100
keir@18077 502 @@ -40,22 +40,22 @@
keir@18077 503
keir@18077 504 .p2align 4
keir@18077 505 loop:
keir@18077 506 - movntiq rax, (rdi)
keir@18077 507 - movntiq rax, 8 (rdi)
keir@18077 508 - movntiq rax, 16 (rdi)
keir@18077 509 - movntiq rax, 24 (rdi)
keir@18077 510 - movntiq rax, 32 (rdi)
keir@18077 511 - movntiq rax, 40 (rdi)
keir@18077 512 - movntiq rax, 48 (rdi)
keir@18077 513 - movntiq rax, 56 (rdi)
keir@18077 514 - movntiq rax, 64 (rdi)
keir@18077 515 - movntiq rax, 72 (rdi)
keir@18077 516 - movntiq rax, 80 (rdi)
keir@18077 517 - movntiq rax, 88 (rdi)
keir@18077 518 - movntiq rax, 96 (rdi)
keir@18077 519 - movntiq rax, 104 (rdi)
keir@18077 520 - movntiq rax, 112 (rdi)
keir@18077 521 - movntiq rax, 120 (rdi)
keir@18077 522 + movnti rax, (rdi)
keir@18077 523 + movnti rax, 8 (rdi)
keir@18077 524 + movnti rax, 16 (rdi)
keir@18077 525 + movnti rax, 24 (rdi)
keir@18077 526 + movnti rax, 32 (rdi)
keir@18077 527 + movnti rax, 40 (rdi)
keir@18077 528 + movnti rax, 48 (rdi)
keir@18077 529 + movnti rax, 56 (rdi)
keir@18077 530 + movnti rax, 64 (rdi)
keir@18077 531 + movnti rax, 72 (rdi)
keir@18077 532 + movnti rax, 80 (rdi)
keir@18077 533 + movnti rax, 88 (rdi)
keir@18077 534 + movnti rax, 96 (rdi)
keir@18077 535 + movnti rax, 104 (rdi)
keir@18077 536 + movnti rax, 112 (rdi)
keir@18077 537 + movnti rax, 120 (rdi)
keir@18077 538
keir@18077 539 leaq 128 (rdi), rdi
keir@18077 540
keir@18078 541 --- newlib/libm/machine/i386/i386mach.h.orig 2008-07-11 15:30:37.367227000 +0100
keir@18078 542 +++ newlib/libm/machine/i386/i386mach.h 2008-07-11 15:30:55.232337000 +0100
keir@18078 543 @@ -27,46 +27,46 @@
keir@18078 544
keir@18078 545 #define REG(x) CONCAT1(__REG_PREFIX__, x)
keir@18078 546
keir@18078 547 -#define eax REG(eax)
keir@18078 548 -#define ebx REG(ebx)
keir@18078 549 -#define ecx REG(ecx)
keir@18078 550 -#define edx REG(edx)
keir@18078 551 -#define esi REG(esi)
keir@18078 552 -#define edi REG(edi)
keir@18078 553 -#define ebp REG(ebp)
keir@18078 554 -#define esp REG(esp)
keir@18078 555 -
keir@18078 556 -#define st0 REG(st)
keir@18078 557 -#define st1 REG(st(1))
keir@18078 558 -#define st2 REG(st(2))
keir@18078 559 -#define st3 REG(st(3))
keir@18078 560 -#define st4 REG(st(4))
keir@18078 561 -#define st5 REG(st(5))
keir@18078 562 -#define st6 REG(st(6))
keir@18078 563 -#define st7 REG(st(7))
keir@18078 564 -
keir@18078 565 -#define ax REG(ax)
keir@18078 566 -#define bx REG(bx)
keir@18078 567 -#define cx REG(cx)
keir@18078 568 -#define dx REG(dx)
keir@18078 569 -
keir@18078 570 -#define ah REG(ah)
keir@18078 571 -#define bh REG(bh)
keir@18078 572 -#define ch REG(ch)
keir@18078 573 -#define dh REG(dh)
keir@18078 574 -
keir@18078 575 -#define al REG(al)
keir@18078 576 -#define bl REG(bl)
keir@18078 577 -#define cl REG(cl)
keir@18078 578 -#define dl REG(dl)
keir@18078 579 -
keir@18078 580 -#define mm1 REG(mm1)
keir@18078 581 -#define mm2 REG(mm2)
keir@18078 582 -#define mm3 REG(mm3)
keir@18078 583 -#define mm4 REG(mm4)
keir@18078 584 -#define mm5 REG(mm5)
keir@18078 585 -#define mm6 REG(mm6)
keir@18078 586 -#define mm7 REG(mm7)
keir@18078 587 +#define eax %eax
keir@18078 588 +#define ebx %ebx
keir@18078 589 +#define ecx %ecx
keir@18078 590 +#define edx %edx
keir@18078 591 +#define esi %esi
keir@18078 592 +#define edi %edi
keir@18078 593 +#define ebp %ebp
keir@18078 594 +#define esp %esp
keir@18078 595 +
keir@18078 596 +#define st0 %st
keir@18078 597 +#define st1 %st(1)
keir@18078 598 +#define st2 %st(2)
keir@18078 599 +#define st3 %st(3)
keir@18078 600 +#define st4 %st(4)
keir@18078 601 +#define st5 %st(5)
keir@18078 602 +#define st6 %st(6)
keir@18078 603 +#define st7 %st(7)
keir@18078 604 +
keir@18078 605 +#define ax %ax
keir@18078 606 +#define bx %bx
keir@18078 607 +#define cx %cx
keir@18078 608 +#define dx %dx
keir@18078 609 +
keir@18078 610 +#define ah %ah
keir@18078 611 +#define bh %bh
keir@18078 612 +#define ch %ch
keir@18078 613 +#define dh %dh
keir@18078 614 +
keir@18078 615 +#define al %al
keir@18078 616 +#define bl %bl
keir@18078 617 +#define cl %cl
keir@18078 618 +#define dl %dl
keir@18078 619 +
keir@18078 620 +#define mm1 %mm1
keir@18078 621 +#define mm2 %mm2
keir@18078 622 +#define mm3 %mm3
keir@18078 623 +#define mm4 %mm4
keir@18078 624 +#define mm5 %mm5
keir@18078 625 +#define mm6 %mm6
keir@18078 626 +#define mm7 %mm7
keir@18078 627
keir@18078 628 #ifdef _I386MACH_NEED_SOTYPE_FUNCTION
keir@18078 629 #define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
keir@18300 630
keir@18300 631
keir@18300 632 We want to have a 64bit offsets libc even on 32bit platforms.
keir@18300 633
keir@18300 634 --- ./newlib/configure.host.orig 2008-08-07 16:01:17.801946000 +0100
keir@18300 635 +++ ./newlib/configure.host 2008-08-07 16:01:34.181064000 +0100
keir@18300 636 @@ -317,6 +317,8 @@
keir@18300 637 oext=lo
keir@18300 638 lpfx=
keir@18300 639 aext=la ;;
keir@18300 640 + i[34567]86-xen-elf)
keir@18300 641 + stdio64_dir=stdio64 ;;
keir@18300 642 *) ;; #shared library not supported for ${host}
keir@18300 643 esac
keir@18300 644
keir@18300 645 --- newlib/libc/include/sys/_types.h.orig 2008-08-07 15:22:44.925008000 +0100
keir@18300 646 +++ newlib/libc/include/sys/_types.h 2008-08-07 15:22:50.824044000 +0100
keir@18300 647 @@ -13,8 +13,12 @@
keir@18300 648 #include <sys/lock.h>
keir@18300 649
keir@18300 650 #ifndef __off_t_defined
keir@18300 651 +#ifdef __MINIOS__
keir@18300 652 +typedef long long _off_t;
keir@18300 653 +#else
keir@18300 654 typedef long _off_t;
keir@18300 655 #endif
keir@18300 656 +#endif
keir@18300 657
keir@18300 658 #if defined(__rtems__)
keir@18300 659 /* device numbers are 32-bit major and and 32-bit minor */
keir@18300 660 --- ./newlib/libc/include/sys/config.h.orig 2008-08-07 14:43:25.915866000 +0100
keir@18300 661 +++ ./newlib/libc/include/sys/config.h 2008-08-07 14:44:13.508154000 +0100
keir@18300 662 @@ -69,6 +69,10 @@
keir@18300 663 /* we use some glibc header files so turn on glibc large file feature */
keir@18300 664 #define _LARGEFILE64_SOURCE 1
keir@18300 665 #endif
keir@18300 666 +#ifdef __MINIOS__
keir@18300 667 +#define __LARGE64_FILES 1
keir@18300 668 +#define _LARGEFILE64_SOURCE 1
keir@18300 669 +#endif
keir@18300 670 #endif
keir@18300 671
keir@18300 672 #ifndef __DYNAMIC_REENT__
keir@18300 673 --- ./newlib/libc/include/sys/_default_fcntl.h.orig 2008-08-07 15:08:22.377836000 +0100
keir@18300 674 +++ ./newlib/libc/include/sys/_default_fcntl.h 2008-08-07 15:08:31.651890000 +0100
keir@18300 675 @@ -170,7 +170,11 @@
keir@18300 676 /* Provide _<systemcall> prototypes for functions provided by some versions
keir@18300 677 of newlib. */
keir@18300 678 #ifdef _COMPILING_NEWLIB
keir@18300 679 -extern int _open _PARAMS ((const char *, int, ...));
keir@18300 680 +extern int _open _PARAMS ((const char *, int, ...))
keir@18300 681 +#ifdef __MINIOS__
keir@18300 682 + asm("open64")
keir@18300 683 +#endif
keir@18300 684 + ;
keir@18300 685 extern int _fcntl _PARAMS ((int, int, ...));
keir@18300 686 #ifdef __LARGE64_FILES
keir@18300 687 extern int _open64 _PARAMS ((const char *, int, ...));
keir@18300 688 --- ./newlib/libc/include/sys/unistd.h.orig 2008-08-07 15:09:36.449280000 +0100
keir@18300 689 +++ ./newlib/libc/include/sys/unistd.h 2008-08-07 15:09:51.210370000 +0100
keir@18300 690 @@ -101,7 +101,11 @@
keir@18300 691 int _EXFUN(link, (const char *__path1, const char *__path2 ));
keir@18300 692 int _EXFUN(nice, (int __nice_value ));
keir@18300 693 #if !defined(__INSIDE_CYGWIN__)
keir@18300 694 -off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
keir@18300 695 +off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ))
keir@18300 696 +#ifdef __MINIOS__
keir@18300 697 + asm("lseek64")
keir@18300 698 +#endif
keir@18300 699 + ;
keir@18300 700 #endif
keir@18300 701 #if defined(__SPU__)
keir@18300 702 #define F_ULOCK 0
keir@18300 703 --- ./newlib/libc/include/sys/stat.h.orig 2008-08-07 16:08:50.495116000 +0100
keir@18300 704 +++ ./newlib/libc/include/sys/stat.h 2008-08-07 16:10:21.799753000 +0100
keir@18300 705 @@ -49,6 +49,9 @@
keir@18300 706 long st_spare4[2];
keir@18300 707 #endif
keir@18300 708 };
keir@18300 709 +#ifdef __MINIOS__
keir@18300 710 +#define stat64 stat
keir@18300 711 +#endif
keir@18300 712 #endif
keir@18300 713
keir@18300 714 #define _IFMT 0170000 /* type of file */
keir@18300 715 @@ -132,7 +135,11 @@
keir@18300 716 /* Provide prototypes for most of the _<systemcall> names that are
keir@18300 717 provided in newlib for some compilers. */
keir@18300 718 #ifdef _COMPILING_NEWLIB
keir@18300 719 -int _EXFUN(_fstat,( int __fd, struct stat *__sbuf ));
keir@18300 720 +int _EXFUN(_fstat,( int __fd, struct stat *__sbuf ))
keir@18300 721 +#ifdef __MINIOS__
keir@18300 722 + asm("fstat64")
keir@18300 723 +#endif
keir@18300 724 + ;
keir@18300 725 int _EXFUN(_stat,( const char *__path, struct stat *__sbuf ));
keir@18300 726 #ifdef __LARGE64_FILES
keir@18300 727 struct stat64;
keir@18300 728 --- ./newlib/libc/include/_syslist.h.orig 2008-08-07 16:24:19.122605000 +0100
keir@18300 729 +++ ./newlib/libc/include/_syslist.h 2008-08-07 16:24:21.548628000 +0100
keir@18300 730 @@ -14,6 +14,7 @@
keir@18300 731 #define _kill kill
keir@18300 732 #define _link link
keir@18300 733 #define _lseek lseek
keir@18300 734 +#define _lseek64 lseek64
keir@18300 735 #define _open open
keir@18300 736 #define _read read
keir@18300 737 #define _sbrk sbrk
keir@18300 738 --- newlib/libc/include/reent.h.orig 2008-08-07 16:28:49.846502000 +0100
keir@18300 739 +++ newlib/libc/include/reent.h 2008-08-07 16:29:02.096586000 +0100
keir@18300 740 @@ -87,6 +87,9 @@
keir@18300 741 #if defined(__CYGWIN__) && defined(_COMPILING_NEWLIB)
keir@18300 742 #define stat64 __stat64
keir@18300 743 #endif
keir@18300 744 +#if defined(__MINIOS__)
keir@18300 745 +#define stat64 stat
keir@18300 746 +#endif
keir@18300 747
keir@18300 748 struct stat64;
keir@18300 749