diff --git a/package/hannes/embutils/gcc34-regparm.patch b/package/hannes/embutils/gcc34-regparm.patch new file mode 100644 index 000000000..c07627487 --- /dev/null +++ b/package/hannes/embutils/gcc34-regparm.patch @@ -0,0 +1,126 @@ +--- ./buffer.c.orig 2004-09-13 04:25:26.764451104 +0200 ++++ ./buffer.c 2004-09-13 04:27:42.202861336 +0200 +@@ -6,15 +6,6 @@ + int (*op)(); + } buffer; + +-#ifdef __i386__ +-int buffer_flush(buffer* b) __attribute__((regparm(1))); +-int buffer_putc(buffer *b,char c) __attribute__((regparm(2))); +-int buffer_puts(buffer *b,const char* s) __attribute__((regparm(2))); +-int buffer_put(buffer *b,char* s,int len) __attribute__((regparm(2))); +-int buffer_putulong(buffer *b,unsigned long l) __attribute__((regparm(2))); +-static int buffer_putnlflush(buffer* b) __attribute__((regparm(1))); +-#endif +- + #define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) } + #define BUFFER_INSIZE 8192 + #define BUFFER_OUTSIZE 8192 +@@ -31,27 +22,27 @@ + buffer *buffer_2 = &it2; + #endif + +-int buffer_flush(buffer* b) { ++int __attribute__((regparm(1))) buffer_flush(buffer* b) { + register int p; + if (!(p=b->p)) return 0; + b->p=0; + return b->op(b->fd,b->x,p); + } + +-int buffer_putc(buffer *b,char c) { ++int __attribute__((regparm(2))) buffer_putc(buffer *b,char c) { + if (b->p>=b->n) if (buffer_flush(b)<0) return -1; + b->x[b->p++]=c; + return 0; + } + +-int buffer_puts(buffer *b,const char* s) { ++int __attribute__((regparm(2))) buffer_puts(buffer *b,const char* s) { + for (; *s; ++s) + if (buffer_putc(b,*s)<0) return -1; + return 0; + } + + #ifndef DONT_NEED_PUT +-int buffer_put(buffer *b,char* s,int len) { ++int __attribute__((regparm(2))) buffer_put(buffer *b,char* s,int len) { + int i; + for (i=0; i7; ++len) tmp/=8; + if (dest) +--- ./fmt_str.c.orig 2004-09-13 04:27:54.884933368 +0200 ++++ ./fmt_str.c 2004-09-13 04:28:14.362972256 +0200 +@@ -1,8 +1,5 @@ +-#ifdef __i386__ +-unsigned int fmt_str(char *dest,const char* in) __attribute__((regparm(2))); +-#endif + +-unsigned int fmt_str(char *out,const char *in) { ++unsigned int __attribute__((regparm(2))) fmt_str(char *out,const char *in) { + register char* s=out; + register const char* t=in; + for (;;) { +--- ./fmt_ulong.c.orig 2004-09-13 04:28:28.835772056 +0200 ++++ ./fmt_ulong.c 2004-09-13 04:28:48.251820368 +0200 +@@ -1,8 +1,5 @@ +-#ifdef __i386__ +-unsigned int fmt_ulong(char *dest,unsigned long i) __attribute__((regparm(2))); +-#endif + +-unsigned int fmt_ulong(char *dest,unsigned long i) { ++unsigned int __attribute__((regparm(2))) fmt_ulong(char *dest,unsigned long i) { + register unsigned long len,tmp,len2; + for (len=1, tmp=i; tmp>9; ++len) tmp/=10; + if (dest) +--- ./allinone.c.orig 2004-09-13 04:34:23.728820112 +0200 ++++ ./allinone.c 2004-09-13 04:37:51.664209128 +0200 +@@ -77,9 +77,7 @@ + #endif + + +-static void disp ( const char *s ) __attribute__ (( regparm (1) )); +- +-static void disp ( const char *s ) ++static void __attribute__ (( regparm (1) )) disp ( const char *s ) + { + static int notfirst; + +@@ -89,9 +87,7 @@ + } + + +-static void interpret_esc ( unsigned char* src ) __attribute__ (( regparm (1) )); +- +-static void interpret_esc ( unsigned char* src ) ++static void __attribute__ (( regparm (1) )) interpret_esc ( unsigned char* src ) + { + unsigned char *dst = src; +