From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18695 invoked by alias); 25 Jan 2007 20:30:28 -0000 Received: (qmail 18687 invoked by uid 22791); 25 Jan 2007 20:30:27 -0000 X-Spam-Check-By: sourceware.org Received: from Unknown (HELO elsdt-razorfish.arc.com) (194.202.198.226) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 25 Jan 2007 20:30:20 +0000 Received: from elsdt-razorfish.arc.com (localhost.localdomain [127.0.0.1]) by elsdt-razorfish.arc.com (8.12.11.20060308/8.12.11) with ESMTP id l0PKUB0O008180; Thu, 25 Jan 2007 20:30:11 GMT Received: (from joernr@localhost) by elsdt-razorfish.arc.com (8.12.11.20060308/8.12.11/Submit) id l0PKUBpq008178; Thu, 25 Jan 2007 20:30:11 GMT Date: Thu, 25 Jan 2007 20:30:00 -0000 From: Joern Rennecke To: "Frank Ch. Eigler" Cc: cgen@sources.redhat.com Subject: Re: CGEN_DIS_HASH: how to get endianness and/or instruction size? Message-ID: <20070125203011.GB18395@elsdt-razorfish.arc.com> References: <20070125142036.GA18395@elsdt-razorfish.arc.com> <20070125145950.GA30933@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070125145950.GA30933@redhat.com> User-Agent: Mutt/1.4.1i Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2007-q1/txt/msg00026.txt.bz2 On Thu, Jan 25, 2007 at 09:59:50AM -0500, Frank Ch. Eigler wrote: > Use the "value" parameter (a host-endian copy of the "base insn") > rather than the "buffer" parameter. > > > If I want to use the passed instruction value, I need to know what > > size it is. [...] > > See m32r_cgen_dis_hash: a hand-written baby insn classifier routine. I've seen that, but it assumes that if the top 16 its are zero, the instruction can be hashed as a 16 bit instruction. That is not the case for ARCompact. Branch Conditionally is a 32 bit instuction can have all the top 16 bits zeroed, and its bottom 16 bits are all operand. > It is important to realize though that this disassembler hashing > widget is strictly an optimization. You can try hard-coding the hash > value to 0 like some other cgen platforms, and see if the performance > is bearable. I can only verify this positively when I've completely finished the port so that other people can use it...