]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: have print_expr() recognize O_index
authorJan Beulich <jbeulich@suse.com>
Fri, 10 Apr 2026 06:41:47 +0000 (08:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Apr 2026 06:41:47 +0000 (08:41 +0200)
If expr.h is to be trusted, ->X_add_number shouldn't be taken into
consideration here.

gas/symbols.c

index a0f8fcebeb8acd12e9d3eb963b251bfe7c653bd3..42a0779e32135baebd585dbf1e760ae63418609f 100644 (file)
@@ -3399,6 +3399,16 @@ print_expr_1 (FILE *file, expressionS *exp)
       print_symbol_value_1 (file, exp->X_op_symbol);
       fprintf (file, ">");
       goto maybe_print_addnum;
+    case O_index:
+      indent_level++;
+      fprintf (file, "index\n%*s<", indent_level * 4, "");
+      if (exp->X_add_symbol != NULL)
+       print_symbol_value_1 (file, exp->X_add_symbol);
+      fprintf (file, ">\n%*s<", indent_level * 4, "");
+      print_symbol_value_1 (file, exp->X_op_symbol);
+      fprintf (file, ">");
+      indent_level--;
+      break;
     default:
       fprintf (file, "{unknown opcode %d}", (int) exp->X_op);
       break;