[llvm-commits] [llvm] r76198 - in /llvm/trunk: docs/LangRef.html include/llvm-c/Core.h include/llvm/Attributes.h lib/AsmParser/LLLexer.cpp lib/AsmParser/LLParser.cpp lib/AsmParser/LLToken.h lib/CodeGen/PrologEpilogInserter.cpp lib/VMCore/Attribut

Anton Korobeynikov anton at korobeynikov.info
Fri Jul 17 13:51:52 PDT 2009


> Okay... can you at least put a nasty warning in LangRef that such code
> is fundamentally undefined?
In which place? We're lowering stuff to something like this:

define arm_apcscc void @_start() nounwind naked {
entry:
        %0 = tail call i32* asm "", "={sp}"() nounwind          ;
<i32*> [#uses=1]
        %1 = load i32* %0, align 4              ; <i32> [#uses=1]
        %2 = tail call i32* asm "", "={sp}"() nounwind          ;
<i32*> [#uses=1]
        %3 = getelementptr i32* %2, i32 1               ; <i32*> [#uses=1]
        %4 = bitcast i32* %3 to i8**            ; <i8**> [#uses=1]
        %5 = tail call arm_apcscc  i32 @_main(i32 %1, i8** %4)
noreturn nounwind                ; <i32> [#uses=0]
        unreachable
}

which is normal inline asm code...

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-commits mailing list