Correctly set types for constant values.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 20 Oct 2010 18:48:36 +0000 (14:48 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 20 Oct 2010 18:55:09 +0000 (14:55 -0400)
src/aop-header.c
src/aop-weave.c

index 27d82649ad77bbf4febacc6b0d67336e465fdd21..4b35df9a2f9bba0745dc1e83bdf89225f4c8f332 100644 (file)
@@ -171,11 +171,11 @@ get_param_types (va_list argp, int num_params,
          break;
        case ATA_INT_CST:
          va_arg (argp, int);
-         param_types[i] = aop_t_all_signed ();
+         param_types[i] = aop_t_signed32 ();
          break;
        case ATA_DOUBLE_CST:
          va_arg (argp, double);
-         param_types[i] = aop_t_all_fp ();
+         param_types[i] = aop_t_float64 ();
          break;
        case ATA_VOIDP_CST:
          va_arg (argp, void *);
index 6a423dbd92e9fdb08ed837a295e5c6e602913242..7d089883ddc09a680a846f7a9fb5ce6a43e7fabc 100644 (file)
@@ -279,6 +279,10 @@ build_gcc_call (const char *func_name, tree return_type,
          break;
        case ATA_INT_CST:
          int_cst = va_arg (argp, int);
+         /* TODO: This assumes that int is 32-bit on all systems.
+            There are some systems where this isn't true (16-bit
+            machines, perhaps?), but I'm not sure how to get an
+            explicit 32-bit integer type node. */
          new_arg = build_int_cst (integer_type_node, int_cst);
          VEC_safe_push (tree, heap, arg_list, new_arg);
          break;
@@ -286,7 +290,7 @@ build_gcc_call (const char *func_name, tree return_type,
          float_cst = va_arg (argp, double);
          snprintf (float_buf, sizeof (float_buf), "%A", float_cst);
          real_from_string (&r, (const char *)float_buf);
-         new_arg = build_real (float_type_node, r);
+         new_arg = build_real (double_type_node, r);
          VEC_safe_push (tree, heap, arg_list, new_arg);
          break;
        case ATA_VOIDP_CST: