[LLVMbugs] [Bug 14406] New: expected '(' after 'asm'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 21 19:00:35 PST 2012


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

             Bug #: 14406
           Summary: expected '(' after 'asm'
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zhenbo1987 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


I was trying to use clang to compile linux kernel 3.5.4.

It complains

error: expected '(' after 'asm'
  asm goto("1: jmp %l[t_no]\n"
      ^

 when compiling inline asm code like:

static inline __attribute__((no_instrument_function))
__attribute__((always_inline)) __attribute__((pure)) bool __static_cpu_has(u16
bit)
{

  asm goto("1: jmp %l[t_no]\n"
    "2:\n"
    ".section .altinstructions,\"a\"\n"
    " .long 1b - .\n"
    " .long 0\n"
    " .word %P0\n"
    " .byte 2b - 1b\n"
    " .byte 0\n"
    ".previous\n"

    : : "i" (bit) : : t_no);
  return true;
 t_no:
  return false;
}

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