[LLVMbugs] [Bug 6730] clang generates invalid asm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 29 11:18:47 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6730

Chris Lattner <clattner at apple.com> changed:

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

--- Comment #3 from Chris Lattner <clattner at apple.com> 2010-03-29 13:18:46 CDT ---
Yes, this is invalid constrains on the inline assembly.  In RLEClipBlit, we
have this asm:

...
__asm__         __volatile__("pand" " %" "mm5" ", %" "mm3");
__asm__         __volatile__("por" " %" "mm6" ", %" "mm3");
__asm__         __volatile__("movq" " %%" "mm3" ", %0":"=X"(*dstp):);



This is generating code like this:

    ## InlineAsm Start
    pand %mm5, %mm3
    ## InlineAsm End
    ## InlineAsm Start
    por %mm6, %mm3
    ## InlineAsm End
    movq    -256(%rbp), %rax
    ## InlineAsm Start
    movq %mm3, %cx
    ## InlineAsm End
    movw    %cx, (%rax)

This is perfectly valid code to generate for the X constraint, which says that
anything is allowed.  Change this to =m for this to work.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list