This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, Jul 6, 2012 at 7:39 AM, OndÅej BÃlka <neleai@seznam.cz> wrote: > Hello > > I want to do dispatching of my string functions in generic way. > Currently for strstr I have files strstr_sse2.c, strstr_ssse3, > strstr_sse4_1.c, strstr_sse4_2.c, each consisting only of three lines > > > #define USE_FOO > #define STRSTR __strstr_FOO > #include "strstr.h" > > As I want do same thing for all string functions. This would generate > lot of files. Is there better way how to do this? That seems like a reasonable solution to the problem. I haven't thought it through very much, but I don't see an easy way to solve it in one file. You might be able to just have one file and a bunch of inline assembly inserts that create symbol aliases in the assembler. Cheers, Carlos.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |