aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-11-14 21:20:12 +0000
committerJohn Gilmore <gnu@cygnus>1991-11-14 21:20:12 +0000
commit430923f3fa448bb555c0273d9d66260fb5c59308 (patch)
treef574d9676cf6e6aec7db01212f9270e090629a83 /gdb
parent9dd0e793d765a1b9fcfce1a4ca462f7cd61ddee2 (diff)
downloadgdb-430923f3fa448bb555c0273d9d66260fb5c59308.zip
gdb-430923f3fa448bb555c0273d9d66260fb5c59308.tar.gz
gdb-430923f3fa448bb555c0273d9d66260fb5c59308.tar.bz2
* m88k-tdep.c (examine_prologue): Deal with OR instructions
that shuffle parameters into other regs. * symtab.c (decode_line_1): Fix bug introduced in Per's change of Nov 12th.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/m88k-tdep.c28
2 files changed, 35 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 48662d5..a80c8e2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+Thu Nov 14 13:18:25 1991 John Gilmore (gnu at cygnus.com)
+
+ * m88k-tdep.c (examine_prologue): Deal with OR instructions
+ that shuffle parameters into other regs.
+ * symtab.c (decode_line_1): Fix bug introduced in Per's change
+ of Nov 12th.
+
Wed Nov 13 19:51:11 1991 Steve Chamberlain (sac at cygnus.com)
* Makefile.in, xconfig/delta88 made it install a sysV manual page;
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 6d0ca84..65e39f6 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -152,6 +152,8 @@ init_frame_pc (fromleaf, prev)
(addu r30,r31,n)? # frame pointer update
(pic sequence)? # PIC code prologue
+
+ (or rn,rm,0)? # Move parameters to other regs
*/
/* Macros for extracting fields from instructions. */
@@ -333,6 +335,32 @@ examine_prologue (ip, limit, frame_sp, fsr, fi)
next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
}
+ /* Accept moves of parameter registers to other registers, using
+ "or rd,rs,0" or "or.u rd,rs,0" or "or rd,r0,rs" or "or rd,rs,r0".
+ We don't have to worry about walking into the first lines of code,
+ since the first line number will stop us (assuming we have symbols).
+ What gcc actually seems to produce is "or rd,r0,rs". */
+
+#define OR_MOVE_INSN 0x58000000 /* or/or.u with immed of 0 */
+#define OR_MOVE_MASK 0xF800FFFF
+#define OR_REG_MOVE1_INSN 0xF4005800 /* or rd,r0,rs */
+#define OR_REG_MOVE1_MASK 0xFC1FFFE0
+#define OR_REG_MOVE2_INSN 0xF4005800 /* or rd,rs,r0 */
+#define OR_REG_MOVE2_MASK 0xFC00FFFF
+ while (next_ip &&
+ ((insn1 & OR_MOVE_MASK) == OR_MOVE_INSN ||
+ (insn1 & OR_REG_MOVE1_MASK) == OR_REG_MOVE1_INSN ||
+ (insn1 & OR_REG_MOVE2_MASK) == OR_REG_MOVE2_INSN
+ )
+ )
+ {
+ /* We don't care what moves to where. The result of the moves
+ has already been reflected in what the compiler tells us is the
+ location of these parameters. */
+ ip = next_ip;
+ next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+ }
+
/* We're done with the prologue. If we don't care about the stack
frame itself, just return. (Note that fsr->regs has been trashed,
but the one caller who calls with fi==0 passes a dummy there.) */