* [rfa/ppc] correctly bias alloca_reg
@ 2002-10-01 19:58 Andrew Cagney
2002-10-02 9:18 ` Kevin Buettner
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2002-10-01 19:58 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
Hello,
The attached patch fixes the regnum value assigned to alloca_reg so that
it is baised by gpr0's regnum value The code was assuming that GPR 32,
for instance had a regnum of 31 :-(
It fixes the failure:
gdb.base/call-ar-st.exp: check args of sum_array_print
for the e500.
ok?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1321 bytes --]
2002-10-01 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.86
diff -u -r1.86 rs6000-tdep.c
--- rs6000-tdep.c 1 Oct 2002 14:57:55 -0000 1.86
+++ rs6000-tdep.c 2 Oct 2002 02:46:32 -0000
@@ -465,6 +465,7 @@
int prev_insn_was_prologue_insn = 1;
int num_skip_non_prologue_insns = 0;
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* Attempt to find the end of the prologue when no limit is specified.
Note that refine_prologue_limit() has been written so that it may
@@ -694,7 +695,7 @@
{ /* mr r31, r1 */
fdata->frameless = 0;
framep = 1;
- fdata->alloca_reg = 31;
+ fdata->alloca_reg = (tdep->ppc_gp0_regnum + 31);
continue;
/* Another way to set up the frame pointer. */
@@ -703,7 +704,8 @@
{ /* addi rX, r1, 0x0 */
fdata->frameless = 0;
framep = 1;
- fdata->alloca_reg = (op & ~0x38010000) >> 21;
+ fdata->alloca_reg = (tdep->ppc_gp0_regnum
+ + ((op & ~0x38010000) >> 21));
continue;
}
/* AltiVec related instructions. */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-02 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-01 19:58 [rfa/ppc] correctly bias alloca_reg Andrew Cagney
2002-10-02 9:18 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox