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

            Bug ID: 18315
           Summary: failure to parse %b0
           Product: libraries
           Version: 3.3
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM assembly language parser
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

When compiling the following code snippet:

#define DOINT(n)        "int $0x20+(" #n ")"

        __asm __volatile(DOINT(0x1a) "\n\t"
            "setc %b0\n\t"
            "movb %%ch, 0(%2)\n\t"
            "movb %%cl, 1(%2)\n\t"
            "movb %%dh, 2(%2)\n\t"
            "movb %%dl, 3(%2)\n\t"
            : "=a" (f)
            : "0" (f), "p" (b) : "%ecx", "%edx", "cc");

clang reports
error:
unexpected token in memory operand
            "setc %b0\n\t"
                       ^
<inline asm>:3:14: note: instantiated into assembly here
        movb %ch, 0(-8(%ebp))
                    ^
/usr/src/sys/arch/i386/stand/boot/../libsa/time.c:81:25: error:
unexpected token in memory operand
            "movb %%ch, 0(%2)\n\t"
                               ^
<inline asm>:4:14: note: instantiated into assembly here
        movb %cl, 1(-8(%ebp))
                    ^
/usr/src/sys/arch/i386/stand/boot/../libsa/time.c:82:25: error:
unexpected token in memory operand
            "movb %%cl, 1(%2)\n\t"
                               ^
<inline asm>:5:14: note: instantiated into assembly here
        movb %dh, 2(-8(%ebp))
                    ^
/usr/src/sys/arch/i386/stand/boot/../libsa/time.c:83:25: error:
unexpected token in memory operand
            "movb %%dh, 2(%2)\n\t"
                               ^
<inline asm>:6:14: note: instantiated into assembly here
        movb %dl, 3(-8(%ebp))
                    ^
4 errors generated.

While, -no-integrated-as, it produces:
/tmp/time-cEtCow.s: Assembler messages:
/tmp/time-cEtCow.s:172: Error: junk `(-8(%ebp))' after expression
/tmp/time-cEtCow.s:173: Error: junk `(-8(%ebp))' after expression
/tmp/time-cEtCow.s:174: Error: junk `(-8(%ebp))' after expression
/tmp/time-cEtCow.s:175: Error: junk `(-8(%ebp))' after expression
clang-3.3: error: assembler command failed with exit code 1 (use -v to
see invocation)

-- 
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