aboutsummaryrefslogtreecommitdiff
path: root/gcc/genoutput.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2011-04-12 12:51:28 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-04-12 12:51:28 +0000
commitcff1b7e0d21a81fb8b39811f13d7a940d89bdf5a (patch)
treeef1f2b179e33edaca097310347743941ae39a687 /gcc/genoutput.c
parent77059241d8049bd7626ce216caf0313a2fa964c2 (diff)
downloadgcc-cff1b7e0d21a81fb8b39811f13d7a940d89bdf5a.zip
gcc-cff1b7e0d21a81fb8b39811f13d7a940d89bdf5a.tar.gz
gcc-cff1b7e0d21a81fb8b39811f13d7a940d89bdf5a.tar.bz2
recog.h (insn_operand_data): Add an "allows_mem" field.
gcc/ * recog.h (insn_operand_data): Add an "allows_mem" field. * genoutput.c (output_operand_data): Initialize it. * optabs.c (maybe_legitimize_operand_same_code): New function. (maybe_legitimize_operand): Use it when matching the original op->value. From-SVN: r172316
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r--gcc/genoutput.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index 3e89cfd..621439f 100644
--- a/gcc/genoutput.c
+++ b/gcc/genoutput.c
@@ -66,6 +66,8 @@ along with GCC; see the file COPYING3. If not see
MATCH_OPERAND; it is zero for operands that should not be changed during
register elimination such as MATCH_OPERATORs.
+ g. `allows_mem', is true for operands that accept MEM rtxes.
+
The code number of an insn is simply its position in the machine
description; code numbers are assigned sequentially to entries in
the description, starting with code number 0.
@@ -256,6 +258,8 @@ output_operand_data (void)
for (d = odata; d; d = d->next)
{
+ struct pred_data *pred;
+
printf (" {\n");
printf (" %s,\n",
@@ -269,7 +273,12 @@ output_operand_data (void)
printf (" %d,\n", d->constraint == NULL ? 1 : 0);
- printf (" %d\n", d->eliminable);
+ printf (" %d,\n", d->eliminable);
+
+ pred = NULL;
+ if (d->predicate)
+ pred = lookup_predicate (d->predicate);
+ printf (" %d\n", pred && pred->codes[MEM]);
printf(" },\n");
}