qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 01/12] add MIPS DSP internal functions


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH V3 01/12] add MIPS DSP internal functions
Date: Thu, 29 Mar 2012 07:16:14 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0

On 03/27/2012 10:03 PM, Jia Liu wrote:
> Thanks.
> do you mean, I should write like this?
> helper.h:
> DEF_HELPER_FLAGS_3(addq_ph, 0, i32, env, i32, i32)
> 
> dsp_helper.c:
> uint32_t helper_addq_ph(CPUMIPSState *env, uint32_t rs, uint32_t rt)
> {}

Yes.  Although the 0 flags argument probably warrants DEF_HELPER_3 instead.
Then, of course, you have to pass down the env parameter to all of the other
inline helpers that use it.

>>> +    if (len == 2)
>>> +        env->active_tc.DSPControl &= 0xFCFFFFFF;
>>> +    else if (len == 4)
>>> +        env->active_tc.DSPControl &= 0xF0FFFFFF;
>> Run all your patches through ./scripts/checkpatch.pl and fix the
>> errors that will report.
>>
> I've run ./scripts/checkpatch.pl, but I didn't get a ERR here...

You should have gotten an error about missing {.

  if (len == 2) {
    ...
  } else if (len == 4) {
    ...
  }


r~



reply via email to

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