PATCH, spu: remove some libgcc warnings

Ben Elliston bje@au1.ibm.com
Tue Dec 2 12:50:00 GMT 2008


I have committed these patches as obvious.  They eliminate this batch of
warnings when building libgcc on spu-elf:

libgcc/../gcc/config/spu/float_unssidf.c: In function ‘__float_unssidf’:
libgcc/../gcc/config/spu/float_unssidf.c:45: warning: cast discards qualifiers from pointer target type
libgcc/../gcc/config/spu/float_unsdidf.c: In function ‘__float_unsdidf’:
libgcc/../gcc/config/spu/float_unsdidf.c:49: warning: cast discards qualifiers from pointer target type
libgcc/../gcc/config/spu/float_unsdidf.c:52: warning: cast discards qualifiers from pointer target type
libgcc/../gcc/config/spu/float_unsdisf.c:24: warning: no previous prototype for ‘__floatundisf’
libgcc/../gcc/config/spu/float_disf.c:24: warning: no previous prototype for ‘__floatdisf’


2008-12-02  Ben Elliston  <bje@au.ibm.com>

        * config/spu/float_disf.c (__floatdisf): Prototype.
        * config/spu/float_unsdisf.c (__float_undisf): Likewise.
        * config/spu/float_unssidf.c (__float_unssidf): Constify cast.
        * config/spu/float_unsdidf.c (__float_unsdidf): Likewise.

Index: config/spu/float_disf.c
===================================================================
--- config/spu/float_disf.c     (revision 142343)
+++ config/spu/float_disf.c     (working copy)
@@ -21,6 +21,9 @@
    however invalidate any other reasons why the executable file might be covered
    by the GNU General Public License. */
 
+/* Prototype.  */
+float __floatdisf (long long x);
+
 float __floatdisf (long long x)
 {
   /* The SPU back-end now generates inline code for this conversion.
Index: config/spu/float_unsdisf.c
===================================================================
--- config/spu/float_unsdisf.c  (revision 142343)
+++ config/spu/float_unsdisf.c  (working copy)
@@ -21,6 +21,9 @@
    however invalidate any other reasons why the executable file might be covered
    by the GNU General Public License. */
 
+/* Prototype.  */
+float __floatundisf (unsigned long long x);
+
 float __floatundisf (unsigned long long x)
 {
   /* The SPU back-end now generates inline code for this conversion.
Index: config/spu/float_unsdidf.c
===================================================================
--- config/spu/float_unsdidf.c  (revision 142343)
+++ config/spu/float_unsdidf.c  (working copy)
@@ -46,10 +46,10 @@ __float_unsdidf (qword DI)
   t0 = si_clz (DI);
   t1 = si_shl (DI, t0);
   t2 = si_ceqi (t0, 32);
-  t3 = si_sf (t0, *(qword *) __didf_scale);
+  t3 = si_sf (t0, *(const qword *) __didf_scale);
   t4 = si_a (t1, t1);
   t5 = si_andc (t3, t2);
-  t6 = si_shufb (t5, t4, *(qword *) __didf_pat);
+  t6 = si_shufb (t5, t4, *(const qword *) __didf_pat);
   t7 = si_shlqbii (t6, 4);
   t8 = si_shlqbyi (t7, 8);
   return si_dfa (t7, t8);
Index: config/spu/float_unssidf.c
===================================================================
--- config/spu/float_unssidf.c  (revision 142343)
+++ config/spu/float_unssidf.c  (working copy)
@@ -42,6 +42,6 @@ __float_unssidf (qword SI)
   t4 = si_sf (t0, t1);
   t5 = si_a (t2, t2);
   t6 = si_andc (t4, t3);
-  t7 = si_shufb (t6, t5, *(qword *)__sidf_pat);
+  t7 = si_shufb (t6, t5, *(const qword *) __sidf_pat);
   return si_shlqbii (t7, 4);
 }




More information about the Gcc-patches mailing list