]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
genemit: Remove purported handling of location_ts
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 May 2025 09:01:30 +0000 (10:01 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 May 2025 09:01:30 +0000 (10:01 +0100)
gen_exp had code to handle the 'L' operand format.  But this format
is specifically for location_ts, which are only used in RTX_INSNs.
Those should never occur in this context, where the input is always
an md file rather than an __RTL function.  Any hard-coded raw
location value would be meaningless anyway.

It seemed safer to turn this into an error rather than a gcc_unreachable.

gcc/
* genemit.cc (generator::gen_exp): Raise an error if we see
an 'L' operand.

gcc/genemit.cc

index 0529b916455f730169e889d2ee981d0a2d0565f3..9923cf078b96ea2660b3e9c0a0706a5e9ccdd8df 100644 (file)
@@ -270,7 +270,8 @@ generator::gen_exp (rtx x)
          break;
 
        case 'L':
-         fprintf (file, "%llu", (unsigned long long) XLOC (x, i));
+         fatal_at (info.loc, "'%s' rtxes are not supported in this context",
+                   GET_RTX_NAME (code));
          break;
 
        case 'r':