2006-09-14 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Thu, 14 Sep 2006 22:33:48 +0000 (22:33 +0000)
committerPaul Brook <paul@codesourcery.com>
Thu, 14 Sep 2006 22:33:48 +0000 (22:33 +0000)
gas/
* config/tc-arm.c (s_arm_unwind_movsp): Add offset argument.
* doc/c-arm.texi (movsp): Document offset argument.

ChangeLog.csl
gas/config/tc-arm.c
gas/doc/c-arm.texi

index 58be2eb..3671015 100644 (file)
@@ -1,5 +1,11 @@
 2006-09-14  Paul Brook  <paul@codesourcery.com>
 
+       gas/
+       * config/tc-arm.c (s_arm_unwind_movsp): Add offset argument.
+       * doc/c-arm.texi (movsp): Document offset argument.
+
+2006-09-14  Paul Brook  <paul@codesourcery.com>
+
        * config/tc-arm.c (thumb32_negate_data_op): Consistently use
        unsigned int to avoid 64-bit host problems.
 
index f9affc9..8ea1fa5 100644 (file)
@@ -3633,6 +3633,7 @@ s_arm_unwind_movsp (int ignored ATTRIBUTE_UNUSED)
 {
   int reg;
   valueT op;
+  int offset;
 
   reg = arm_reg_parse (&input_line_pointer, REG_TYPE_RN);
   if (reg == FAIL)
@@ -3641,6 +3642,16 @@ s_arm_unwind_movsp (int ignored ATTRIBUTE_UNUSED)
       ignore_rest_of_line ();
       return;
     }
+
+  /* Optional constant.         */
+  if (skip_past_comma (&input_line_pointer) != FAIL)
+    {
+      if (immediate_for_directive (&offset) == FAIL)
+       return;
+    }
+  else
+    offset = 0;
+
   demand_empty_rest_of_line ();
 
   if (reg == REG_SP || reg == REG_PC)
@@ -3658,7 +3669,7 @@ s_arm_unwind_movsp (int ignored ATTRIBUTE_UNUSED)
 
   /* Record the information for later. */
   unwind.fp_reg = reg;
-  unwind.fp_offset = unwind.frame_size;
+  unwind.fp_offset = unwind.frame_size - offset;
   unwind.sp_restored = 1;
 }
 
index bb0103a..d9a65aa 100644 (file)
@@ -574,8 +574,10 @@ A positive value indicates the function prologue allocated stack space by
 decrementing the stack pointer.
 
 @cindex @code{.movsp} directive, ARM
-@item .movsp @var{reg}
-Tell the unwinder that @var{reg} contains the current stack pointer.
+@item .movsp @var{reg} [, #@var{offset}]
+Tell the unwinder that @var{reg} contains an offset from the current
+stack pointer.  If @var{offset} is not specified then it is assumed to be
+zero.
 
 @cindex @code{.setfp} directive, ARM
 @item .setfp @var{fpreg}, @var{spreg} [, #@var{offset}]