[LLVMbugs] [Bug 9295] New: Support for "asm goto"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 23 05:25:14 PST 2011


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

           Summary: Support for "asm goto"
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dave at jikos.cz
                CC: llvmbugs at cs.uiuc.edu


http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html (search for 'asm goto')

"As of GCC version 4.5, asm goto may be used to have the assembly jump to one
or more C labels. In this form, a fifth section after the clobber list contains
a list of all C labels to which the assembly may jump. Each label operand is
implicitly self-named. The asm is also assumed to fall through to the next
statement."

int frob(int x)
     {
       int y;
       asm goto ("frob %%r5, %1; jc %l[error]; mov (%2), %%r5"
                 : : "r"(x), "r"(&y) : "r5", "memory" : error);
       return y;
      error:
       return -1;
     }

Linux kernel has a compile-time option whether asm goto is compiler supported,
so this is not a blocker for it, but I'd like to know what's clang POV on this.

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