[LLVMbugs] [Bug 8717] New: LLVM MC does not know how to handle .subsection derective

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 1 08:46:25 PST 2010


           Summary: LLVM MC does not know how to handle .subsection
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kaffeemonster at googlemail.com
                CC: llvmbugs at cs.uiuc.edu

After a long time testing llvm+clang again.
llvm/clang @ TOT, r120576

Given the following (silly example) code:

int foo(int a)
    int x;
        "dec    %0\n\t"
        "jnz    2f\n\t"
         * some procesessors see jumping back as likely
         * so jump forward, then backward
        ".subsection 2\n"
        "jmp    1b\n\t"
    : "=r" (x)
    : "0" (a)
    return x;

clang gives:
$ clang -O -c clang_sub.c
clang_sub.c:7:12: error: expected identifier in directive
        "jnz   2f\n\t"
<inline asm>:4:14: note: instantiated into assembly here
        .subsection 2
1 error generated.

Looks like the new builtin asm foo is to blame.

I tried to make a patch (attached, don't shoot me, it's just a test, i have no
clue about C++ or llvm), but it does not solve it.


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