Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: gdb-patches@sourceware.org
Subject: Fix decoding in m68k_analyze_register_saves
Date: Sat, 09 Sep 2006 23:10:00 -0000	[thread overview]
Message-ID: <je3bb0ocuv.fsf@sykes.suse.de> (raw)

Fix decoding of `move.l %R,-(%sp)' during prologue analyzing.  Tested on
m68k-linux.

Andreas.

2006-09-10  Andreas Schwab  <schwab@suse.de>

	* m68k-tdep.c (m68k_analyze_register_saves): Fix decoding of
	`move.l %R,-(%sp)'.

Index: gdb/m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -a -p -u -p -a -r1.107 -r1.108
--- gdb/m68k-tdep.c	13 Jul 2006 09:30:46 -0000	1.107
+++ gdb/m68k-tdep.c	9 Sep 2006 23:07:32 -0000	1.108
@@ -1,7 +1,7 @@
 /* Target-dependent code for the Motorola 68000 series.
 
    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -677,10 +677,10 @@ m68k_analyze_register_saves (CORE_ADDR p
 	      else
 		break;
 	    }
-	  else if ((op & 0170677) == P_MOVEL_SP)
+	  else if ((op & 0177760) == P_MOVEL_SP)
 	    {
 	      /* move.l %R,-(%sp) */
-	      regno = ((op & 07000) >> 9) | ((op & 0100) >> 3);
+	      regno = op & 017;
 	      cache->saved_regs[regno] = offset;
 	      offset -= 4;
 	      pc += 2;

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


                 reply	other threads:[~2006-09-09 23:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=je3bb0ocuv.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=gdb-patches@sourceware.org \
    /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