------- 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