[PATCH 2 of 3] Add MIPS32R2 RDHWR-based cycle counter support

info at mobile-stream.com info at mobile-stream.com
Thu Sep 12 15:36:14 UTC 2019


T> Can your timing code be used under *nix?  I guess from your reply but it
T> cannot, generally.

openbsd, freebsd -- likely no.
netbsd -- likely yes.


T> Then (assuming the cycle counter is usable from outside of the kernel)
T> I'd suggest that your suggested configuration pattern was a bit too
T> restrictive.

no testing was performed on r6 or rdhwr-compatible 64-bit systems.

r3, r5 bring nothing new on the userspace side[1] and the common practice is to use such systems under r2 disguise for compatibility reasons as some packages (qt5 iirc) have strange assumptions about mips isa revision (i.e. if it not r2 and not r6, it is r1 etc).

also, the hw-independent clock source is apparently very good anyway on newer 32-bit cores/socs (such as p5600).

iiuc the timing code is needed for development tasks mostly so probably not a big deal.

so restricting the mips32r2.asm (but not the new *mul_1.asm code) further to mipsisa32*-*-linux* until netbsd support is confirmed seems better idea.


[1] nan2008 is another story and does not affect integer code in any case.



More information about the gmp-devel mailing list