Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Why avoid inline assembly ?



On Mon, Jun 08, 2015 at 10:23:20AM +0200, deco33000%yandex.com@localhost wrote:
> Hello,
> 
> I would like to know why cpu functions (cpufunc.S) are written in assembly
> and not asm inlined (like in other operating systems).
> e.g x86_disable_intr

Non-trivial functions are much easier to write in .S files.
Some of the single instruction ones are actually either very slow
and/or are very rarely used - so inlining them makes little difference.

Basically someone decided that real functions were a good idea.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index