https://gcc.gnu.org/g:97d2686decc34400e585bbc725602757c91e3fbf
commit r16-786-g97d2686decc34400e585bbc725602757c91e3fbf Author: Richard Sandiford <richard.sandif...@arm.com> Date: Wed May 21 10:01:31 2025 +0100 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: --- gcc/genemit.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/genemit.cc b/gcc/genemit.cc index 9923cf078b96..ba64290af53e 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;