* alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies
authorRichard Henderson <rth@redhat.com>
Sun, 1 Jun 2003 18:42:30 +0000 (18:42 +0000)
committerRichard Henderson <rth@redhat.com>
Sun, 1 Jun 2003 18:42:30 +0000 (18:42 +0000)
        from arg_reg_buffer to regcache to avoid double conversion.

gdb/ChangeLog
gdb/alpha-tdep.c

index 1425635917ba3c9d4731a0687dcd1632f3d3df87..3a795f630d277b4d78257f0c1f96afa71dbe6d4c 100644 (file)
@@ -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
index fd8c88ee75d052f1a81a5021bc7b80b2ae0723d7..a591d08f619fd66013cc388d378db8db3032c227 100644 (file)
@@ -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;
 }