From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23162 invoked by alias); 29 May 2010 14:40:10 -0000 Received: (qmail 22961 invoked by uid 48); 29 May 2010 14:39:48 -0000 Date: Sat, 29 May 2010 14:40:00 -0000 Message-ID: <20100529143948.22960.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mikpe at it dot uu dot se" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg03213.txt.bz2 ------- Comment #14 from mikpe at it dot uu dot se 2010-05-29 14:39 ------- (In reply to comment #11) > (it seems quite stupid to have naked functions with only an asm inside in the > first place - you can equally well use plain assembly) Except that with plain asm() for an entire function definition you'd also have to include boring preamble/postamble stuff like .align/.type/.size if you want it to appear as a proper function, and you still have to declarate a prototype. And the reason for making it a separate function rather than an inline asm() is probably related to register assignment: a separate function can (could) make assumptions about parameter registers and scratch registers. With inline asm() you have to be much more elaborate, esp. if you have constraints that gcc cannot express, like even/odd register pairs on ARM. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290