qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/6] target-arm: A64: Implement PMULL instructio


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 5/6] target-arm: A64: Implement PMULL instruction
Date: Mon, 17 Feb 2014 22:59:06 +0000

On 17 February 2014 16:29, Richard Henderson <address@hidden> wrote:
> On 02/16/2014 12:21 PM, Peter Maydell wrote:
>> +/* Helper function for 64 bit polynomial multiply case:
>> + * perform PolynomialMult(op1, op2) and return either the top or
>> + * bottom half of the 128 bit result.
>> + */
>> +uint64_t HELPER(neon_pmull_64_lo)(CPUARMState *env, uint64_t op1, uint64_t 
>> op2)
>> +{
>> +    int bitnum;
>> +    uint64_t res = 0;
>> +
>> +    for (bitnum = 0; bitnum < 64; bitnum++) {
>> +        if (op1 & (1ULL << bitnum)) {
>> +            res ^= op2 << bitnum;
>> +        }
>> +    }
>> +    return res;
>> +}
>
> These functions don't use env.  Why are you passing it?

Oops, that's leftover from my initial approach to the problem, which
used a single helper to calculate the full 128 bit result (and which
thus needed env so it could write to env->vfp.regs, since C and TCG
don't support multiple return values or 128 bit returns). I'll remove it.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]