aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/i386.c59
2 files changed, 26 insertions, 43 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 26f93fb..a1fd494 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,12 @@
-2015-01-12 Jeff Law <law@redhat.com>
+2015-07-23 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_build_builtin_va_list_64): Rename
+ from ix86_build_builtin_va_list_abi. Handle only 64bit non-MS_ABI
+ targets here.
+ (ix86_build_builtin_va_list): Rewrite sysv_va_list_type_node and
+ ms_va_list_type_node initialization.
+
+2015-07-23 Jeff Law <law@redhat.com>
PR lto/66752
* tree-ssa-threadedge.c (simplify_conrol_stmt_condition): If we are
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c9dbe47..d6b4508 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -8744,18 +8744,11 @@ ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
/* Create the va_list data type. */
-/* Returns the calling convention specific va_list date type.
- The argument ABI can be DEFAULT_ABI, MS_ABI, or SYSV_ABI. */
-
static tree
-ix86_build_builtin_va_list_abi (enum calling_abi abi)
+ix86_build_builtin_va_list_64 (void)
{
tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl;
- /* For i386 we use plain pointer to argument area. */
- if (!TARGET_64BIT || abi == MS_ABI)
- return build_pointer_type (char_type_node);
-
record = lang_hooks.types.make_type (RECORD_TYPE);
type_decl = build_decl (BUILTINS_LOCATION,
TYPE_DECL, get_identifier ("__va_list_tag"), record);
@@ -8800,43 +8793,25 @@ ix86_build_builtin_va_list_abi (enum calling_abi abi)
static tree
ix86_build_builtin_va_list (void)
{
- tree ret = ix86_build_builtin_va_list_abi (ix86_abi);
-
- /* Initialize abi specific va_list builtin types. */
if (TARGET_64BIT)
{
- tree t;
- if (ix86_abi == MS_ABI)
- {
- t = ix86_build_builtin_va_list_abi (SYSV_ABI);
- if (TREE_CODE (t) != RECORD_TYPE)
- t = build_variant_type_copy (t);
- sysv_va_list_type_node = t;
- }
- else
- {
- t = ret;
- if (TREE_CODE (t) != RECORD_TYPE)
- t = build_variant_type_copy (t);
- sysv_va_list_type_node = t;
- }
- if (ix86_abi != MS_ABI)
- {
- t = ix86_build_builtin_va_list_abi (MS_ABI);
- if (TREE_CODE (t) != RECORD_TYPE)
- t = build_variant_type_copy (t);
- ms_va_list_type_node = t;
- }
- else
- {
- t = ret;
- if (TREE_CODE (t) != RECORD_TYPE)
- t = build_variant_type_copy (t);
- ms_va_list_type_node = t;
- }
- }
+ /* Initialize ABI specific va_list builtin types. */
+ tree sysv_va_list, ms_va_list;
- return ret;
+ sysv_va_list = ix86_build_builtin_va_list_64 ();
+ sysv_va_list_type_node = build_variant_type_copy (sysv_va_list);
+
+ /* For MS_ABI we use plain pointer to argument area. */
+ ms_va_list = build_pointer_type (char_type_node);
+ ms_va_list_type_node = build_variant_type_copy (ms_va_list);
+
+ return (ix86_abi == MS_ABI) ? ms_va_list : sysv_va_list;
+ }
+ else
+ {
+ /* For i386 we use plain pointer to argument area. */
+ return build_pointer_type (char_type_node);
+ }
}
/* Worker function for TARGET_SETUP_INCOMING_VARARGS. */