summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 14:31:20 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 14:31:20 +0000
commitf739ab33426870e999f7bee9aeb0c5c68daf49a0 (patch)
tree18ad8f874a533c1ea135ba85d29845cb55118573 /gcc
parent25f9f93d9623117368f63ab9001ef2703c454d85 (diff)
downloadgcc-f739ab33426870e999f7bee9aeb0c5c68daf49a0.tar.gz
* builtins.def (BUILT_IN_ARGS_INFO): Remove.
* ipa-pure-const.c (special_builtlin_state): Remove BUILT_IN_ARGS_INFO case. * tree-stdarg.c (execute_optimize_stdarg): Likewise. * builtins.c (expand_builtin): Likewise. (expand_builtin_args_info): Remove. * doc/tm.texi (__builtin_args_info): Remove. (__builtin_next_arg): Adjust to not refer to __builtin_args_info. * doc/tm.text.in: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162463 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/builtins.c36
-rw-r--r--gcc/builtins.def1
-rw-r--r--gcc/doc/tm.texi27
-rw-r--r--gcc/doc/tm.texi.in27
-rw-r--r--gcc/ipa-pure-const.c1
-rw-r--r--gcc/tree-stdarg.c1
7 files changed, 14 insertions, 91 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eacb59ca7bc..4873ccdbbd8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2010-07-23 Nathan Froyd <froydnj@codesourcery.com>
+
+ * builtins.def (BUILT_IN_ARGS_INFO): Remove.
+ * ipa-pure-const.c (special_builtlin_state): Remove
+ BUILT_IN_ARGS_INFO case.
+ * tree-stdarg.c (execute_optimize_stdarg): Likewise.
+ * builtins.c (expand_builtin): Likewise.
+ (expand_builtin_args_info): Remove.
+ * doc/tm.texi (__builtin_args_info): Remove.
+ (__builtin_next_arg): Adjust to not refer to __builtin_args_info.
+ * doc/tm.text.in: Likewise.
+
2010-07-23 Richard Guenther <rguenther@suse.de>
* lto-symtab.c (lto_symtab_merge): Use gtc_mode enum
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 40327e0e858..9b6fb1033b1 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -111,7 +111,6 @@ static rtx expand_builtin_sincos (tree);
static rtx expand_builtin_cexpi (tree, rtx, rtx);
static rtx expand_builtin_int_roundingfn (tree, rtx);
static rtx expand_builtin_int_roundingfn_2 (tree, rtx);
-static rtx expand_builtin_args_info (tree);
static rtx expand_builtin_next_arg (void);
static rtx expand_builtin_va_start (tree);
static rtx expand_builtin_va_end (tree);
@@ -4398,38 +4397,6 @@ expand_builtin_saveregs (void)
return val;
}
-/* __builtin_args_info (N) returns word N of the arg space info
- for the current function. The number and meanings of words
- is controlled by the definition of CUMULATIVE_ARGS. */
-
-static rtx
-expand_builtin_args_info (tree exp)
-{
- int nwords = sizeof (CUMULATIVE_ARGS) / sizeof (int);
- int *word_ptr = (int *) &crtl->args.info;
-
- gcc_assert (sizeof (CUMULATIVE_ARGS) % sizeof (int) == 0);
-
- if (call_expr_nargs (exp) != 0)
- {
- if (!host_integerp (CALL_EXPR_ARG (exp, 0), 0))
- error ("argument of %<__builtin_args_info%> must be constant");
- else
- {
- HOST_WIDE_INT wordnum = tree_low_cst (CALL_EXPR_ARG (exp, 0), 0);
-
- if (wordnum < 0 || wordnum >= nwords)
- error ("argument of %<__builtin_args_info%> out of range");
- else
- return GEN_INT (word_ptr[wordnum]);
- }
- }
- else
- error ("missing argument in %<__builtin_args_info%>");
-
- return const0_rtx;
-}
-
/* Expand a call to __builtin_next_arg. */
static rtx
@@ -5925,9 +5892,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
case BUILT_IN_SAVEREGS:
return expand_builtin_saveregs ();
- case BUILT_IN_ARGS_INFO:
- return expand_builtin_args_info (exp);
-
case BUILT_IN_VA_ARG_PACK:
/* All valid uses of __builtin_va_arg_pack () are removed during
inlining. */
diff --git a/gcc/builtins.def b/gcc/builtins.def
index 4e4eb3edc03..ab0d018cb28 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -606,7 +606,6 @@ DEF_GCC_BUILTIN (BUILT_IN_AGGREGATE_INCOMING_ADDRESS, "aggregate_incoming
DEF_EXT_LIB_BUILTIN (BUILT_IN_ALLOCA, "alloca", BT_FN_PTR_SIZE, ATTR_MALLOC_NOTHROW_LIST)
DEF_GCC_BUILTIN (BUILT_IN_APPLY, "apply", BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE, ATTR_NULL)
DEF_GCC_BUILTIN (BUILT_IN_APPLY_ARGS, "apply_args", BT_FN_PTR_VAR, ATTR_NULL)
-DEF_GCC_BUILTIN (BUILT_IN_ARGS_INFO, "args_info", BT_FN_INT_INT, ATTR_NULL)
DEF_GCC_BUILTIN (BUILT_IN_BSWAP32, "bswap32", BT_FN_UINT32_UINT32, ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN (BUILT_IN_BSWAP64, "bswap64", BT_FN_UINT64_UINT64, ATTR_CONST_NOTHROW_LIST)
DEF_EXT_LIB_BUILTIN (BUILT_IN_CLEAR_CACHE, "__clear_cache", BT_FN_VOID_PTR_PTR, ATTR_NOTHROW_LIST)
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 78f2f2f3ed4..30210ecc0ae 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5007,33 +5007,8 @@ to use them for its own purposes.
@c 10feb93
@end defmac
-@defmac __builtin_args_info (@var{category})
-Use this built-in function to find the first anonymous arguments in
-registers.
-
-In general, a machine may have several categories of registers used for
-arguments, each for a particular category of data types. (For example,
-on some machines, floating-point registers are used for floating-point
-arguments while other arguments are passed in the general registers.)
-To make non-varargs functions use the proper calling convention, you
-have defined the @code{CUMULATIVE_ARGS} data type to record how many
-registers in each category have been used so far
-
-@code{__builtin_args_info} accesses the same data structure of type
-@code{CUMULATIVE_ARGS} after the ordinary argument layout is finished
-with it, with @var{category} specifying which word to access. Thus, the
-value indicates the first unused register in a given category.
-
-Normally, you would use @code{__builtin_args_info} in the implementation
-of @code{va_start}, accessing each category just once and storing the
-value in the @code{va_list} object. This is because @code{va_list} will
-have to update the values, and there is no way to alter the
-values accessed by @code{__builtin_args_info}.
-@end defmac
-
@defmac __builtin_next_arg (@var{lastarg})
-This is the equivalent of @code{__builtin_args_info}, for stack
-arguments. It returns the address of the first anonymous stack
+This builtin returns the address of the first anonymous stack
argument, as type @code{void *}. If @code{ARGS_GROW_DOWNWARD}, it
returns the address of the location above the first anonymous stack
argument. Use it in @code{va_start} to initialize the pointer for
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 2f35a429c52..b5c75d3ec90 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -5007,33 +5007,8 @@ to use them for its own purposes.
@c 10feb93
@end defmac
-@defmac __builtin_args_info (@var{category})
-Use this built-in function to find the first anonymous arguments in
-registers.
-
-In general, a machine may have several categories of registers used for
-arguments, each for a particular category of data types. (For example,
-on some machines, floating-point registers are used for floating-point
-arguments while other arguments are passed in the general registers.)
-To make non-varargs functions use the proper calling convention, you
-have defined the @code{CUMULATIVE_ARGS} data type to record how many
-registers in each category have been used so far
-
-@code{__builtin_args_info} accesses the same data structure of type
-@code{CUMULATIVE_ARGS} after the ordinary argument layout is finished
-with it, with @var{category} specifying which word to access. Thus, the
-value indicates the first unused register in a given category.
-
-Normally, you would use @code{__builtin_args_info} in the implementation
-of @code{va_start}, accessing each category just once and storing the
-value in the @code{va_list} object. This is because @code{va_list} will
-have to update the values, and there is no way to alter the
-values accessed by @code{__builtin_args_info}.
-@end defmac
-
@defmac __builtin_next_arg (@var{lastarg})
-This is the equivalent of @code{__builtin_args_info}, for stack
-arguments. It returns the address of the first anonymous stack
+This builtin returns the address of the first anonymous stack
argument, as type @code{void *}. If @code{ARGS_GROW_DOWNWARD}, it
returns the address of the location above the first anonymous stack
argument. Use it in @code{va_start} to initialize the pointer for
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 4a29e100df2..1ff15bf22e6 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -446,7 +446,6 @@ special_builtlin_state (enum pure_const_state_e *state, bool *looping,
case BUILT_IN_FRAME_ADDRESS:
case BUILT_IN_APPLY:
case BUILT_IN_APPLY_ARGS:
- case BUILT_IN_ARGS_INFO:
*looping = false;
*state = IPA_CONST;
return true;
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index dae14f54a60..5c9b35cd44d 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -636,7 +636,6 @@ execute_optimize_stdarg (void)
break;
/* If old style builtins are used, don't optimize anything. */
case BUILT_IN_SAVEREGS:
- case BUILT_IN_ARGS_INFO:
case BUILT_IN_NEXT_ARG:
va_list_escapes = true;
continue;