------- Comment #2 from pinskia at gcc dot gnu dot org  2008-10-02 19:33 -------
        asm("SLL %[temp], %[c], 16\n\t"
            "MULT %[a], %[c]\n\t"
            : [result]"=h"(result), [temp]"=r"(temp)
            : [a]"r"(a), [c]"r"(c)
            : "lo");

You need an early clobber on temp since it is written to before c is read. You
want:
        asm("SLL %[temp], %[c], 16\n\t"
            "MULT %[a], %[c]\n\t"
            : [result]"=h"(result), [temp]"=&r"(temp)
            : [a]"r"(a), [c]"r"(c)
            : "lo");


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c                           |inline-asm
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37711

Reply via email to