# HG changeset patch # User Carsten Clark # Date 1241537226 14400 # Node ID 5be2e6696772c2fd998d86cb675ab09ddfad22c3 # Parent a6375c37dad4ae4734f3f3fd8064e2d458b8f043 use access_double and assign_double on sparc only diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2009-05-05 Carsten Clark + + * Quad.cc (user_function): Use access_double and assign_double on + SPARC only, not on all Sun systems. + * sun-utils.h: Likewise, define these functions on SPARC only. + 2009-05-05 Jaroslav Hajek * Sparse.cc (assign1): Fix an old indexing bug. diff --git a/liboctave/Quad.cc b/liboctave/Quad.cc --- a/liboctave/Quad.cc +++ b/liboctave/Quad.cc @@ -77,7 +77,7 @@ { BEGIN_INTERRUPT_WITH_EXCEPTIONS; -#if defined (sun) && defined (__GNUC__) +#if defined (__sparc) && defined (__GNUC__) double xx = access_double (x); #else double xx = *x; @@ -87,7 +87,7 @@ double xresult = (*user_fcn) (xx); -#if defined (sun) && defined (__GNUC__) +#if defined (__sparc) && defined (__GNUC__) assign_double (result, xresult); #else *result = xresult; diff --git a/liboctave/sun-utils.h b/liboctave/sun-utils.h --- a/liboctave/sun-utils.h +++ b/liboctave/sun-utils.h @@ -24,12 +24,12 @@ #define octave_sun_utils_h 1 // This is only needed to dereference pointers to doubles if mixing -// GCC and Sun f77/cc compiled code. See the GCC manual (where the +// GCC and Sun SPARC f77/cc compiled code. See the GCC manual (where the // function access_double() is described) and the Sun f77 manual, // which explains that doubles are not always aligned on 8 byte // boundaries. -#if defined (sun) && defined (__GNUC__) +#if defined (__sparc) && defined (__GNUC__) inline double access_double (double *unaligned_ptr)