Added aop_t_float96(), which is (long double) on 32-bit systems.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 27 Oct 2010 00:13:15 +0000 (20:13 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 27 Oct 2010 00:13:15 +0000 (20:13 -0400)
src/aop-type.c
src/aop.h

index 3444f9ceb2c1ab0a3f6c2fd2a6f5bdda4fb513e3..9a2a1f9e603e50848769bfc349340ccb066119eb 100644 (file)
@@ -173,6 +173,14 @@ static struct aop_type _aop_t_float64 = {
   .size = 8,
 };
 
+static struct aop_type _aop_t_float96 = {
+  .kind = ATK_FP,
+  .pointer_levels = 0,
+  .tag = NULL,
+
+  .size = 12,
+};
+
 static struct aop_type _aop_t_float128 = {
   .kind = ATK_FP,
   .pointer_levels = 0,
@@ -515,9 +523,21 @@ aop_t_float64 ()
   return &_aop_t_float64;
 }
 
+/**
+ * Return a type that will match 96-bit floating point types (long double
+ * in C on a 32-bit system).
+ * \return A type that will match quadruple-precision floating point
+ * types.
+ */
+const struct aop_type *
+aop_t_float96 ()
+{
+  return &_aop_t_float96;
+}
+
 /**
  * Return a type that will match quadruple-precision floating point
- * types (long double in C).
+ * types (long double in C on a 64-bit system).
  * \return A type that will match quadruple-precision floating point
  * types.
  */
@@ -881,6 +901,9 @@ format_c_type (const struct aop_type *type, int n, char *output)
        case 8:
          BUF_PRINTF ("%s", "double");
          break;
+       case 12:  /* As seen on 32-bit systems. */
+         BUF_PRINTF ("%s", "long double");
+         break;
        case 16:
          BUF_PRINTF ("%s", "long double");
          break;
index be8b4f81053f8282f7c41f5225b492ab3ccbaa22..a4fae70356eb1d95582f88401337b463a711ebc1 100644 (file)
--- a/src/aop.h
+++ b/src/aop.h
@@ -199,6 +199,7 @@ extern const struct aop_type *aop_t_unsigned64 ();
 extern const struct aop_type *aop_t_unsigned128 ();
 extern const struct aop_type *aop_t_float32 ();
 extern const struct aop_type *aop_t_float64 ();
+extern const struct aop_type *aop_t_float96 ();
 extern const struct aop_type *aop_t_float128 ();
 extern const struct aop_type *aop_t_cstring ();
 extern const struct aop_type *aop_t_struct (const char *tag);