Re: [Patch] asm workarounds in generic header files

From: Jes Sorensen
Date: Wed Sep 10 2003 - 11:26:37 EST


>>>>> "David" == David Mosberger <davidm@xxxxxxxxxxxxxxxxx> writes:

[trimmed the CC list since this is more at the preference level]

David> In my opinion, moving all the asm-stuff greatly improved
David> readability of the source code. Especially for folks who are
David> not intimately familiar with GCC asm syntax (which is hairy
David> _and_ platform-specific).

Hi David,

I think this really depends on what you are trying to debug. If you
expect the macros to do exactly what they are described to be doing
then I'd agree. However every so often when you look up the macros you
really want to look at the details what they are actually doing or
even compare them to another arch's implementation to make sure they
are behaving the same. At least thats my experience.

I personally think it's unrealistic to think one can try and debug
things in include/asm without being able to read the assembly output
in the first place.

David> I think the jury is out on this one. Clearly it's a huge
David> benefit if you can make do without inline asm. GCC has to make
David> lots of worst-case assumptions whenever it encounters an asm
David> statement and, due to macros and inlining, the asm statements
David> are not just hidden in a few leaf routines.

Reducing the amount of inline asm in the kernel would be a good
thing. It is cetainly one of those things that have been abused way
beyond it's intent.

Cheers,
Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/