]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2006-03-08 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Wed, 8 Mar 2006 14:23:31 +0000 (14:23 +0000)
committerPaul Brook <paul@codesourcery.com>
Wed, 8 Mar 2006 14:23:31 +0000 (14:23 +0000)
Backport from mainline.
* gdb/arm-tdep.c (arm_push_dummy_call): Remove stack alignment.
(arm_frame_align): New function.
(arm_gdbarch_init): Use it.

ChangeLog.csl
gdb/arm-tdep.c

index caf863b80c570d613212b485d2d50464a076b305..0ce4f4ccfbbc5929f8c1d57c3b652cddb5f0a4a6 100644 (file)
@@ -1,3 +1,10 @@
+2006-03-08  Paul Brook  <paul@codesourcery.com>
+
+       Backport from mainline.
+       * gdb/arm-tdep.c (arm_push_dummy_call): Remove stack alignment.
+       (arm_frame_align): New function.
+       (arm_gdbarch_init): Use it.
+
 2006-03-07  Paul Brook  <paul@codesourcery.com>
 
        Backport from mainline.
index 652be4b7234ef553fdd3db2edd512a7ecaf2321b..cb3c2615910aafc793441ca30825d3e9935c9cd2 100644 (file)
@@ -1173,11 +1173,6 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   argreg = ARM_A1_REGNUM;
   nstack = 0;
 
-  /* Some platforms require a double-word aligned stack.  Make sure sp
-     is correctly aligned before we start.  We always do this even if
-     it isn't really needed -- it can never hurt things.  */
-  sp &= ~(CORE_ADDR)(2 * DEPRECATED_REGISTER_SIZE - 1);
-
   /* The struct_return pointer occupies the first parameter
      passing register.  */
   if (struct_return)
@@ -1299,6 +1294,17 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   return sp;
 }
 
+
+/* Always align the frame to an 8-byte boundary.  This is required on
+   some platforms and harmless on the rest.  */
+
+static CORE_ADDR
+arm_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+  /* Align the stack to eight bytes.  */
+  return sp & ~ (CORE_ADDR) 7;
+}
+
 static void
 print_fpu_flags (int flags)
 {
@@ -2738,6 +2744,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   tdep->jb_pc = -1;    /* Longjump support not enabled by default.  */
 
   set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
+  set_gdbarch_frame_align (gdbarch, arm_frame_align);
 
   set_gdbarch_write_pc (gdbarch, arm_write_pc);