gen_exp currently supports the 's' (string) operand type.  It would
certainly be possible to make the upcoming bytecode patch support
that too.  However, the rtx codes that have string operands should
be very rarely used in hard-coded define_insn/expand/split/peephole2
rtx templates (as opposed to things like attribute expressions,
where const_string is commonplace).  And AFAICT, no current target
does use them like that.

This patch therefore reports an error for these rtx codes,
rather than adding code that would be unused and untested.

gcc/
        * genemmit.cc (generator::gen_exp): Report an error for 's' operands.
---
 gcc/genemit.cc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gcc/genemit.cc b/gcc/genemit.cc
index 3636a555aad..00f7a920ce9 100644
--- a/gcc/genemit.cc
+++ b/gcc/genemit.cc
@@ -270,6 +270,7 @@ generator::gen_exp (rtx x)
          break;
 
        case 'L':
+       case 's':
          fatal_at (info.loc, "'%s' rtxes are not supported in this context",
                    GET_RTX_NAME (code));
          break;
@@ -284,10 +285,6 @@ generator::gen_exp (rtx x)
          fprintf (file, "%d", SUBREG_BYTE (x).to_constant ());
          break;
 
-       case 's':
-         fprintf (file, "\"%s\"", XSTR (x, i));
-         break;
-
        case 'E':
          {
            int j;
-- 
2.43.0

Reply via email to