summaryrefslogtreecommitdiff
path: root/gcc/genflags.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-08-24 17:59:51 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-08-24 17:59:51 +0000
commit58d745ec901a3707c1e6487ce8c0eca387ec5f42 (patch)
treec3042a200d6b63e1964f926ac1b634a9c69f950d /gcc/genflags.c
parent651159e5d652ae1dcc48f8107fa5e5b272767d5b (diff)
genflags.c (gen_macro): Delete.
gcc/ * genflags.c (gen_macro): Delete. (gen_proto): Don't create GEN.*CALL.* macros. * gensupport.h (get_file_location): Declare. * gensupport.c (rtx_locs): New variable. (read_md_rtx): Record rtx locations. (get_file_location): New function. * target-insns.def (call, call_pop, call_value, call_value_pop) (sibcall, sibcall_value): New patterns. * gentarget-def.c (parse_argument): New function. (def_target_insn): Use it. Handle optional operands. Raise an error if an .md pattern has the wrong number of operands for the pattern name. Remove the names of unused operands from the prototype. * builtins.c (expand_builtin_apply): Use targetm functions instead of HAVE_call_value and GEN_CALL_VALUE. * calls.c (emit_call_1): Likewise. Remove support for sibcall_pop and sibcall_value_pop. * config/aarch64/aarch64.md (untyped_call): Use gen_call instead of GEN_CALL. * config/alpha/alpha.md (untyped_call): Likewise. * config/iq2000/iq2000.md (untyped_call): Likewise. * config/m68k/m68k.md (untyped_call): Likewise. * config/mips/mips.md (untyped_call): Likewise. * config/pa/pa.md (untyped_call): Likewise. * config/rs6000/rs6000.md (untyped_call): Likewise. * config/sparc/sparc.md (untyped_call): Likewise. * config/tilegx/tilegx.md (untyped_call): Likewise. * config/tilepro/tilepro.md (untyped_call): Likewise. * config/visium/visium.md (untyped_call): Likewise. * config/alpha/alpha.c (alpha_emit_xfloating_libcall): Use gen_call_value instead of GEN_CALL_VALUE. * config/arm/arm.md (untyped_call): Likewise. * config/cr16/cr16.c (cr16_function_arg): Remove reference to GEN_CALL. From-SVN: r227143
Diffstat (limited to 'gcc/genflags.c')
-rw-r--r--gcc/genflags.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/gcc/genflags.c b/gcc/genflags.c
index e67a48ba83f..0dedc8dc2aa 100644
--- a/gcc/genflags.c
+++ b/gcc/genflags.c
@@ -42,7 +42,6 @@ static int max_opno;
static void max_operand_1 (rtx);
static int num_operands (rtx);
static void gen_proto (rtx);
-static void gen_macro (const char *, int, int);
/* Count the number of match_operand's found. */
@@ -92,32 +91,6 @@ num_operands (rtx insn)
return max_opno + 1;
}
-/* Print out a wrapper macro for a function which corrects the number
- of arguments it takes. Any missing arguments are assumed to be at
- the end. */
-static void
-gen_macro (const char *name, int real, int expect)
-{
- int i;
-
- gcc_assert (real <= expect);
- gcc_assert (real);
-
- /* #define GEN_CALL(A, B, C, D) gen_call((A), (B)) */
- fputs ("#define GEN_", stdout);
- for (i = 0; name[i]; i++)
- putchar (TOUPPER (name[i]));
-
- putchar ('(');
- for (i = 0; i < expect - 1; i++)
- printf ("%c, ", i + 'A');
- printf ("%c) gen_%s (", i + 'A', name);
-
- for (i = 0; i < real - 1; i++)
- printf ("(%c), ", i + 'A');
- printf ("(%c))\n", i + 'A');
-}
-
/* Print out prototype information for a generator function. If the
insn pattern has been elided, print out a dummy generator that
does nothing. */
@@ -130,25 +103,6 @@ gen_proto (rtx insn)
const char *name = XSTR (insn, 0);
int truth = maybe_eval_c_test (XSTR (insn, 2));
- /* Many md files don't refer to the last two operands passed to the
- call patterns. This means their generator functions will be two
- arguments too short. Instead of changing every md file to touch
- those operands, we wrap the prototypes in macros that take the
- correct number of arguments. */
- if (name[0] == 'c' || name[0] == 's')
- {
- if (!strcmp (name, "call")
- || !strcmp (name, "call_pop")
- || !strcmp (name, "sibcall")
- || !strcmp (name, "sibcall_pop"))
- gen_macro (name, num, 4);
- else if (!strcmp (name, "call_value")
- || !strcmp (name, "call_value_pop")
- || !strcmp (name, "sibcall_value")
- || !strcmp (name, "sibcall_value_pop"))
- gen_macro (name, num, 5);
- }
-
if (truth != 0)
printf ("extern rtx gen_%-*s (", max_id_len, name);
else