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

           Summary: [MC x86] gas knows a default size for stack access?
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


t...@123092

int foo(int c)
{
    asm (
            "push    %0\n\t"
            "and    $3, (%%esp)\n\t"
            "pop    %0\n\t"
        : "=r" (c)
        : "0" (c)
    );
    return c;
}

$ gcc -c clang_and.c

gcc or more correct gas eats it
$ as --version
GNU assembler (GNU Binutils) 2.20.1.20100303

$ clang -c clang_and.c 
clang_and.c:4:14: error: ambiguous instructions require an explicit suffix
(could be 'andb', 'andw', 'andl', or 'andq')
                        "push   %0\n\t"
                                    ^
<inline asm>:2:2: note: instantiated into assembly here                         
        and     $3, (%esp)
        ^
1 error generated.

clang/llvm does not

Greetings
Jan

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to