changeset 9179:5be2e6696772

use access_double and assign_double on sparc only
author Carsten Clark <tantumquantum+gnuoctave@gmail.com>
date Tue, 05 May 2009 11:27:06 -0400
parents a6375c37dad4
children 2669527e0ce5
files liboctave/ChangeLog liboctave/Quad.cc liboctave/sun-utils.h
diffstat 3 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Tue May 05 15:37:13 2009 +0200
+++ b/liboctave/ChangeLog	Tue May 05 11:27:06 2009 -0400
@@ -1,3 +1,9 @@
+2009-05-05  Carsten Clark  <tantumquantum+gnuoctave@gmail.com>
+
+	* 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  <highegg@gmail.com>
 
 	* Sparse.cc (assign1): Fix an old indexing bug.
--- a/liboctave/Quad.cc	Tue May 05 15:37:13 2009 +0200
+++ b/liboctave/Quad.cc	Tue May 05 11:27:06 2009 -0400
@@ -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;
--- a/liboctave/sun-utils.h	Tue May 05 15:37:13 2009 +0200
+++ b/liboctave/sun-utils.h	Tue May 05 11:27:06 2009 -0400
@@ -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)