Re: security/polarssl: use hardclock for sparc64

2022-04-02 Thread Theo Buehler
> 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

Re: security/polarssl: use hardclock for sparc64

2022-04-02 Thread Christian Weisgerber
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

security/polarssl: use hardclock for sparc64

2022-04-02 Thread Theo Buehler
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