[hatari-devel] Head cycles : x + op head

Nicolas Pomarède npomarede at corp.free.fr
Mon Nov 21 12:05:33 CET 2011


Le 21/11/2011 11:35, laurent.sallafranque at free.fr a écrit :

> (DIV, MUL, ...).
>
> I've played around with gembench (they do a test with DIVU.W Dx, Dy repeated a lot of time).
> Actually, I get 60% of the speed of a Falcon.
>
> I can use this test to "compute" an average value instead of the max value (which would be closer to reality).
> The best would be to have the exact algo of the instruction to compute exact cycles (as it is done for the 68000), but nobody replied me (I asked in DHS forum).

Hello

regarding the mul/div algo, I already replied you : I think this 
information is not available outside of Motorola and certainly covered 
by patents. So I think it's quite unlikely we have access to it.

Regarding doing an average of the times returned by gembench, the 
problem is that you don't know how those values are spread and if 
they're truly random. If they're not (for example if gembench does 
100000 div with always the same values), you can't use that, it would 
not be an average.

If you want to use an average value, I think it would be simpler to use 
(min time) + ( max time - min time ) / 2  (using min/max values from the 
motorola doc).

But anyway, I don't think mul/div is a real problem. Apart from the 
"ultimate" accuracy goal, I doubt many programs rely on exact timings 
for these (on ST, it was only useful in protections with video sync 
code). This value is variable also on Falcon, so I don't think it could 
be that cause of DSP/CPU sync problems.


Nicolas



More information about the hatari-devel mailing list