From: Michael Snyder <msnyder@redhat.com>
To: gdb-patches@sources.redhat.com
Cc: Elena Zannoni <ezannoni@redhat.com>,
Joern Rennecke <joern.rennecke@superh.com>
Subject: [PATCH] sh64-tdep: clean up unused variables.
Date: Wed, 12 Nov 2003 23:57:00 -0000 [thread overview]
Message-ID: <3FB2C8EA.6020006@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
This simply removes a bunch of gdbarch_tdep variables that are
initialized by a function call but never used.
[-- Attachment #2: diff2 --]
[-- Type: text/plain, Size: 5833 bytes --]
2003-11-12 Michael Snyder <msnyder@redhat.com>
* sh64-tdep.c (translate_insn_rn, is_media_pseudo,
sh64_media_reg_base_num, sh64_compact_reg_base_num,
sh64_nofp_frame_init_saved_regs, sh64_push_arguments,
sh64_extract_return_value, sh64_show_media_regs,
sh64_show_compact_regs, sh_sh64_register_byte, sh64_register_type,
sh_sh64_register_convert_to_virtual, sh_sh64_register_convert_to_raw,
sh64_pseudo_register_read, sh64_pseudo_register_write,
sh64_do_pseudo_register, sh_compact_print_registers_info):
Delete unused variable 'tdep'.
Index: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -p -w -b -r1.13 -r1.14
*** sh64-tdep.c 12 Nov 2003 22:12:59 -0000 1.13
--- sh64-tdep.c 12 Nov 2003 22:45:41 -0000 1.14
*************** gdb_print_insn_sh (bfd_vma memaddr, disa
*** 706,713 ****
static int
translate_insn_rn (int rn, int media_mode)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
/* FIXME: this assumes that the number rn is for a not pseudo
register only. */
if (media_mode)
--- 706,711 ----
*************** fpp_reg_base_num (int fpp_regnum)
*** 829,838 ****
static int
is_media_pseudo (int rn)
{
! struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
!
! return (rn >= DR0_REGNUM
! && rn <= FV_LAST_REGNUM);
}
static int
--- 827,833 ----
static int
is_media_pseudo (int rn)
{
! return (rn >= DR0_REGNUM && rn <= FV_LAST_REGNUM);
}
static int
*************** static int
*** 845,851 ****
sh64_media_reg_base_num (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
--- 840,845 ----
*************** static int
*** 928,934 ****
sh64_compact_reg_base_num (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* general register N maps to general register N */
if (reg_nr >= R0_C_REGNUM
--- 922,927 ----
*************** sh64_push_arguments (int nargs, struct v
*** 1496,1502 ****
int len;
int argreg_size;
int fp_args[12];
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
memset (fp_args, 0, sizeof (fp_args));
--- 1490,1495 ----
*************** sh64_extract_return_value (struct type *
*** 1669,1675 ****
int offset;
int return_register;
int len = TYPE_LENGTH (type);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
--- 1662,1667 ----
*************** static void
*** 1769,1775 ****
sh64_show_media_regs (void)
{
int i;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
printf_filtered ("PC=%s SR=%016llx \n",
paddr (read_register (PC_REGNUM)),
--- 1761,1766 ----
*************** static void
*** 1808,1814 ****
sh64_show_compact_regs (void)
{
int i;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
printf_filtered ("PC=%s \n",
paddr (read_register (PC_C_REGNUM)));
--- 1799,1804 ----
*************** static int
*** 1930,1936 ****
sh_sh64_register_byte (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* If it is a pseudo register, get the number of the first floating
point register that is part of it. */
--- 1920,1925 ----
*************** sh_sh64_build_float_register_type (int h
*** 2026,2033 ****
static struct type *
sh64_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if ((reg_nr >= FP0_REGNUM
&& reg_nr <= FP_LAST_REGNUM)
|| (reg_nr >= FP0_C_REGNUM
--- 2015,2020 ----
*************** static void
*** 2059,2066 ****
sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
/* It is a no-op. */
--- 2046,2051 ----
*************** static void
*** 2086,2093 ****
sh_sh64_register_convert_to_raw (struct type *type, int regnum,
const void *from, void *to)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
/* It is a no-op. */
--- 2071,2076 ----
*************** sh64_pseudo_register_read (struct gdbarc
*** 2116,2122 ****
int portion;
int offset = 0;
char temp_buffer[MAX_REGISTER_SIZE];
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
--- 2099,2104 ----
*************** sh64_pseudo_register_write (struct gdbar
*** 2285,2291 ****
int base_regnum, portion;
int offset;
char temp_buffer[MAX_REGISTER_SIZE];
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
--- 2267,2272 ----
*************** static void
*** 2600,2606 ****
sh64_do_pseudo_register (int regnum)
{
/* All the sh64-compact mode registers are pseudo registers. */
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (regnum < NUM_REGS
|| regnum >= NUM_REGS + NUM_PSEUDO_REGS_SH_MEDIA + NUM_PSEUDO_REGS_SH_COMPACT)
--- 2581,2586 ----
*************** sh_print_registers_info (struct gdbarch
*** 2735,2741 ****
static void
sh_compact_do_registers_info (int regnum, int fpregs)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (regnum != -1) /* do one specified register */
{
if (*(REGISTER_NAME (regnum)) == '\0')
--- 2715,2720 ----
next reply other threads:[~2003-11-12 23:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-12 23:57 Michael Snyder [this message]
2003-11-13 1:49 ` Elena Zannoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FB2C8EA.6020006@redhat.com \
--to=msnyder@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=joern.rennecke@superh.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox