From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDDL5-0006Gn-R5 for qemu-devel@nongnu.org; Thu, 29 Mar 2012 07:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDDL4-0003eg-0a for qemu-devel@nongnu.org; Thu, 29 Mar 2012 07:16:23 -0400 Received: from mail-qa0-f45.google.com ([209.85.216.45]:56241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDDL3-0003du-Pj for qemu-devel@nongnu.org; Thu, 29 Mar 2012 07:16:21 -0400 Received: by qaeb19 with SMTP id b19so42368qae.11 for ; Thu, 29 Mar 2012 04:16:19 -0700 (PDT) Sender: Richard Henderson Message-ID: <4F74447E.30900@twiddle.net> Date: Thu, 29 Mar 2012 07:16:14 -0400 From: Richard Henderson MIME-Version: 1.0 References: <1332840290-24553-1-git-send-email-proljc@gmail.com> <1332840290-24553-2-git-send-email-proljc@gmail.com> <4F71DDC6.10700@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V3 01/12] add MIPS DSP internal functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jia Liu Cc: qemu-devel@nongnu.org, aurelien@aurel32.net 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~