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
@@ -76,14 +77,13 @@
__vsin( 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;
@@ -99,11 +99,10 @@
biguns = 1;
goto MEDIUM;
}
if ( hx0 < 0x3e400000 )
{
- volatile int v = *x;
*y = *x;
x += stridex;
y += stridey;
i = 0;
if ( --n <= 0 )
@@ -126,11 +125,10 @@
biguns = 2;
goto MEDIUM;
}
if ( hx1 < 0x3e400000 )
{
- volatile int v = *x;
*y = *x;
x += stridex;
y += stridey;
i = 1;
if ( --n <= 0 )
@@ -153,11 +151,10 @@
biguns = 3;
goto MEDIUM;
}
if ( hx2 < 0x3e400000 )
{
- volatile int v = *x;
*y = *x;
x += stridex;
y += stridey;
i = 2;
if ( --n <= 0 )
@@ -516,11 +513,10 @@
hx = HI(x);
xsb0 = hx >> 31;
hx &= ~0x80000000;
if ( hx < 0x3e400000 )
{
- volatile int v = *x;
*y = *x;
x += stridex;
y += stridey;
i = 0;
if ( --n <= 0 )
@@ -555,11 +551,10 @@
hx = HI(x);
xsb1 = hx >> 31;
hx &= ~0x80000000;
if ( hx < 0x3e400000 )
{
- volatile int v = *x;
*y = *x;
x += stridex;
y += stridey;
i = 1;
if ( --n <= 0 )
@@ -594,11 +589,10 @@
hx = HI(x);
xsb2 = hx >> 31;
hx &= ~0x80000000;
if ( hx < 0x3e400000 )
{
- volatile int v = *x;
*y = *x;
x += stridex;
y += stridey;
i = 2;
if ( --n <= 0 )