public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] xtensa: fix access to the last pseudo register
@ 2015-05-17 23:12 Max Filippov
  2015-05-27  2:11 ` Max Filippov
  2015-05-27 10:16 ` Pedro Alves
  0 siblings, 2 replies; 7+ messages in thread
From: Max Filippov @ 2015-05-17 23:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: Maxim Grigoriev, Woody LaRue, Marc Gauthier, Max Filippov

Currently access to the last pseudo register is aliased to a1. This is
done by little snippets in the beginning of xtensa_pseudo_register_read
and xtensa_pseudo_register_write that used to do such aliasing for FP
register since bdb4c075a29dd086f0868b394b488b1c94666be6, but then
FP_ALIAS was expanded into gdbarch_num_regs (current_gdbarch) +
gdbarch_num_pseudo_regs (current_gdbarch) (one register past the last
pseudo register) in 304fe2552d6e0821e8fdb7575f8e7ba6607a076d, which
then was changed to the last pseudo register in
94a0e877111421d300d26b858bd3a0a27078d1e8.

Drop these snippets.

2015-05-18  Max Filippov  <jcmvbkbc@gmail.com>
gdb/
	* xtensa-tdep.c (xtensa_pseudo_register_read)
	(xtensa_pseudo_register_write): Don't alias last pseudo register
	to a1.
---
 gdb/xtensa-tdep.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index a66d00a..55e7d98 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -553,10 +553,6 @@ xtensa_pseudo_register_read (struct gdbarch *gdbarch,
   DEBUGTRACE ("xtensa_pseudo_register_read (... regnum = %d (%s) ...)\n",
 	      regnum, xtensa_register_name (gdbarch, regnum));
 
-  if (regnum == gdbarch_num_regs (gdbarch)
-		+ gdbarch_num_pseudo_regs (gdbarch) - 1)
-     regnum = gdbarch_tdep (gdbarch)->a0_base + 1;
-
   /* Read aliases a0..a15, if this is a Windowed ABI.  */
   if (gdbarch_tdep (gdbarch)->isa_use_windowed_registers
       && (regnum >= gdbarch_tdep (gdbarch)->a0_base)
@@ -653,10 +649,6 @@ xtensa_pseudo_register_write (struct gdbarch *gdbarch,
   DEBUGTRACE ("xtensa_pseudo_register_write (... regnum = %d (%s) ...)\n",
 	      regnum, xtensa_register_name (gdbarch, regnum));
 
-  if (regnum == gdbarch_num_regs (gdbarch)
-		+ gdbarch_num_pseudo_regs (gdbarch) -1)
-     regnum = gdbarch_tdep (gdbarch)->a0_base + 1;
-
   /* Renumber register, if aliase a0..a15 on Windowed ABI.  */
   if (gdbarch_tdep (gdbarch)->isa_use_windowed_registers
       && (regnum >= gdbarch_tdep (gdbarch)->a0_base)
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-29 10:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-17 23:12 [PATCH] xtensa: fix access to the last pseudo register Max Filippov
2015-05-27  2:11 ` Max Filippov
2015-05-27 10:16 ` Pedro Alves
2015-05-27 10:55   ` Max Filippov
2015-05-27 15:13     ` Marc Gauthier
2015-05-29  9:40     ` Pedro Alves
2015-05-29 10:36       ` Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).