From 0fe60a1bfab511269b85fcd36e87076708fd2a31 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 10 Jun 2010 20:24:45 +0000 Subject: 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 --- gcc/print-rtl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gcc/print-rtl.c') diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 5cf0f9b..96e1485 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); -- cgit v1.1