> I'd just change the "rd" to "rdpr" without any ifdef.
Thanks for the explanations. Like this?
Index: Makefile
===
RCS file: /cvs/ports/security/polarssl/Makefile,v
retrieving revision 1.45
diff -u -p -r1.45 Makefile
--- Makefile
Theo Buehler:
> ++#ifdef __OpenBSD__
> ++asm volatile( "rd %%tick, %0;" : "=r" (tick) );
> ++#else
> + asm volatile( "rdpr %%tick, %0;" : "=" (tick) );
> ++#endif /* __OpenBSD__ */
I'd just change the "rd" to "rdpr" without any ifdef.
The "read privileged register" instruction is only
As pointed out by naddy, we should be able to read the %ticks register
on sparc64. The code as it is in the !__OpenBSD__ path throws SIGILL
when running regress, so I cribbed some code from sparc64/cpu.c which
appears to work - the regress timings look roughly the same as with the
softclock.
Does