[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 1/3] PPC: Circumvent overflow in mtcrf
From: |
Blue Swirl |
Subject: |
[Qemu-devel] Re: [PATCH 1/3] PPC: Circumvent overflow in mtcrf |
Date: |
Mon, 2 Mar 2009 20:53:35 +0200 |
On 3/2/09, Alexander Graf <address@hidden> wrote:
> I had a segmentation fault in mtcrf, where ffs() returned 8 and the
> code then accessed cpu_crf[7 - 8].
>
> In order to circumvent this, I just put in an & 7 to the ffs result,
> so we'll never run negative. This is probably not correct, but makes
> things work for me so far.
ffs does not return bit number (in power of 2 numbering), but one if
the zeroth bit is set, two if the first bit is set etc. So I'd try
instead
crn = ffs(crm) - 1;
- [Qemu-devel] [PATCH 0/3] PPC64 Linux bringup patches, Alexander Graf, 2009/03/02
- [Qemu-devel] [PATCH 1/3] PPC: Circumvent overflow in mtcrf, Alexander Graf, 2009/03/02
- [Qemu-devel] [PATCH 2/3] PPC64: Implement slbmte, Alexander Graf, 2009/03/02
- [Qemu-devel] [PATCH 3/3] PPC64: Implement large pages, Alexander Graf, 2009/03/02
- [Qemu-devel] Re: [PATCH 2/3] PPC64: Implement slbmte, Blue Swirl, 2009/03/02
- [Qemu-devel] Re: [PATCH 2/3] PPC64: Implement slbmte, Alexander Graf, 2009/03/02
- Re: [Qemu-devel] Re: [PATCH 2/3] PPC64: Implement slbmte, Paul Brook, 2009/03/02
- [Qemu-devel] Re: [PATCH 2/3] PPC64: Implement slbmte, Blue Swirl, 2009/03/02
- [Qemu-devel] Re: [PATCH 2/3] PPC64: Implement slbmte, Alexander Graf, 2009/03/02
[Qemu-devel] Re: [PATCH 1/3] PPC: Circumvent overflow in mtcrf,
Blue Swirl <=
Re: [Qemu-devel] [PATCH 1/3] PPC: Circumvent overflow in mtcrf, Laurent Desnogues, 2009/03/02