[llvm-commits] [llvm-gcc-4.2] r102543 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Wed Apr 28 15:16:27 PDT 2010
Author: johannes
Date: Wed Apr 28 17:16:27 2010
New Revision: 102543
URL: http://llvm.org/viewvc/llvm-project?rev=102543&view=rev
Log:
Functions declared asm (valid only with -fasm-blocks)
are implicitly naked. 7533078 (partial, because naked
doesn't fully work on ppc).
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=102543&r1=102542&r2=102543&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Apr 28 17:16:27 2010
@@ -578,6 +578,10 @@
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (FnDecl)))
Fn->addFnAttr(Attribute::AlwaysInline);
+ // asm functions are implicitly naked
+ if (DECL_IASM_ASM_FUNCTION (FnDecl) == 1)
+ Fn->addFnAttr(Attribute::Naked);
+
// Pass inline keyword to optimizer.
if (DECL_EXPLICIT_INLINE_P (FnDecl))
Fn->addFnAttr(Attribute::InlineHint);
More information about the llvm-commits
mailing list