OSDN Git Service

2007-04-04 Patrick Mansfield <patmans@us.ibm.com>
authorjjohnstn <jjohnstn>
Wed, 4 Apr 2007 21:03:13 +0000 (21:03 +0000)
committerjjohnstn <jjohnstn>
Wed, 4 Apr 2007 21:03:13 +0000 (21:03 +0000)
* libc/machine/spu/sys/syscall.h: New file for __send_to_ppe
prototype.
* libc/machine/spu/c99ppe.h: Remove static version of send_to_ppe.
* libc/machine/spu/clearerr.c: Call __send_to_ppe vs send_to_ppe.
* libc/machine/spu/fclose.c: Ditto.
* libc/machine/spu/feof.c: Ditto.
* libc/machine/spu/ferror.c: Ditto.
* libc/machine/spu/fflush.c: Ditto.
* libc/machine/spu/fgetc.c: Ditto.
* libc/machine/spu/fgetpos.c: Ditto.
* libc/machine/spu/fgets.c: Ditto.
* libc/machine/spu/fileno.c: Ditto.
* libc/machine/spu/fopen.c: Ditto.
* libc/machine/spu/fprintf.c: Ditto.
* libc/machine/spu/fputc.c: Ditto.
* libc/machine/spu/fputs.c: Ditto.
* libc/machine/spu/fread.c: Ditto.
* libc/machine/spu/freopen.c: Ditto.
* libc/machine/spu/fscanf.c: Ditto.
* libc/machine/spu/fseek.c: Ditto.
* libc/machine/spu/fsetpos.c: Ditto.
* libc/machine/spu/ftell.c: Ditto.
* libc/machine/spu/fwrite.c: Ditto.
* libc/machine/spu/getc.c: Ditto.
* libc/machine/spu/getchar.c: Ditto.
* libc/machine/spu/gets.c: Ditto.
* libc/machine/spu/perror.c: Ditto.
* libc/machine/spu/printf.c: Ditto.
* libc/machine/spu/putc.c: Ditto.
* libc/machine/spu/putchar.c: Ditto.
* libc/machine/spu/puts.c: Ditto.
* libc/machine/spu/remove.c: Ditto.
* libc/machine/spu/rename.c: Ditto.
* libc/machine/spu/rewind.c: Ditto.
* libc/machine/spu/scanf.c: Ditto.
* libc/machine/spu/setbuf.c: Ditto.
* libc/machine/spu/setvbuf.c: Ditto.
* libc/machine/spu/snprintf.c: Ditto.
* libc/machine/spu/sprintf.c: Ditto.
* libc/machine/spu/sscanf.c: Ditto.
* libc/machine/spu/tmpfile.c: Ditto.
* libc/machine/spu/tmpnam.c: Ditto.
* libc/machine/spu/ungetc.c: Ditto.
* libc/machine/spu/vfprintf.c: Ditto.
* libc/machine/spu/vfscanf.c: Ditto.
* libc/machine/spu/vprintf.c: Ditto.
* libc/machine/spu/vscanf.c: Ditto.
* libc/machine/spu/vsnprintf.c: Ditto.
* libc/machine/spu/vsprintf.c: Ditto.
* libc/machine/spu/vsscanf.c: Ditto.

50 files changed:
newlib/ChangeLog
newlib/libc/machine/spu/c99ppe.h
newlib/libc/machine/spu/clearerr.c
newlib/libc/machine/spu/fclose.c
newlib/libc/machine/spu/feof.c
newlib/libc/machine/spu/ferror.c
newlib/libc/machine/spu/fflush.c
newlib/libc/machine/spu/fgetc.c
newlib/libc/machine/spu/fgetpos.c
newlib/libc/machine/spu/fgets.c
newlib/libc/machine/spu/fileno.c
newlib/libc/machine/spu/fopen.c
newlib/libc/machine/spu/fprintf.c
newlib/libc/machine/spu/fputc.c
newlib/libc/machine/spu/fputs.c
newlib/libc/machine/spu/fread.c
newlib/libc/machine/spu/freopen.c
newlib/libc/machine/spu/fscanf.c
newlib/libc/machine/spu/fseek.c
newlib/libc/machine/spu/fsetpos.c
newlib/libc/machine/spu/ftell.c
newlib/libc/machine/spu/fwrite.c
newlib/libc/machine/spu/getc.c
newlib/libc/machine/spu/getchar.c
newlib/libc/machine/spu/gets.c
newlib/libc/machine/spu/perror.c
newlib/libc/machine/spu/printf.c
newlib/libc/machine/spu/putc.c
newlib/libc/machine/spu/putchar.c
newlib/libc/machine/spu/puts.c
newlib/libc/machine/spu/remove.c
newlib/libc/machine/spu/rename.c
newlib/libc/machine/spu/rewind.c
newlib/libc/machine/spu/scanf.c
newlib/libc/machine/spu/setbuf.c
newlib/libc/machine/spu/setvbuf.c
newlib/libc/machine/spu/snprintf.c
newlib/libc/machine/spu/sprintf.c
newlib/libc/machine/spu/sscanf.c
newlib/libc/machine/spu/sys/syscall.h [new file with mode: 0644]
newlib/libc/machine/spu/tmpfile.c
newlib/libc/machine/spu/tmpnam.c
newlib/libc/machine/spu/ungetc.c
newlib/libc/machine/spu/vfprintf.c
newlib/libc/machine/spu/vfscanf.c
newlib/libc/machine/spu/vprintf.c
newlib/libc/machine/spu/vscanf.c
newlib/libc/machine/spu/vsnprintf.c
newlib/libc/machine/spu/vsprintf.c
newlib/libc/machine/spu/vsscanf.c

index c6d3c44..7c9261b 100644 (file)
@@ -1,3 +1,56 @@
+2007-04-04  Patrick Mansfield <patmans@us.ibm.com>
+  
+       * libc/machine/spu/sys/syscall.h: New file for __send_to_ppe
+       prototype.
+       * libc/machine/spu/c99ppe.h: Remove static version of send_to_ppe.
+       * libc/machine/spu/clearerr.c: Call __send_to_ppe vs send_to_ppe.
+       * libc/machine/spu/fclose.c: Ditto.
+       * libc/machine/spu/feof.c: Ditto.
+       * libc/machine/spu/ferror.c: Ditto.
+       * libc/machine/spu/fflush.c: Ditto.
+       * libc/machine/spu/fgetc.c: Ditto.
+       * libc/machine/spu/fgetpos.c: Ditto.
+       * libc/machine/spu/fgets.c: Ditto.
+       * libc/machine/spu/fileno.c: Ditto.
+       * libc/machine/spu/fopen.c: Ditto.
+       * libc/machine/spu/fprintf.c: Ditto.
+       * libc/machine/spu/fputc.c: Ditto.
+       * libc/machine/spu/fputs.c: Ditto.
+       * libc/machine/spu/fread.c: Ditto.
+       * libc/machine/spu/freopen.c: Ditto.
+       * libc/machine/spu/fscanf.c: Ditto.
+       * libc/machine/spu/fseek.c: Ditto.
+       * libc/machine/spu/fsetpos.c: Ditto.
+       * libc/machine/spu/ftell.c: Ditto.
+       * libc/machine/spu/fwrite.c: Ditto.
+       * libc/machine/spu/getc.c: Ditto.
+       * libc/machine/spu/getchar.c: Ditto.
+       * libc/machine/spu/gets.c: Ditto.
+       * libc/machine/spu/perror.c: Ditto.
+       * libc/machine/spu/printf.c: Ditto.
+       * libc/machine/spu/putc.c: Ditto.
+       * libc/machine/spu/putchar.c: Ditto.
+       * libc/machine/spu/puts.c: Ditto.
+       * libc/machine/spu/remove.c: Ditto.
+       * libc/machine/spu/rename.c: Ditto.
+       * libc/machine/spu/rewind.c: Ditto.
+       * libc/machine/spu/scanf.c: Ditto.
+       * libc/machine/spu/setbuf.c: Ditto.
+       * libc/machine/spu/setvbuf.c: Ditto.
+       * libc/machine/spu/snprintf.c: Ditto.
+       * libc/machine/spu/sprintf.c: Ditto.
+       * libc/machine/spu/sscanf.c: Ditto.
+       * libc/machine/spu/tmpfile.c: Ditto.
+       * libc/machine/spu/tmpnam.c: Ditto.
+       * libc/machine/spu/ungetc.c: Ditto.
+       * libc/machine/spu/vfprintf.c: Ditto.
+       * libc/machine/spu/vfscanf.c: Ditto.
+       * libc/machine/spu/vprintf.c: Ditto.
+       * libc/machine/spu/vscanf.c: Ditto.
+       * libc/machine/spu/vsnprintf.c: Ditto.
+       * libc/machine/spu/vsprintf.c: Ditto.
+       * libc/machine/spu/vsscanf.c: Ditto.
+
 2007-04-04  Jeff Johnston  <jjohnstn@redhat.com>
 
        * libc/argz/argz_insert.c: Add stddef.h to get ptrdiff_t type.
index 6d2dab6..da5d03c 100644 (file)
@@ -31,6 +31,7 @@ Author: Joel Schopp <jschopp@austin.ibm.com>
 */
 
 #include <errno.h>
+#include <sys/syscall.h>
 
 #define SPE_C99_SIGNALCODE 0x2100
 
@@ -93,27 +94,6 @@ struct spe_reg128{
   unsigned int slot[4];
 };
 
-static void
-send_to_ppe(int signalcode, int opcode, void *data)
-{
-
-       unsigned int    combined = ( ( opcode<<24 )&0xff000000 ) | ( ( unsigned int )data & 0x00ffffff );
-       struct spe_reg128* ret = data;
-
-        __vector unsigned int stopfunc = {
-                signalcode,     /* stop 0x210x*/
-                (unsigned int) combined,
-                0x4020007f,     /* nop */
-                0x35000000      /* bi $0 */
-        };
-
-        void (*f) (void) = (void *) &stopfunc;
-        asm ("sync":::"memory");
-        f();
-       errno = ret->slot[3];
-       return;
-}
-
 void _EXFUN(__sinit,(struct _reent *));
 FILE  *_EXFUN(__sfp,(struct _reent *));
 #define __sfp_free(fp) ( (fp)->_fp = 0 )
index 57b9952..b4034f8 100644 (file)
@@ -47,7 +47,7 @@ _DEFUN (clearerr, (fp),
 
   ret = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_CLEARERR, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_CLEARERR, &ret);
 
   return;
 }
index cc61f62..bbf4c60 100644 (file)
@@ -46,7 +46,7 @@ _DEFUN (fclose, (fp),
 
   ret = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FCLOSE, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FCLOSE, &ret);
 
   __sfp_free(fp);
 
index fe77224..521dbe1 100644 (file)
@@ -46,7 +46,7 @@ _DEFUN (feof, (fp),
 
   result = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FEOF, &result);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FEOF, &result);
 
 
   return result;
index 5416f5c..b1a48f4 100644 (file)
@@ -46,7 +46,7 @@ _DEFUN (ferror, (fp),
 
   result = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FERROR, &result);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FERROR, &result);
 
 
   return result;
index f14f59d..ea81e06 100644 (file)
@@ -45,7 +45,7 @@ _DEFUN (fflush, (fp),
 
   result = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FFLUSH, &result);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FFLUSH, &result);
 
 
   return result;
index 73b4aa2..103b4ff 100644 (file)
@@ -46,7 +46,7 @@ _DEFUN (fgetc, (fp),
 
   result = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETC, &result);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETC, &result);
 
   return result;
 }
index 1768f07..09c435a 100644 (file)
@@ -58,7 +58,7 @@ _DEFUN (fgetpos, (fp, pos),
   arg.fp = fp->_fp;
   arg.pos = pos;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETPOS, &arg);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETPOS, &arg);
 
 
   return *result;
index 01e32a5..da6fbaf 100644 (file)
@@ -61,7 +61,7 @@ _DEFUN (fgets, (buf, n, fp),
   args.fp = fp->_fp;
   ret = (char**) &args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETS, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETS, &args);
 
   return *ret;
 }
index 9d850fe..36809e4 100644 (file)
@@ -47,7 +47,7 @@ _DEFUN (fileno, (fp),
 
   ret = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FILENO, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FILENO, &ret);
 
   return ret;
 }
index 33cdbca..1a471ca 100644 (file)
@@ -65,7 +65,7 @@ _DEFUN (fopen, (file, mode),
   args.mode = mode;
   ret = (int *) &args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FOPEN, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FOPEN, &args);
 
   if (*ret) {
     fp->_fp = *ret;
index 39e012a..0fe3083 100644 (file)
@@ -75,7 +75,7 @@ fprintf(FILE * fp, _CONST char *fmt,...)
   va_start (args.ap);
 #endif
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
 
   va_end (args.ap);
   return *ret;
index 71126c6..9d890d0 100644 (file)
@@ -59,7 +59,7 @@ fputc (c, fp)
   args.fp = fp->_fp;
   ret = (int*)&args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTC, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTC, &args);
 
   return *ret;
 }
index 7fea082..d85e828 100644 (file)
@@ -59,7 +59,7 @@ _DEFUN (fputs, (s, fp),
   args.fp = fp->_fp;
   ret = (int*)&args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTS, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTS, &args);
 
   return *ret;
 }
index 6ff9bd6..840449d 100644 (file)
@@ -66,7 +66,7 @@ _DEFUN (fread, (buf, size, count, fp),
   args.fp = fp->_fp;
   ret = (size_t*) &args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREAD, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREAD, &args);
 
   return *ret;
 }
index 57fbbbd..12839e8 100644 (file)
@@ -62,7 +62,7 @@ _DEFUN (freopen, (file, mode, fp),
   args.fp = fp->_fp;
   ret = (int *) &args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREOPEN, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREOPEN, &args);
 
   if (*ret) {
     fp->_fp = *ret;
index 52b8a44..b97f413 100644 (file)
@@ -74,7 +74,7 @@ fscanf(FILE *fp, _CONST char *fmt, ...)
 #endif
 
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
 
   va_end (args.ap);
   return *ret;
index 14b175c..50d2116 100644 (file)
@@ -62,7 +62,7 @@ _DEFUN (fseek, (fp, offset, whence),
   args.whence = whence;
   ret = (int*)&args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSEEK, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSEEK, &args);
 
   return *ret;
 }
index 6627c33..6bd4236 100644 (file)
@@ -58,7 +58,7 @@ _DEFUN (fsetpos, (iop, pos),
   args.pos = pos;
   ret = (int*)&args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSETPOS, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSETPOS, &args);
 
   return *ret;
 }
index b633aec..66df462 100644 (file)
@@ -47,7 +47,7 @@ _DEFUN (ftell, (fp),
 
   ret = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FTELL, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FTELL, &ret);
 
   return ret;
 }
index 9c18d07..5cb45e0 100644 (file)
@@ -66,7 +66,7 @@ _DEFUN (fwrite, (buf, size, count, fp),
   args.fp = fp->_fp;
   ret = (size_t*) &args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FWRITE, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FWRITE, &args);
 
   return *ret;
 }
index df66709..6787990 100644 (file)
@@ -49,7 +49,7 @@ getc (fp)
 
   ret = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETC, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETC, &ret);
 
   return ret;
 }
index 4667792..eb105e5 100644 (file)
@@ -45,7 +45,7 @@ getchar ()
 
   CHECK_STD_INIT(_REENT);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETCHAR, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETCHAR, &ret);
 
   return ret;
 }
index 4917d72..a46ab6a 100644 (file)
@@ -44,7 +44,7 @@ gets (buf)
 
   /* The return value gets written over buf
    */
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETS, &buf);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETS, &buf);
 
   return buf;
 }
index 28598c8..63e7fe8 100644 (file)
@@ -11,7 +11,7 @@ _DEFUN (perror, (s),
 {
   CHECK_STD_INIT(_REENT);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PERROR, &s);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PERROR, &s);
 
   return;
 }
index 898e8e8..c5a2924 100644 (file)
@@ -49,7 +49,7 @@ printf (fmt, va_alist)
   va_start (args.ap);
 #endif
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
 
   va_end (args.ap);
   return *ret;
index 3dbf873..239bf2f 100644 (file)
@@ -59,7 +59,7 @@ putc (c, fp)
   args.fp = fp->_fp;
   ret = (int*)&args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTC, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTC, &args);
 
   return *ret;
 }
index 9751879..5cf9ed4 100644 (file)
@@ -14,7 +14,7 @@ putchar (c)
 
   /* c gets overwritten before return */
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTCHAR, &c);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTCHAR, &c);
 
   return c;
 }
index e8e2f8b..b5ed3d2 100644 (file)
@@ -12,7 +12,7 @@ _DEFUN (puts, (s),
 
   /* The return value gets written over s
    */
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTS, &s);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTS, &s);
 
   return (int)s;
 }
index b7027ca..56b0886 100644 (file)
@@ -41,7 +41,7 @@ remove (filename)
 
   /* The return value gets written over buf
    */
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REMOVE, &filename);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REMOVE, &filename);
 
   return (int)filename;
 }
index 7b9806c..0117c56 100644 (file)
@@ -54,7 +54,7 @@ rename (old, new)
   args.new = new;
   ret = (int*) &args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_RENAME, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_RENAME, &args);
 
   return *ret;
 }
index cdeb41e..8d1a0a9 100644 (file)
@@ -46,7 +46,7 @@ _DEFUN (rewind, (fp),
 
   ret = fp->_fp;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REWIND, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REWIND, &ret);
 
   return;
 }
index a5f2298..76c47ff 100644 (file)
@@ -71,7 +71,7 @@ scanf(_CONST char *fmt, ...)
 #endif
 
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
 
   va_end (args.ap);
   return *ret;
index d2ffebe..5555681 100644 (file)
@@ -57,7 +57,7 @@ _DEFUN (setbuf, (fp, buf),
   args.fp = fp->_fp;
   args.buf = buf;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETBUF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETBUF, &args);
 
   return;
 }
index 7c6bf54..b41b4b7 100644 (file)
@@ -67,7 +67,7 @@ _DEFUN (setvbuf, (fp, buf, mode, size),
   args.size = size;
   ret = (int*)&args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETVBUF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETVBUF, &args);
 
   return *ret;
 }
index 874d734..d48dc60 100644 (file)
@@ -79,7 +79,7 @@ _DEFUN(snprintf, (str, size, fmt),
   va_start (args.ap);
 #endif
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
 
   va_end (args.ap);
   return *ret;
index f304f05..37a319e 100644 (file)
@@ -75,7 +75,7 @@ _DEFUN(sprintf, (str, fmt),
   va_start (args.ap);
 #endif
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
 
   va_end (args.ap);
   return *ret;
index 60424d9..3697c17 100644 (file)
@@ -76,7 +76,7 @@ _DEFUN(sscanf, (str, fmt),
   va_start (args.ap);
 #endif
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
 
   va_end (args.ap);
   return *ret;
diff --git a/newlib/libc/machine/spu/sys/syscall.h b/newlib/libc/machine/spu/sys/syscall.h
new file mode 100644 (file)
index 0000000..ca44b7d
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef _SYS_SYSCALL_H
+#define _SYS_SYSCALL_H
+void __send_to_ppe(unsigned int signalcode, unsigned int opcode, void *data);
+#endif
index 0d8d406..662b8f6 100644 (file)
@@ -50,7 +50,7 @@ _DEFUN_VOID (tmpfile)
     return NULL;
   }
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPFILE, &ret);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPFILE, &ret);
 
   if (ret) {
     fp->_fp = ret;
index cd2856b..d0fe39b 100644 (file)
@@ -41,7 +41,7 @@ _DEFUN (tmpnam, (s),
   char **ret = &s;
   /* The return value gets written over buf
    */
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPNAM, &s);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPNAM, &s);
 
   return *ret;
 }
index 1383d01..29736b3 100644 (file)
@@ -59,7 +59,7 @@ ungetc (c, fp)
   args.fp = fp->_fp;
   ret = (int*)&args;
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_UNGETC, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_UNGETC, &args);
 
   return *ret;
 }
index 34128b7..a9f8bfc 100644 (file)
@@ -73,7 +73,7 @@ _DEFUN (vfprintf, (fp, fmt0, ap),
   args.fmt = (char*) fmt0;
   va_copy(args.ap,ap);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
 
   return *ret;
 }
index ccd6d0b..6849cf5 100644 (file)
@@ -73,7 +73,7 @@ _DEFUN (vfscanf, (fp, fmt, ap),
   args.fmt = (char*) fmt;
   va_copy(args.ap,ap);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
 
   return *ret;
 }
index 4341774..eca0158 100644 (file)
@@ -37,7 +37,7 @@ _DEFUN (vprintf, (fmt, ap),
   args.fmt = fmt;
   va_copy(args.ap,ap);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
 
   return *ret;
 }
index 90c879d..8571e5c 100644 (file)
@@ -69,7 +69,7 @@ _DEFUN (vscanf, (fmt, ap),
   args.fmt = (char*) fmt;
   va_copy(args.ap,ap);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
 
   return *ret;
 }
index dafb513..09d4292 100644 (file)
@@ -45,7 +45,7 @@ _DEFUN (vsnprintf, (str, size, fmt, ap),
   args.fmt = fmt;
   va_copy(args.ap,ap);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
 
   return *ret;
 }
index d255654..b36a1a0 100644 (file)
@@ -42,7 +42,7 @@ _DEFUN (vsprintf, (str, fmt, ap),
   args.fmt = (char*) fmt;
   va_copy(args.ap,ap);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
 
   return *ret;
 }
index 1add6ef..cd8e1eb 100644 (file)
@@ -73,7 +73,7 @@ _DEFUN (vsscanf, (str, fmt, ap),
   args.fmt = (char*) fmt;
   va_copy(args.ap,ap);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
+  __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
 
   return *ret;
 }