From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18753 invoked by alias); 9 Aug 2004 18:44:33 -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 18746 invoked from network); 9 Aug 2004 18:44:32 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 9 Aug 2004 18:44:32 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i79IiWe1024948 for ; Mon, 9 Aug 2004 14:44:32 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i79IiUa27872; Mon, 9 Aug 2004 14:44:31 -0400 To: gdb-patches@sources.redhat.com Subject: PATCH: provide comments for PowerPC sim regno functions From: Jim Blandy Date: Mon, 09 Aug 2004 18:44:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-08/txt/msg00327.txt.bz2 Kevin requested these in: http://sources.redhat.com/ml/gdb-patches/2004-07/msg00338.html but I lost track of that in the shuffle. Here they are. 2004-08-09 Jim Blandy * rs6000-tdep.c (set_sim_regno, init_sim_regno_table, rs6000_register_sim_regno): Doc fixes. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.228 diff -c -p -c -p -F'^(' -r1.228 rs6000-tdep.c *** rs6000-tdep.c 4 Aug 2004 17:45:30 -0000 1.228 --- rs6000-tdep.c 9 Aug 2004 18:42:11 -0000 *************** ppc_floating_point_unit_p (struct gdbarc *** 192,197 **** --- 192,205 ---- && tdep->ppc_fpscr_regnum >= 0); } + + /* Check that TABLE[GDB_REGNO] is not already initialized, and then + set it to SIM_REGNO. + + This is a helper function for init_sim_regno_table, constructing + the table mapping GDB register numbers to sim register numbers; we + initialize every element in that table to -1 before we start + filling it in. */ static void set_sim_regno (int *table, int gdb_regno, int sim_regno) { *************** set_sim_regno (int *table, int gdb_regno *** 201,206 **** --- 209,218 ---- table[gdb_regno] = sim_regno; } + + /* Initialize ARCH->tdep->sim_regno, the table mapping GDB register + numbers to simulator register numbers, based on the values placed + in the ARCH->tdep->ppc_foo_regnum members. */ static void init_sim_regno_table (struct gdbarch *arch) { *************** init_sim_regno_table (struct gdbarch *ar *** 281,286 **** --- 293,301 ---- tdep->sim_regno = sim_regno; } + + /* Given a GDB register number REG, return the corresponding SIM + register number. */ static int rs6000_register_sim_regno (int reg) {