dslinux/linux-2.6.x/drivers/mmc scsd_c.c scsd_s.S

Amadeus amadeus at iksw-muees.de
Mon Aug 28 15:34:49 CEST 2006


On Monday 28 August 2006 14:10, Stefan Sperling wrote:
> If assembly is really necessary, maybe it is possible to write
> small wrappers in assembly that clean up the stack before and after
> C function calls?

Hm. This might be possible, and might be worth trying, because CF 
drivers (for example) have a very simple interface which is easy served 
in C. I will think about it!

> However, I'd much rather have maintanable code that has
> overhead than unmaintanable code without overhead.

I would not call assembler code "unmaintainable". ARM assembler is 
pretty simple, and I am used to comment more than the average linux 

> As for the speed optimisation issue - I don't know if it is
> reasonable to optimise things at all costs. Again, I'd prefer
> working, maintainable code to "crazy-speedy-fully-optimised-but-
> few-can-understand-it" code.

Writing assembler is not "at all costs". No, Sir!

And a good commented assembler function is more readable as some of the 
"low-level-C" functions I have seen in the linux kernel which try to 
modify stacks, registers and so on from C.

We're back to the times when men were men 
and wrote their own device drivers.

(Linus Torvalds)

More information about the dslinux-devel mailing list