From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9AT1-0007hQ-3L for qemu-devel@nongnu.org; Tue, 13 Aug 2013 05:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9ASw-0005Ot-0h for qemu-devel@nongnu.org; Tue, 13 Aug 2013 05:00:39 -0400 Received: from multi.imgtec.com ([194.200.65.239]:57266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9ASv-0005NV-SF for qemu-devel@nongnu.org; Tue, 13 Aug 2013 05:00:33 -0400 Message-ID: <5209F571.7020103@imgtec.com> Date: Tue, 13 Aug 2013 09:59:29 +0100 From: James Hogan MIME-Version: 1.0 References: <1375972823-25333-1-git-send-email-james.hogan@imgtec.com> <5203C2E8.3060700@twiddle.net> In-Reply-To: <5203C2E8.3060700@twiddle.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tcg/mips: fix invalid op definition errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, Aurelien Jarno On 08/08/13 17:10, Richard Henderson wrote: > On 08/08/2013 04:40 AM, James Hogan wrote: >> tcg/mips/tcg-target.h defines various operations conditionally depending >> upon the isa revision, however these operations are included in >> mips_op_defs[] unconditionally resulting in the following runtime errors >> if CONFIG_DEBUG_TCG is defined: >> >> Invalid op definition for movcond_i32 >> Invalid op definition for rotl_i32 >> Invalid op definition for rotr_i32 >> Invalid op definition for deposit_i32 >> Invalid op definition for bswap16_i32 >> Invalid op definition for bswap32_i32 >> tcg/tcg.c:1196: tcg fatal error >> >> Fix with ifdefs like the i386 backend does for movcond_i32. >> >> Signed-off-by: James Hogan >> Cc: Aurelien Jarno >> Cc: Richard Henderson > > Reviewed-by: Richard Henderson Thanks, > Perfect for 1.6. > > For 1.7 it would be really nice if you could figure out some way to make > these runtime tests, instead of ifdefs. I'd have said getauxval(3), but > the mips kernel doesn't seem to define any identifying bits. Perhaps > that's the first thing that ought to get fixed... Yes, the auxvec sounds ideal for this, and AT_HWCAP is already used for cpuid on x86. There were some patches a while ago for exposing the C0 configX registers through sysfs, but auxvec sounds cleaner IMO. Cheers James