[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
Eli Friedman
eli.friedman at gmail.com
Fri Jul 17 14:26:02 PDT 2009
On Fri, Jul 17, 2009 at 1:51 PM, Anton
Korobeynikov<anton at korobeynikov.info> wrote:
>> Okay... can you at least put a nasty warning in LangRef that such code
>> is fundamentally undefined?
> In which place?
The docs for the naked attribute.
> 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...
This is nasty code which depends on details of register allocation...
-Eli
More information about the llvm-commits
mailing list