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

Stefan Sperling stsp at stsp.in-berlin.de
Mon Aug 28 14:10:38 CEST 2006


On Mon, Aug 28, 2006 at 01:56:05PM +0200, Amadeus wrote:
> So, with stack in GBA ROM space, I think assembler is mandatory for each 
> driver accessing GBA ROM space as IO. Or we find another way of 
> blocking stack usage in C programs.

I'm also in favour of using C as much as possible, if possible.

Assembly is hard to maintain and debug. Especially if you are
not used to it (like myself and lots of other people).

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? I know this may be impossible, and may induce
overhead. However, I'd much rather have maintanable code that has
overhead than unmaintanable code without overhead.

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.

Always keep in mind that other people may at some point in time
need to change anything you have written, without being able to
contact you to ask about specifics of the implementation they
don't understand, or don't have the time to learn to understand.

-- 
stefan
http://stsp.in-berlin.de                                 PGP Key: 0xF59D25F0



More information about the dslinux-devel mailing list