From: Paul Brook Date: Thu, 14 Sep 2006 22:33:48 +0000 (+0000) Subject: 2006-09-14 Paul Brook X-Git-Tag: binutils-csl-palmsource-arm-prelinker-1_0-1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ca513e9934cdc6122233e2cea330b114664d4ec;p=thirdparty%2Fbinutils-gdb.git 2006-09-14 Paul Brook gas/ * config/tc-arm.c (s_arm_unwind_movsp): Add offset argument. * doc/c-arm.texi (movsp): Document offset argument. --- diff --git a/ChangeLog.csl b/ChangeLog.csl index 58be2ebfb78..367101577b4 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,9 @@ +2006-09-14 Paul Brook + + 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 * config/tc-arm.c (thumb32_negate_data_op): Consistently use diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index f9affc9cccd..8ea1fa5b509 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -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; } diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi index bb0103ad1fa..d9a65aa8eba 100644 --- a/gas/doc/c-arm.texi +++ b/gas/doc/c-arm.texi @@ -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}]