+2008-07-07 Kai Tietz <kai.tietz@onevision.com>
+
+ * config/i386/i386.c (is_va_list_char_pointer): New.
+ (ix86_va_start): Replace compare with ms_va_list_type_node
+ by is_va_list_char_pointer.
+ (ix86_gimplify_va_arg): Likewise.
+
2008-07-07 Martin Jambor <mjambor@suse.cz>
* cgraph.c (cgraph_edge_max_uid): New variable.
setup_incoming_varargs_64 (&next_cum);
}
+/* Checks if TYPE is of kind va_list char *. */
+
+static bool
+is_va_list_char_pointer (tree type)
+{
+ tree canonic;
+
+ /* For 32-bit it is always true. */
+ if (!TARGET_64BIT)
+ return true;
+ canonic = ix86_canonical_va_list_type (type);
+ return (canonic == ms_va_list_type_node
+ || (DEFAULT_ABI == MS_ABI && canonic == va_list_type_node));
+}
+
/* Implement va_start. */
static void
tree type;
/* Only 64bit target needs something special. */
- if (!TARGET_64BIT ||
- ix86_canonical_va_list_type (TREE_TYPE (valist)) == ms_va_list_type_node)
+ if (!TARGET_64BIT || is_va_list_char_pointer (TREE_TYPE (valist)))
{
std_expand_builtin_va_start (valist, nextarg);
return;
enum machine_mode nat_mode;
/* Only 64bit target needs something special. */
- if (!TARGET_64BIT ||
- ix86_canonical_va_list_type (TREE_TYPE (valist)) == ms_va_list_type_node)
+ if (!TARGET_64BIT || is_va_list_char_pointer (TREE_TYPE (valist)))
return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
f_gpr = TYPE_FIELDS (TREE_TYPE (sysv_va_list_type_node));