Messages in this thread | | | Subject | RE: [Patch] asm workarounds in generic header files | Date | Tue, 9 Sep 2003 12:34:56 -0700 | From | "Siddha, Suresh B" <> |
| |
Thanks Jes and Christoph for your comments. As you have noticed, this patch is not a workaround/hack for any C standard violation.
We believe that we are trying to improve the code by localizing the compiler issues (including the ones for gcc3 and Intel complier) and by introducing use of compiler intrinsics (e.g. for barrier()).
> Could you try to test your RELOC_HIDE version with various > gcc versions > and maybe as some gcc gurus whether it's fine?
RELOC_HIDE is handling a specific gcc version behaviour. There was a discussion on this sometime back http://gcc.gnu.org/ml/gcc/2002-01/msg00484.html
Richard Henderson mentioned that asm stmt is the only escape hitch for the current compiler behaviour. But as Linus suggested in the above mail thread, non-same-type cast(which is the current solution for Intel compiler) is the way to go for gcc also.
As far as barrier() is concerned, a cleaner approach would be a compiler-specific intrinsic(something like the one implemented by Intel compiler) that can tell the programmer's intention explicitly.
Once gcc has a cleaner solution for both these macros, we can do-away with these changes.
thanks, suresh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |