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]
Other format: [Raw text]

[Bug inline-asm/37492] optimization causes inline assembler to emit syntax errors



------- Comment #1 from ubizjak at gmail dot com  2008-09-12 14:13 -------
(In reply to comment #0)

>   asm(
>   " xorl %1, %1\n"
>   " movl $0x12345678, %0\n"
>   " bsrl %2, %0 ; setz %b1 "
>   : "=r" (res), "=r" (resz)
>   : "g" (val)

Use "q" constraint for operand 1. You will also need earlyclobbers on output
operands:

    : "=&r" (res), "=&q" (resz)


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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