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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to