[LLVMbugs] [Bug 17201] New: MS inline assembly should assume asm block sets the return value.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 11 22:49:49 PDT 2013


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

            Bug ID: 17201
           Summary: MS inline assembly should assume asm block sets the
                    return value.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

consider:
inline void nothin(void) {
  __asm { nop }
}

int main() {
  nothin();
}

MSVC codegens this as:

_main    PROC                        ; COMDAT
    npad    1
    ret    0
_main    ENDP

if you comment out the asm in 'nothin', you get:

_main    PROC                        ; COMDAT
    xor    eax, eax
    ret    0
_main    ENDP

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130912/4464eeb7/attachment.html>


More information about the llvm-bugs mailing list