From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7407 invoked by alias); 10 Feb 2004 07:39:55 -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 7337 invoked from network); 10 Feb 2004 07:39:53 -0000 Received: from unknown (HELO mail04.idc.renesas.com) (202.234.163.13) by sources.redhat.com with SMTP; 10 Feb 2004 07:39:53 -0000 Received: (from root@localhost) by guardian03.idc.renesas.com with id i1A7dlPQ016924; Tue, 10 Feb 2004 16:39:47 +0900 (JST) Received: from unknown [172.20.8.73] by guardian03.idc.renesas.com with SMTP id SAA16923 ; Tue, 10 Feb 2004 16:39:47 +0900 Received: from dnma02 (dnma02.rso.renesas.com [10.15.11.200]) by dnma01.rso.renesas.com (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0HSU000CYYM928@dnma01.rso.renesas.com>; Tue, 10 Feb 2004 16:39:45 +0900 (JST) Received: from renesas.com ([10.145.105.94]) by dnma02.rso.renesas.com (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0HSU00C3RYM9PT@dnma02.rso.renesas.com>; Tue, 10 Feb 2004 16:39:45 +0900 (JST) Date: Tue, 10 Feb 2004 07:39:00 -0000 From: Kazuhiro Inaoka Subject: [PATCH] m32r-*-gdb outputs wrong dissassemble codes for 0x*2 addresses. To: cgen@sources.redhat.com Cc: binutils@sources.redhat.com, gdb-patches@sources.redhat.com Message-id: <40288ABC.5090208@renesas.com> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_IaeDmzMlciZqjt6smvZwdw)" User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.2.1) Gecko/20030225 X-SW-Source: 2004-q1/txt/msg00013.txt.bz2 This is a multi-part message in MIME format. --Boundary_(ID_IaeDmzMlciZqjt6smvZwdw) Content-type: text/plain; charset=ISO-2022-JP Content-transfer-encoding: 7BIT Content-length: 596 Hello, This is a patch to fix the following bug. gdb outputs wrong disassemble codes for 0x*2 addresses. (gdb) x/i 0x100 0x100 <__init>: push fp -> push lr (gdb) x/i 0x102 0x102 <__init+2>: -> st r6,@r0 <== NG Please commit it and regenerate opcodes/m32r-dis.c. Regards, Kazuhiro Inaoka cgen/ChangeLog 2004-02-10 Kazuhiro Inaoka < inaoka dot kazuhiro at renesas dot com > * cpu/m32r.opc (my_print_insn): Fixed gdb outputs wrong disassemble codes for 0x*2 addresses. opcodes/ChangeLog 2004-02-10 Kazuhiro Inaoka < inaoka dot kazuhiro at renesas dot com > * m32r-dis.c: Regenerate. --Boundary_(ID_IaeDmzMlciZqjt6smvZwdw) Content-type: text/plain; name=m32r.opc.patch Content-transfer-encoding: 7BIT Content-disposition: inline; filename=m32r.opc.patch Content-length: 1547 Index: m32r.opc =================================================================== RCS file: /cvs/src/src/cgen/cpu/m32r.opc,v retrieving revision 1.4 diff -c -r1.4 m32r.opc *** m32r.opc 3 Dec 2003 17:38:50 -0000 1.4 --- m32r.opc 10 Feb 2004 07:14:02 -0000 *************** *** 273,279 **** /* Read the base part of the insn. */ ! status = (*info->read_memory_func) (pc, buf, buflen, info); if (status != 0) { (*info->memory_error_func) (status, pc, info); --- 273,280 ---- /* Read the base part of the insn. */ ! status = (*info->read_memory_func) (pc - ((!big_p && (pc & 3) != 0) ? 2 : 0), ! buf, buflen, info); if (status != 0) { (*info->memory_error_func) (status, pc, info); *************** *** 286,298 **** return print_insn (cd, pc, info, buf, buflen); /* Print the first insn. */ - buf += (big_p ? 0 : 2); if ((pc & 3) == 0) { if (print_insn (cd, pc, info, buf, 2) == 0) (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG); } - buf += (big_p ? 2 : -2); x = (big_p ? &buf[0] : &buf[1]); if (*x & 0x80) --- 287,299 ---- return print_insn (cd, pc, info, buf, buflen); /* Print the first insn. */ if ((pc & 3) == 0) { + buf += (big_p ? 0 : 2); if (print_insn (cd, pc, info, buf, 2) == 0) (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG); + buf += (big_p ? 2 : -2); } x = (big_p ? &buf[0] : &buf[1]); if (*x & 0x80) --Boundary_(ID_IaeDmzMlciZqjt6smvZwdw)--