|
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/hannes/embutils/gcc34-regparm.patch # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END ---
--- ./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; i<len; ++i) if (buffer_putc(b,s[i])<0) return -1; @@ -60,13 +51,13 @@
#endif #ifndef DONT_NEED_PUTULONG -int buffer_putulong(buffer *b,unsigned long l) {
+int __attribute__((regparm(2))) buffer_putulong(buffer *b,unsigned long l) {
char buf[50]; return buffer_put(b,buf,fmt_ulong(buf,l)); } #endif -static int buffer_putnlflush(buffer* b) {
+static int __attribute__((regparm(1))) buffer_putnlflush(buffer* b) {
buffer_putc(b,'\n'); buffer_flush(b); } --- ./fmt_8long.c.orig 2004-09-13 04:28:57.283447352 +0200
+++ ./fmt_8long.c 2004-09-13 04:29:09.751551912 +0200
@@ -1,8 +1,5 @@
-#ifdef __i386__
-unsigned int fmt_8long(char *dest,unsigned long i) __attribute__((regparm(2)));
-#endif
-unsigned int fmt_8long(char *dest,unsigned long i) {
+unsigned int __attribute__((regparm(2))) fmt_8long(char *dest,unsigned long i) {
register unsigned long len,tmp,len2; for (len=1, tmp=i; tmp>7; ++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;
|