On Wed, 1 Jul 2015, Aurelien Jarno wrote:

> Secondly, I don't think calling random() is the correct thing to do.
> It's an expensive function that is not thread safe. Quoting the
> specification:
> 
>   "Within the required constraints of the upper and lower bounds, the
>   manner in which the processor selects values for the Random register
>   is implementation-dependent."
> 
> So it's fine if we use a PRNG like the current code, but I agree we
> might want to improve it if it has some issues. We want to keep its
> value reproducible though so that the icount mode works as expected.

 Implementations often implement CP0.Random as a free-running counter that 
decrements between the bounds set as each instruction executes.

  Maciej

Reply via email to