[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction |
Date: |
Mon, 08 Aug 2016 07:22:13 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Benjamin Herrenschmidt <address@hidden> writes:
> On Sun, 2016-08-07 at 23:06 +0530, Nikunj A Dadhania wrote:
>> +target_ulong helper_darn(uint32_t l)
>> +{
>> + target_ulong r = UINT64_MAX;
>> +
>> + if (l <= 2) {
>> + do {
>> + r = random() * random();
>> + r &= l ? UINT64_MAX : UINT32_MAX;
>> + } while (r == UINT64_MAX);
>> + }
>> +
>> + return r;
>> +}
>> #endif
>
> Isn't this a bit week ? Look at the implementation of H_RANDOM...
Sure, will have a look.
Regards,
Nikunj
- [Qemu-ppc] [PATCH 0/6] POWER9 TCG enablements - part4, Nikunj A Dadhania, 2016/08/07
- [Qemu-ppc] [PATCH 1/6] target-ppc: add xxspltib instruction, Nikunj A Dadhania, 2016/08/07
- [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction, Nikunj A Dadhania, 2016/08/07
- Re: [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction, David Gibson, 2016/08/08
- Re: [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction, Nikunj A Dadhania, 2016/08/09
- Re: [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction, Nikunj A Dadhania, 2016/08/09
- Re: [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction, David Gibson, 2016/08/12
- Re: [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction, Nikunj A Dadhania, 2016/08/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction, Thomas Huth, 2016/08/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction, Nikunj A Dadhania, 2016/08/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction, Thomas Huth, 2016/08/12