This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to config/rs6000/spe.h


This patch to config/rs6000/spe.h adds declarations of several
functions which the SPE PIM says are declared there but which are not
provided by GCC.  (They are provided, for example, by Aldy Hernandez's
spe add-on for glibc, which includes a patch to declare them in
<stdlib.h>; but <spe.h>, not <stdlib.h>, is the proper place.)

This is not something which would be tested in a bootstrap / testsuite
run, but I've sanity checked that #include <spe.h> compiles.  OK to
commit?

-- 
Joseph S. Myers
joseph@codesourcery.com

2004-10-08  Joseph S. Myers  <joseph@codesourcery.com>

	* config/rs6000/spe.h (atosfix16, atosfix32, atosfix64, atoufix16,
	atoufix32, atoufix64, strtosfix16, strtosfix32, strtosfix64,
	strtoufix16, strtoufix32, strtoufix64): Declare.

diff -rupN GCC.orig/gcc/config/rs6000/spe.h GCC/gcc/config/rs6000/spe.h
--- GCC.orig/gcc/config/rs6000/spe.h	2003-10-04 07:33:22.000000000 +0000
+++ GCC/gcc/config/rs6000/spe.h	2004-10-08 21:19:47.000000000 +0000
@@ -1088,4 +1088,23 @@ __ev_set_spefscr_frmc (int rnd)
   __builtin_spe_mtspefscr (i);
 }
 
+/* The SPE PIM says these are declared in <spe.h>, although they are
+   not provided by GCC: they must be taken from a separate
+   library.  */
+extern short int atosfix16 (const char *);
+extern int atosfix32 (const char *);
+extern long long atosfix64 (const char *);
+
+extern unsigned short atoufix16 (const char *);
+extern unsigned int atoufix32 (const char *);
+extern unsigned long long atoufix64 (const char *);
+
+extern short int strtosfix16 (const char *, char **);
+extern int strtosfix32 (const char *, char **);
+extern long long strtosfix64 (const char *, char **);
+
+extern unsigned short int strtoufix16 (const char *, char **);
+extern unsigned int strtoufix32 (const char *, char **);
+extern unsigned long long strtoufix64 (const char *, char **);
+
 #endif /* _SPE_H */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]