From: Richard Henderson <rth@twiddle.net>
To: gdb-patches@sources.redhat.com
Cc: cagney@redhat.com
Subject: [committed] store sp in alpha_push_dummy_call
Date: Sun, 01 Jun 2003 18:13:00 -0000 [thread overview]
Message-ID: <20030601181300.GA4357@twiddle.net> (raw)
Apparently, push_dummy_call is expected to update the sp:
/* NOTE: cagney/2003-03-23: Disable this code when there is a
push_dummy_call() method. Since that method will have already
stored the stack pointer (as part of creating the fake call
frame), and none of the code following that code adjusts the
stack-pointer value, the below call is entirely redundant. */
if (DEPRECATED_DUMMY_WRITE_SP_P ())
DEPRECATED_DUMMY_WRITE_SP (sp);
Andrew, you have the same problem in your mips push_dummy_call
routines, from which I was pattern matching.
r~
* alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies
from arg_reg_buffer to regcache to avoid double conversion.
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.89
diff -c -p -d -r1.89 alpha-tdep.c
*** alpha-tdep.c 1 Jun 2003 16:02:50 -0000 1.89
--- alpha-tdep.c 1 Jun 2003 17:00:25 -0000
*************** alpha_push_dummy_call (struct gdbarch *g
*** 314,326 ****
/* Load the argument registers. */
for (i = 0; i < required_arg_regs; i++)
{
! LONGEST val;
!
! val = extract_unsigned_integer (arg_reg_buffer + i*ALPHA_REGISTER_SIZE,
! ALPHA_REGISTER_SIZE);
! regcache_cooked_write_signed (regcache, ALPHA_A0_REGNUM + i, val);
! regcache_cooked_write_signed (regcache, ALPHA_FPA0_REGNUM + i, val);
}
return sp;
}
--- 314,327 ----
/* Load the argument registers. */
for (i = 0; i < required_arg_regs; i++)
{
! regcache_cooked_write (regcache, ALPHA_A0_REGNUM + i,
! arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
! regcache_cooked_write (regcache, ALPHA_FPA0_REGNUM + i,
! arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
}
+
+ /* Finally, update the stack pointer. */
+ regcache_cooked_write_signed (regcache, ALPHA_SP_REGNUM, sp);
return sp;
}
next reply other threads:[~2003-06-01 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-01 18:13 Richard Henderson [this message]
2003-06-01 18:24 ` Andrew Cagney
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=20030601181300.GA4357@twiddle.net \
--to=rth@twiddle.net \
--cc=cagney@redhat.com \
--cc=gdb-patches@sources.redhat.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