From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15585 invoked by alias); 11 Sep 2010 16:34:24 -0000 Received: (qmail 15485 invoked by uid 22791); 11 Sep 2010 16:34:23 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,NO_DNS_FOR_FROM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Sep 2010 16:34:16 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 11 Sep 2010 09:34:15 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga002.fm.intel.com with ESMTP; 11 Sep 2010 09:34:15 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 18DBA207F1; Sat, 11 Sep 2010 09:34:15 -0700 (PDT) Date: Sun, 12 Sep 2010 13:31:00 -0000 From: "H.J. Lu" To: GDB Subject: PATCH: Remove amd64_register_name Message-ID: <20100911163414.GA7422@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00239.txt.bz2 Hi, amd64_register_name is the same as i386_register_name. There is no need for it. This patch removes it. Tested on Linux/x86-64 and Linux/x86-64 with AVX. OK to install? Thanks. H.J. --- 2010-09-11 H.J. Lu * amd64-tdep.c (amd64_register_name): Removed. (amd64_init_abi): Don't call set_gdbarch_register_name. * i386-tdep.c (i386_ymmh_regnum_p): Make it static. * i386-tdep.h (i386_ymmh_regnum_p): Removed. diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 9feed90..5472db1 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -257,19 +257,6 @@ static const char *amd64_dword_names[] = "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }; -/* Return the name of register REGNUM, or the empty string if it is - an anonymous register. */ - -static const char * -amd64_register_name (struct gdbarch *gdbarch, int regnum) -{ - /* Hide the upper YMM registers. */ - if (i386_ymmh_regnum_p (gdbarch, regnum)) - return ""; - - return tdesc_register_name (gdbarch, regnum); -} - /* Return the name of register REGNUM. */ static const char * @@ -2407,8 +2394,6 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_tdesc_pseudo_register_name (gdbarch, amd64_pseudo_register_name); - set_gdbarch_register_name (gdbarch, amd64_register_name); - /* AMD64 has an FPU and 16 SSE registers. */ tdep->st0_regnum = AMD64_ST0_REGNUM; tdep->num_xmm_regs = 16; diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 435b623..ea282a7 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -165,7 +165,7 @@ i386_dword_regnum_p (struct gdbarch *gdbarch, int regnum) return regnum >= 0 && regnum < tdep->num_dword_regs; } -int +static int i386_ymmh_regnum_p (struct gdbarch *gdbarch, int regnum) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 49e0727..4d0bae7 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -307,7 +307,6 @@ extern int i386_word_regnum_p (struct gdbarch *gdbarch, int regnum); extern int i386_dword_regnum_p (struct gdbarch *gdbarch, int regnum); extern int i386_xmm_regnum_p (struct gdbarch *gdbarch, int regnum); extern int i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum); -extern int i386_ymmh_regnum_p (struct gdbarch *gdbarch, int regnum); extern const char *i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum);