Modified floating point test case to deal with 12-bit (long double).
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 27 Oct 2010 00:19:17 +0000 (20:19 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 27 Oct 2010 00:19:17 +0000 (20:19 -0400)
test/plugin-float-types.c

index 643e27be72ce36f8129a0c4a29a25327a8b11846..e8e82b875834e80de7b52f73dc7eb3d4791a3a2b 100644 (file)
@@ -31,8 +31,13 @@ static unsigned int plugin_float()
   aop_filter_call_pc_by_param(pc, 0, aop_t_float64());
   aop_join_on(pc, plugin_join_on_call, "_advice_64");
 
+  /* (long double) is 96 bits on 32-bit machines but 128 bits on
+     64-bit machines. */
   pc = aop_match_function_call();
-  aop_filter_call_pc_by_param(pc, 0, aop_t_float128());
+  if (sizeof(long double) == 12)
+    aop_filter_call_pc_by_param(pc, 0, aop_t_float96());
+  else
+    aop_filter_call_pc_by_param(pc, 0, aop_t_float128());
   aop_join_on(pc, plugin_join_on_call, "_advice_128");
 
   return 0;