This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Inlining bug on MIPS - both 2.95.3 and 3.0 branches


On Mar 10, 2001, Daniel Jacobowitz <dmj+@andrew.cmu.edu> wrote:

> If I use the "i#*X" constraint inside the inline function, the
> compiler seems to first decide to prefer a register (before
> inlining?), and then attempt to satisfy the constraints when
> inlining.  This fails, obviously:

> mips-vgacon.c: In function `vga_pal_blank':
> mips-vgacon.c:10: inconsistent operand constraints in an `asm'

I've seen this before.  I'm not sure it's a problem in reload, for
deciding not to touch hardware registers that are output registers of
asm statements, or in register allocation, for assigning pseudos that
are output operands of asm statements to hardware registers before
reload.  The problem shows up on mn10300-elf with a program as simple
as this:

int *p;

int f () {
  int ret;

  asm volatile ("%0" : "=m" (ret));

  if (ret != 0)
    *p = ret;

  return ret;
}

I'm afraid I still don't have a fix :-(

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]