From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4192 invoked by alias); 4 Nov 2002 12:42:04 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 4156 invoked from network); 4 Nov 2002 12:42:03 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 4 Nov 2002 12:42:03 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gA4CJdw10535 for ; Mon, 4 Nov 2002 07:19:39 -0500 Received: from hypatia.brisbane.redhat.com (IDENT:root@hypatia.brisbane.redhat.com [172.16.5.3]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gA4Cg1f04033; Mon, 4 Nov 2002 07:42:01 -0500 Received: from scooby.brisbane.redhat.com (scooby.brisbane.redhat.com [172.16.5.228]) by hypatia.brisbane.redhat.com (8.11.6/8.11.6) with ESMTP id gA4CXF310414; Mon, 4 Nov 2002 22:33:15 +1000 Received: by scooby.brisbane.redhat.com (Postfix, from userid 500) id 344DE11630; Mon, 4 Nov 2002 23:33:15 +1100 (EST) To: "Michael Chapman" Cc: Subject: Re: Disassembly of instruction with 4 bit opcode References: Content-Type: text/plain; charset=US-ASCII From: Ben Elliston Date: Mon, 04 Nov 2002 04:42:00 -0000 In-Reply-To: "Michael Chapman"'s message of "Mon, 4 Nov 2002 13:19:28 +0100" Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 X-SW-Source: 2002-q4/txt/msg00022.txt.bz2 Hi Michael, >>>>> "Michael" == Michael Chapman writes: Michael> The problem is with the "call" instructions which use only Michael> 4 bits of the opcode using the remained for the address. Michael> Everything is strictly little endian with the opcode always Michael> appearing in the least significant 8 bits (or 4 bits in the Michael> case of call) of the instruction. When I dissassemble the Michael> following (listing output from the assembler) [...] Michael> 10: cc 00 *unknown* Investigate using something like this in your .opc file: /* Override disassembly hashing - there are variable bits in the top byte of these instructions. */ #define CGEN_DIS_HASH_SIZE 8 #define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 5) % CGEN_DIS_HASH_SIZE) Cheers, Ben