[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help in finding the cycle counter for mips and mipsel



When building fftw3 on mips{el}, the build fails because fftw3 does
not yet know about the cycle counter for this arch. In working to send
a patch upstream to address this, there are some issues which need to
be addressed that require some knowledge of the architecture.

First, if the linux kernel can be believed, the way to access the
cycle counter can be found in linux/include/asm-mips/timex.h. This is
used in a function within fftw3. Obviously, some judicious use of #if
is used so the correct version of the function is found for each arch.
A typical example, for x86, is

#if (defined(__GNUC__) || defined(__ICC)) && defined(__i386__)  && !defined(HAVE_TICK_COUNTER)
...
#endif

Since I don't have access to a mips or mipsel machine, I currently
have the following for mips:

#if defined(__GNUC__) && defined(__mips__) && !defined(HAVE_TICK_COUNTER)
...
#endif

Information from linux/include/asm-mips/timex.h was used to create the
contents of the #if. Is the above the proper way to recognize that one
is currently on a mips machine (I believe so)?

The next question is what to do for mipsel? Should the same functions
be used for that machine but simply looking for __mipsel__ instead? Am
I correct in assuming that mips64 is a different issue entirely from
mips vs mipsel (which only differ by their endianness)?

Any help you can provide in clarifying what needs to be done for mips
and mipsel would be appreciated.

Note that I am not subscribed to the mailing list. Please CC me on any
replies.

-- 
James (Jay) Treacy
treacy@debian.org



Reply to: