From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26300 invoked by alias); 31 Jul 2006 08:44:01 -0000 Received: (qmail 26289 invoked by uid 22791); 31 Jul 2006 08:44:00 -0000 X-Spam-Check-By: sourceware.org Received: from mailrelay1.uni-rostock.de (HELO antivirus.uni-rostock.de) (139.30.8.201) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 31 Jul 2006 08:43:58 +0000 Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 31 Jul 2006 10:43:54 +0200 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Content Technologies SMTPRS 4.3.20) with ESMTP id for ; Mon, 31 Jul 2006 10:43:54 +0200 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Mon, 31 Jul 2006 10:43:54 +0200 X-SCL: 3 55.91% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 31 Jul 2006 10:43:44 +0200 Received: from conversion-daemon.mail2.uni-rostock.de by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) id <0J3900D01EPFDV@mail.uni-rostock.de> (original mail from ronald.hecht@uni-rostock.de) for cgen@sourceware.org; Mon, 31 Jul 2006 10:43:44 +0200 (MEST) Received: from [139.30.201.25] (pike.e-technik.uni-rostock.de [139.30.201.25]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) with ESMTPS id <0J3900AOPEWHFU@mail.uni-rostock.de> for cgen@sourceware.org; Mon, 31 Jul 2006 10:43:29 +0200 (MEST) Date: Mon, 31 Jul 2006 08:44:00 -0000 From: Ronald Hecht Subject: Simulator and 24 Bit instructions To: cgen@sourceware.org Message-id: <44CDC354.9010502@uni-rostock.de> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT User-Agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501) X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2006-q3/txt/msg00014.txt.bz2 Hello, I'm having now problems with 24 Bit instructions in the simulator. I tracked down the issue to common/sim-trace.c. In sim_cgen_disassemble_insn() I found if (insn_bit_length <= 32) base_length = insn_bit_length; else base_length = min (cd->base_insn_bitsize, insn_bit_length); switch (base_length) { case 0 : return; /* fake insn, typically "compile" (aka "invalid") */ case 8 : insn_value = insn_buf.bytes[0]; break; case 16 : insn_value = T2H_2 (insn_buf.shorts[0]); break; case 32 : insn_value = T2H_4 (insn_buf.words[0]); break; default: abort (); } So 24 Bit instructions are a problem. I hacked case 24 : insn_value = (T2H_4 (insn_buf.words[0]) / 256) & 0x00ffffff; break; and it works for me. But I think this might be a problem on big endian machines or is this hack ok? Thanks in advance Ronald