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~