/programs/develop/libraries/newlib/crt/chkstk.S |
---|
1,11 → 1,14 |
.global ___chkstk |
.global ___chkstk_ms |
.global __alloca |
.section .text |
#.def ___chkstk; .scl 2; .type 32; .endef |
#.def ___chkstk_ms; .scl 2; .type 32; .endef |
#.def __alloca; .scl 2; .type 32; .endef |
___chkstk: |
__alloca: |
pushl %ecx /* save temp */ |
29,3 → 32,30 |
.ascii "Stack overflow" |
___chkstk_ms: |
pushl %ecx /* save temp */ |
pushl %eax |
cmpl $0x1000, %eax /* > 4k ?*/ |
leal 12(%esp), %ecx /* point past return addr */ |
jb 2f |
1: |
subl $0x1000, %ecx /* yes, move pointer down 4k*/ |
cmpl %fs:4, %ecx /* check low stack limit */ |
jb 3f |
orl $0x0, (%ecx) /* probe there */ |
subl $0x1000, %eax /* decrement count */ |
cmpl $0x1000, %eax |
ja 1b /* and do it again */ |
2: |
subl %eax, %ecx |
orl $0x0, (%ecx) /* less than 4k, just peek here */ |
popl %eax |
popl %ecx |
ret |
3: |
int3 #trap to debugger |
.ascii "Stack overflow" |
/programs/develop/libraries/newlib/crt/emutls.c |
---|
25,7 → 25,6 |
#include <stdlib.h> |
#include <memory.h> |
#include <malloc.h> |
#include <errno.h> |
#include <gthr.h> |
/programs/develop/libraries/newlib/include/stdint.h |
---|
35,6 → 35,7 |
#define __have_long64 1 |
#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) |
#define __have_long32 1 |
#define __have_long64 0 |
#endif |
#if __STDINT_EXP(SCHAR_MAX) == 0x7f |
177,6 → 178,8 |
typedef signed int int_fast64_t; |
typedef unsigned int uint_fast64_t; |
#define __int_fast64_t_defined 1 |
#else |
#define __int_fast64_t_defined 0 |
#endif |
/* |
212,6 → 215,7 |
#if __int_least64_t_defined |
typedef int_least64_t int_fast64_t; |
typedef uint_least64_t uint_fast64_t; |
#undef __int_fast64_t_defined |
#define __int_fast64_t_defined 1 |
#endif |
#endif |
/programs/develop/libraries/newlib/include/sys/_default_fcntl.h |
---|
42,6 → 42,15 |
/* O_NDELAY _FNBIO set in include/fcntl.h */ |
#define O_NONBLOCK _FNONBLOCK |
#define O_NOCTTY _FNOCTTY |
#define _FBINARY 0x10000 |
#define _FTEXT 0x20000 |
#define _FNOINHERIT 0x40000 |
#define O_BINARY _FBINARY |
#define O_TEXT _FTEXT |
#define O_NOINHERIT _FNOINHERIT |
/* For machines which care - */ |
#if defined (_WIN32) || defined (__CYGWIN__) |
#define _FBINARY 0x10000 |
/programs/develop/libraries/newlib/include/sys/kos_io.h |
---|
73,7 → 73,7 |
int val; |
__asm__ __volatile__( |
"int $0x40" |
:"=eax"(val) |
:"=a"(val) |
:"a"(68),"b"(12),"c"(mem)); |
return val; |
} |
/programs/develop/libraries/newlib/stdlib/mallocr.c |
---|
68,7 → 68,7 |
__asm__ __volatile__( |
"int $0x40" |
:"=eax"(val) |
:"=a"(val) |
:"a"(68),"b"(12),"c"(size)); |
return val; |
} |
82,7 → 82,7 |
__asm__ __volatile__( |
"int $0x40" |
:"=eax"(val) |
:"=a"(val) |
:"a"(68),"b"(13),"c"(mem)); |
return val; |
} |