From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17548 invoked by alias); 28 Mar 2005 10:36:23 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 17483 invoked from network); 28 Mar 2005 10:36:16 -0000 Received: from unknown (HELO imail.microdata-pos.de) (212.202.104.142) by sourceware.org with SMTP; 28 Mar 2005 10:36:16 -0000 Received: by imail.microdata-pos.de (Postfix, from userid 1033) id 4AE8A77E57; Mon, 28 Mar 2005 12:36:13 +0200 (CEST) Date: Mon, 28 Mar 2005 22:54:00 -0000 From: Jan-Benedict Glaw To: binutils@sources.redhat.com Subject: Disassemble CASEx assembler instructions Message-ID: <20050328123613.A17534@microdata-pos.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2005-03/txt/msg00820.txt.bz2 Hi! IIRC, the HP PA-RISC architecture also has a "case" instruction, like VAX has one, too. How could this be menaingful disassembled? Well, the PA-RISC backend seems to not recognize it (of I haven't really found the code...), but the VAX backend does -- quite suboptimal. Behing the initial CASEx instruction, there are a number of displacements (which were currently disassembled as instructions). As it seems, not a lot of ISAs actually know this type of instruction, so there's no generic code to handle the displacement table. These ideas come to mind: - Let the backend recognize that this is a CASEx opcode and return (as number of bytes disassembled) the CASEx opcode plus the size of the whole displacement table. This would basically dump the whole table in hex and disassembly would be correct after the table. - Implement higher-level knowledge of what's about to be disassembled. Then the backend could signal that there's a table of /n/ displacements of type /t/, which the backend in turn could disassemble displacement-for-displacement. The easy method of at least getting the disassembly of the remainder of the function correct would be at least to implement the first solution, which is additionally quite easy to implement. Comments? MfG, JBG -- AWEK microdata GmbH -- Am Wellbach 4 -- 33609 Bielefeld