From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15003 invoked by alias); 19 Feb 2003 00:12:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14996 invoked from network); 19 Feb 2003 00:12:36 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 19 Feb 2003 00:12:36 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id CC1CC2E68; Tue, 18 Feb 2003 19:17:23 -0500 (EST) Message-ID: <3E52CD13.30809@redhat.com> Date: Wed, 19 Feb 2003 00:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.0.2) Gecko/20030217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com, Kevin Buettner , Nick Clifton Subject: Re: RFA: Allow set/display of e500 accumulator and status registers. References: <3E00DE98.90807@redhat.com> Content-Type: multipart/mixed; boundary="------------090001020702070605040708" X-SW-Source: 2003-02/txt/msg00393.txt.bz2 This is a multi-part message in MIME format. --------------090001020702070605040708 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 7 Kevin? --------------090001020702070605040708 Content-Type: message/rfc822; name="mailbox-message://ac131313@movemail/fsf/gdb/patches#31187198" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mailbox-message://ac131313@movemail/fsf/gdb/patches#31187198" Content-length: 6266 X-Mozilla-Status2: 10000000 Return-Path: Delivered-To: ac131313@localhost.redhat.com Received: from localhost (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id B324C3DB8 for ; Wed, 18 Dec 2002 20:52:11 +0000 (GMT) Envelope-to: cagney@gnu.org Delivery-date: Wed, 18 Dec 2002 15:47:38 -0500 Received: from fencepost.gnu.org by localhost with IMAP (fetchmail-5.9.13) for ac131313@localhost (single-drop); Wed, 18 Dec 2002 20:52:11 +0000 (GMT) Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 18Ol6Q-0003Tj-00 for cagney@gnu.org; Wed, 18 Dec 2002 15:47:38 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Ol6K-0003pD-00 for cagney@gnu.org; Wed, 18 Dec 2002 15:47:33 -0500 Received: from [209.249.29.67] (helo=sources.redhat.com) by monty-python.gnu.org with smtp (Exim 4.10.13) id 18Ol6J-0003jl-00 for cagney@gnu.org; Wed, 18 Dec 2002 15:47:32 -0500 Received: (qmail 12524 invoked by alias); 18 Dec 2002 20:46:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Delivered-To: mailing list gdb-patches@sources.redhat.com Received: (qmail 12465 invoked from network); 18 Dec 2002 20:46:32 -0000 Received: from unknown (HELO localhost.redhat.com) (195.224.55.237) by 209.249.29.67 with SMTP; 18 Dec 2002 20:46:32 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0E8D93D7F; Wed, 18 Dec 2002 20:46:17 +0000 (GMT) Message-ID: <3E00DE98.90807@redhat.com> Date: Wed, 18 Dec 2002 20:46:16 +0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com, Kevin Buettner Cc: Nick Clifton Subject: Re: RFA: Allow set/display of e500 accumulator and status registers. References: Content-Type: multipart/mixed; boundary="------------080308090001040108070003" X-Spam-Status: No, hits=-0.4 required=5.0 tests=FROM_ENDS_IN_NUMS,MAILTO_TO_SPAM_ADDR,PATCH_UNIFIED_DIFF, REFERENCES,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_MOZILLA_UA,X_ACCEPT_LANG version=2.41 X-Spam-Level: This is a multi-part message in MIME format. --------------080308090001040108070003 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 128 FYI, Attatched is an update to the patch to add "acc" and "spefscr" registers. The "acc" wasn't the correct size. ok? Andrew --------------080308090001040108070003 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2936 2002-12-18 Andrew Cagney * rs6000-tdep.c: Include "gdb_assert.h". (registers_e500): Add "acc" and "spefscr". (PPC_GPRS_PSEUDO_REGS): Remove trailing comma. (rs6000_gdbarch_init): Update initialization of ppc_gp0_regnum, ppc_gplast_regnum, sp_regnum and fp_regnum. Check that gp0_regnum really is "r0". (registers_e500): Mark the "acc" as a 64 bit (from Jim Willson). Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.100 diff -u -r1.100 rs6000-tdep.c --- rs6000-tdep.c 18 Dec 2002 15:23:22 -0000 1.100 +++ rs6000-tdep.c 18 Dec 2002 20:41:37 -0000 @@ -46,6 +46,8 @@ #include "solib-svr4.h" #include "ppc-tdep.h" +#include "gdb_assert.h" + /* If the kernel has to deliver a signal, it pushes a sigcontext structure on the stack and then calls the signal handler, passing the address of the sigcontext in an argument register. Usually @@ -2281,7 +2283,7 @@ /* 0 */ P(r0), P(r1), P(r2), P(r3), P(r4), P(r5), P(r6), P(r7), \ /* 8 */ P(r8), P(r9), P(r10),P(r11),P(r12),P(r13),P(r14),P(r15), \ /* 16 */ P(r16),P(r17),P(r18),P(r19),P(r20),P(r21),P(r22),P(r23), \ - /* 24 */ P(r24),P(r25),P(r26),P(r27),P(r28),P(r29),P(r30),P(r31), \ + /* 24 */ P(r24),P(r25),P(r26),P(r27),P(r28),P(r29),P(r30),P(r31) /* IBM POWER (pre-PowerPC) architecture, user-level view. We only cover user-level SPR's. */ @@ -2460,6 +2462,9 @@ PPC_UISA_NOFP_SPRS, /* 7...38 */ PPC_EV_REGS, + R8(acc), R(spefscr), + /* NOTE: Add new registers here the end of the raw register + list and just before the first pseudo register. */ /* 39...70 */ PPC_GPRS_PSEUDO_REGS }; @@ -2816,8 +2821,8 @@ tdep->ppc_ev31_regnum = -1; break; case bfd_mach_ppc_e500: - tdep->ppc_gp0_regnum = 39; - tdep->ppc_gplast_regnum = 70; + tdep->ppc_gp0_regnum = 41; + tdep->ppc_gplast_regnum = tdep->ppc_gp0_regnum + 32 - 1; tdep->ppc_toc_regnum = -1; tdep->ppc_ps_regnum = 1; tdep->ppc_cr_regnum = 2; @@ -2827,8 +2832,8 @@ tdep->ppc_ev0_regnum = 7; tdep->ppc_ev31_regnum = 38; set_gdbarch_pc_regnum (gdbarch, 0); - set_gdbarch_sp_regnum (gdbarch, 40); - set_gdbarch_fp_regnum (gdbarch, 40); + set_gdbarch_sp_regnum (gdbarch, tdep->ppc_gp0_regnum + 1); + set_gdbarch_fp_regnum (gdbarch, tdep->ppc_gp0_regnum + 1); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, e500_dwarf2_reg_to_regnum); set_gdbarch_pseudo_register_read (gdbarch, e500_pseudo_register_read); set_gdbarch_pseudo_register_write (gdbarch, e500_pseudo_register_write); @@ -2842,6 +2847,9 @@ tdep->ppc_ev31_regnum = -1; break; } + + /* Sanity check on registers. */ + gdb_assert (strcmp (tdep->regs[tdep->ppc_gp0_regnum].name, "r0") == 0); /* Set lr_frame_offset. */ if (wordsize == 8) --------------080308090001040108070003-- --------------090001020702070605040708--