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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|mips-elf                    |
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This is not a bug:

  __asm__ __volatile__ ("addiu %0, %1, 0\t\n" "movn %0, %2, %3" :
"=&r"(g_b.s_b.c):"r"(g_b.s_b.c),"r"(g_a.s_a.c),"r"((0 == g_a.s_a.a)));

The movn instruction uses 32-bit quantities but g_a.s_a.c is only 16-bit and
there is no implicit cast for asm operands.  You need to write it like this:

 __asm__ __volatile__ ("addiu %0, %1, 0\t\n" "movn %0, %2, %3" :
"=&r"(g_b.s_b.c):"r"((int)g_b.s_b.c),"r"((int)g_a.s_a.c),"r"((0 ==
g_a.s_a.a)));

Reply via email to