[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] target-arm: Move Neon VUZP to a helper func
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] target-arm: Move Neon VUZP to a helper function |
Date: |
Fri, 11 Feb 2011 17:12:32 +0000 |
On 11 February 2011 17:03, Nathan Froyd <address@hidden> wrote:
> On Fri, Feb 11, 2011 at 04:53:30PM +0000, Peter Maydell wrote:
>> On 11 February 2011 16:14, Peter Maydell <address@hidden> wrote:
>> > +void HELPER(neon_unzip)(CPUState *env, uint32_t insn)
>> > +{
>> > + int rd = ((insn >> 18) & 0x10) | ((insn >> 12) & 0x0f);
>> > + int rm = ((insn >> 1) & 0x10) | (insn & 0x0f);
>> > + int size = (insn >> 18) & 3;
>> > + if (insn & 0x40) { /* Q */
>> > + uint64_t zm0 = float64_val(env->vfp.regs[rm]);
>> > + uint64_t zm1 = float64_val(env->vfp.regs[rm + 1]);
>> > + uint64_t zd0 = float64_val(env->vfp.regs[rd]);
>> > + uint64_t zd1 = float64_val(env->vfp.regs[rd + 1]);
>>
>> I can rework these patches if people don't like the way this is
>> effectively doing decoding in a helper function, incidentally,
>> although I'm not convinced it would end up any nicer overall.
>
> I do think the preferred way would be to extract rd, rm, size, and Q
> up-front, rather than having the helper twiddle instruction bits.
OK. You're happy to still have the helper do the reading and
writing of env->vfp.regs[] directly, though?
-- PMM
[Qemu-devel] [PATCH 2/2] target-arm: Move Neon VZIP to a helper function, Peter Maydell, 2011/02/11