+2021-03-30  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (reg_eax): New.
+       (md_begin): Initialize reg_eax.
+       * config/tc-i386-intel.c (i386_intel_simplify_register): Use
+       reg_eax.
+       (i386_intel_simplify): Likewise.
+
 2021-03-30  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (reg_st0): New.
 
   else
     {
       /* esp is invalid as index */
-      intel_state.index = i386_regtab + REGNAM_EAX + ESP_REG_NUM;
+      intel_state.index = reg_eax + ESP_REG_NUM;
     }
   return 2;
 }
                break;
              default:
                /* esp is invalid as index */
-               intel_state.index = i386_regtab + REGNAM_EAX + ESP_REG_NUM;
+               intel_state.index = reg_eax + ESP_REG_NUM;
                break;
              }
 
 
 static const reg_entry bad_reg = { "<bad>", OPERAND_TYPE_NONE, 0, 0,
                                   { Dw2Inval, Dw2Inval } };
 
+static const reg_entry *reg_eax;
 static const reg_entry *reg_st0;
 static const reg_entry *reg_k0;
 
        switch (regtab->reg_type.bitfield.class)
          {
          case Reg:
-           if (regtab->reg_type.bitfield.tbyte)
+           if (regtab->reg_type.bitfield.dword)
+             {
+               if (regtab->reg_type.bitfield.instance == Accum)
+                 reg_eax = regtab;
+             }
+           else if (regtab->reg_type.bitfield.tbyte)
              {
                /* There's no point inserting st(<N>) in the hash table, as
                   parentheses aren't included in register_chars[] anyway.  */
 
+2021-03-30  Jan Beulich  <jbeulich@suse.com>
+
+       * i386-opc.h (REGNAM_AL, REGNAM_AX, REGNAM_EAX): Delete.
+
 2021-03-30  Jan Beulich  <jbeulich@suse.com>
 
        * i386-opc.h (REGNAM_AL, REGNAM_AX, REGNAM_EAX): Adjust values.
 
 }
 reg_entry;
 
-/* Entries in i386_regtab.  */
-#define REGNAM_AL 0
-#define REGNAM_AX 24
-#define REGNAM_EAX 40
-
 extern const reg_entry i386_regtab[];
 extern const unsigned int i386_regtab_size;