https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109257

--- Comment #6 from LIU Hao <lh_mouse at 126 dot com> ---
gcc/config/i386/i386.cc:
```
void
ix86_print_operand (FILE *file, rtx x, int code)
{
  if (code)
    {
      switch (code)
        {
        case 'A':
          switch (ASSEMBLER_DIALECT)
            {
            case ASM_ATT:
              putc ('*', file);
              break;

            case ASM_INTEL:
              /* Intel syntax. For absolute addresses, registers should not
                 be surrounded by braces.  */
              if (!REG_P (x))
                {
                  putc ('[', file);
                  ix86_print_operand (file, x, 0);
                  putc (']', file);
                  return;
                }
              break;

            default:
              gcc_unreachable ();
            }

          ix86_print_operand (file, x, 0);
          return;
```

I hope someone can clean this up a bit. The AT&T part is an obvious recursion,
so why should we write something like that? It could be

```
        case 'A':
          if (ASSEMBLER_DIALECT == ASM_ATT)
            {
              putc ('*', file);
              break;
            }

          // intel stuff here.
          return;

```

Reply via email to