From: Richard Sandiford Date: Wed, 21 May 2025 09:01:31 +0000 (+0100) Subject: genemit: Remove support for string operands X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97d2686decc34400e585bbc725602757c91e3fbf;p=thirdparty%2Fgcc.git genemit: Remove support for string operands 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/ * genemit.cc (generator::gen_exp): Report an error for 's' operands. --- diff --git a/gcc/genemit.cc b/gcc/genemit.cc index 9923cf078b9..ba64290af53 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;