summaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-06-10 20:24:45 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2010-06-10 20:24:45 +0000
commit0fe60a1bfab511269b85fcd36e87076708fd2a31 (patch)
tree9ddd3e71e5eb92c8ed67ae5ff399982b7ba29d71 /gcc/print-rtl.c
parent8f4fe86cd10bfe5e02237768c40b258b0e668abf (diff)
md.texi: Document the "unspec" and "unspecv" enum names.
gcc/ * doc/md.texi: Document the "unspec" and "unspecv" enum names. * Makefile.in (OBJS-common): Include insn-enums.o. (insn-enums.o): New rule. (simple_generated_c): Add insn-enums.c. (build/genenums.o): New rule. (genprogmd): Add "enums". * genconstants.c (print_enum_type): Declare a C string array for each enum. * genenums.c: New file. * print-rtl.c (print_rtx): If defined, use the "unspecv" enum for UNSPEC_VOLATILE. If defined, use the "unspec" enum for both UNSPEC and (as a fallback) for UNSPEC_VOLATILE. From-SVN: r160582
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r--gcc/print-rtl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 5cf0f9b6185..96e1485b6ae 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -411,6 +411,21 @@ print_rtx (const_rtx in_rtx)
if (NOTE_KIND (in_rtx) == NOTE_INSN_DELETED_LABEL)
fprintf (outfile, " %d", XINT (in_rtx, i));
}
+#if !defined(GENERATOR_FILE) && NUM_UNSPECV_VALUES > 0
+ else if (i == 1
+ && GET_CODE (in_rtx) == UNSPEC_VOLATILE
+ && XINT (in_rtx, 1) >= 0
+ && XINT (in_rtx, 1) < NUM_UNSPECV_VALUES)
+ fprintf (outfile, " %s", unspecv_strings[XINT (in_rtx, 1)]);
+#endif
+#if !defined(GENERATOR_FILE) && NUM_UNSPEC_VALUES > 0
+ else if (i == 1
+ && (GET_CODE (in_rtx) == UNSPEC
+ || GET_CODE (in_rtx) == UNSPEC_VOLATILE)
+ && XINT (in_rtx, 1) >= 0
+ && XINT (in_rtx, 1) < NUM_UNSPEC_VALUES)
+ fprintf (outfile, " %s", unspec_strings[XINT (in_rtx, 1)]);
+#endif
else
{
int value = XINT (in_rtx, i);