[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 3/4] target-ppc: add vrldnmi and vrlwmi instructio
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-ppc] [PATCH 3/4] target-ppc: add vrldnmi and vrlwmi instructions |
Date: |
Tue, 25 Oct 2016 11:32:53 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Richard Henderson <address@hidden> writes:
> We already have rol32 and rol64.
>
> Which I see are broken for shift == 0.
I tried with different shift (including 0) in a test program, and the
result is as expected:
0: ccddeeff
static inline unsigned int rol32(unsigned int word, unsigned int shift)
{
return (word << shift) | (word >> (32 - shift));
}
void main(void)
{
unsigned int value32 = 0xCCDDEEFF;
for (int i = 0; i < 32; i++)
printf("%d: %08x\n", i, rol32(value32, i));
}
> Let's please fix that, as a separate patch, like so:
>
> return (word << shift) | (word >> ((32 - shift) & 31));
Doesn't seems to be necessary.
Regards
Nikunj
- [Qemu-ppc] [PATCH 0/4] POWER9 TCG enablements - part7, Nikunj A Dadhania, 2016/10/24
- [Qemu-ppc] [PATCH 1/4] target-ppc: add xscmp[eq, gt, ge, ne]dp instructions, Nikunj A Dadhania, 2016/10/24
- [Qemu-ppc] [PATCH 2/4] target-ppc: add vmul10[u, eu, cu, ecu]q instructions, Nikunj A Dadhania, 2016/10/24
- [Qemu-ppc] [PATCH 3/4] target-ppc: add vrldnmi and vrlwmi instructions, Nikunj A Dadhania, 2016/10/24
- Re: [Qemu-ppc] [PATCH 3/4] target-ppc: add vrldnmi and vrlwmi instructions,
Nikunj A Dadhania <=
- Re: [Qemu-ppc] [PATCH 3/4] target-ppc: add vrldnmi and vrlwmi instructions, Richard Henderson, 2016/10/25
- Re: [Qemu-ppc] [PATCH 3/4] target-ppc: add vrldnmi and vrlwmi instructions, Nikunj A Dadhania, 2016/10/26
[Qemu-ppc] [PATCH 4/4] target-ppc: add vrldnm and vrlwnm instructions, Nikunj A Dadhania, 2016/10/24