From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvHRk-0001CP-9Q for qemu-devel@nongnu.org; Wed, 29 Oct 2008 16:15:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvHRi-0001Bl-TH for qemu-devel@nongnu.org; Wed, 29 Oct 2008 16:15:16 -0400 Received: from [199.232.76.173] (port=48766 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvHRi-0001Bh-LI for qemu-devel@nongnu.org; Wed, 29 Oct 2008 16:15:14 -0400 Received: from wf-out-1314.google.com ([209.85.200.168]:29190) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvHRi-0004l4-HH for qemu-devel@nongnu.org; Wed, 29 Oct 2008 16:15:14 -0400 Received: by wf-out-1314.google.com with SMTP id 27so165044wfd.4 for ; Wed, 29 Oct 2008 13:15:12 -0700 (PDT) Message-ID: Date: Wed, 29 Oct 2008 22:06:59 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH][RFC] Run time TCGv size check for debugging In-Reply-To: <200810291953.09085.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200810291953.09085.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On 10/29/08, Paul Brook wrote: > On Wednesday 29 October 2008, Blue Swirl wrote: > > Hi, > > > > When emulating a mixed 32/64 bit Qemu target CPUs it's easy to confuse > > the TCGv size, passing 32 bit TCGv to a function expecting a 64 bit > > one and vice versa. This patch adds a run time sanity check for TCGv > > sizes. > > > Would it make more sense to push these down into tcg_gen_op* ? How? At that point we don't know what was the correct size. > tcg-op.h is already fairly unwieldy. True, and as debugging TCGv will not be common, I'm not sure whether the patch is worth committing. > I wonder if it's worth adding TCG_LOW to enable checking on 32-bit hosts. > > For futureproofing I'd name things FOO_I32 rather than FOO_32. Good point, will fix.