[1/8] gas: have print_expr() recognize O_index

Message ID a89c52a1-d78b-4f6c-889b-de312c04987c@suse.com
State New
Headers
Series gas/x86: towards better Intel syntax expression evaluation |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply

Commit Message

Jan Beulich March 27, 2026, 2:10 p.m. UTC
  If expr.h is to be trusted, ->X_add_number shouldn't be taken into
consideration here.
  

Patch

--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -3370,6 +3370,16 @@  print_expr_1 (FILE *file, expressionS *e
       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;