Print this page

        

@@ -26,10 +26,11 @@
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #include <sys/isa_defs.h>
+#include <sys/ccompile.h>
 
 #ifdef _LITTLE_ENDIAN
 #define HI(x)   *(1+(int*)x)
 #define LO(x)   *(unsigned*)x
 #else

@@ -96,14 +97,13 @@
 __vcos( int n, double * restrict x, int stridex, double * restrict y,
         int stridey )
 {
         double          x0_or_one[4], x1_or_one[4], x2_or_one[4];
         double          y0_or_zero[4], y1_or_zero[4], y2_or_zero[4];
-        double          x0, x1, x2, *py0, *py1, *py2, *xsave, *ysave;
-        unsigned        hx0, hx1, hx2, xsb0, xsb1, xsb2;
+        double          x0, x1, x2, *py0 = 0, *py1 = 0, *py2, *xsave, *ysave;
+        unsigned        hx0, hx1, hx2, xsb0, xsb1 = 0, xsb2;
         int                     i, biguns, nsave, sxsave, sysave;
-
         nsave = n;
         xsave = x;
         sxsave = stridex;
         ysave = y;
         sysave = stridey;

@@ -120,11 +120,10 @@
                         biguns = 1;
                         goto MEDIUM;
                 }
                 if ( hx0 < 0x3e400000 ) {
                         /* Too small.  cos x ~ 1. */
-                        volatile int v = *x;
                         *y = 1.0;
                         x += stridex;
                         y += stridey;
                         i = 0;
                         if ( --n <= 0 )

@@ -147,11 +146,10 @@
                         biguns = 2;
                         goto MEDIUM;
                 }
                 if ( hx1 < 0x3e400000 )
                 {
-                        volatile int v = *x;
                         *y = 1.0;
                         x += stridex;
                         y += stridey;
                         i = 1;
                         if ( --n <= 0 )

@@ -174,11 +172,10 @@
                         biguns = 3;
                         goto MEDIUM;
                 }
                 if ( hx2 < 0x3e400000 )
                 {
-                        volatile int v = *x;
                         *y = 1.0;
                         x += stridex;
                         y += stridey;
                         i = 2;
                         if ( --n <= 0 )