aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-06-01 18:42:30 +0000
committerRichard Henderson <rth@redhat.com>2003-06-01 18:42:30 +0000
commit09cc52fd98e51eff95ed8de62dbe5c4c0ec73473 (patch)
tree44a5f2d54b9a24c4f671e6d974a95f520a0ca7fb
parentc7f1635919382ad4128474ddace64667b80f8879 (diff)
downloadgdb-09cc52fd98e51eff95ed8de62dbe5c4c0ec73473.zip
gdb-09cc52fd98e51eff95ed8de62dbe5c4c0ec73473.tar.gz
gdb-09cc52fd98e51eff95ed8de62dbe5c4c0ec73473.tar.bz2
* alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies
from arg_reg_buffer to regcache to avoid double conversion.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/alpha-tdep.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1425635..3a795f6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies
+ from arg_reg_buffer to regcache to avoid double conversion.
+
2003-06-01 Mark Kettenis <kettenis@gnu.org>
* i386-linux-nat.c (child_resume): Use I386_ESP_REGNUM instead of
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index fd8c88e..a591d08 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -314,14 +314,15 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* 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);
+ 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;
}