This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][GAS][ARM] Fix for POP {regs}^ problem

Hi Michael,

On 06/03/15 16:20, Michael Perkins wrote:
Here is a diff for a patch to fix a problem with gas accepting the POP {reglist}^ instruction. It was encoding this in the same way as the POP {reglist} instruction. The patch rejects the POP {reglist}^ instruction in ARM mode (previously only rejected in THUMB mode).


2015-03-06  Michael Perkins <>

* config/tc-arm.c (parse_operands): Set inst.operands[i].writeback for '^' on OP_REGLSTs.
(do_push_pop): New writeback constraint.

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 08155ac..136e52c 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -7042,7 +7042,7 @@ parse_operands (char *str, const
unsigned int *pattern, bf
           val =
parse_reg_list (&str);
           if (*str
== '^')
-             inst.operands[1].writeback = 1;
+             inst.operands[i].writeback = 1;
@@ -9040,6 +9040,8 @@ do_pli (void)
  static void
  do_push_pop (void)
+  constraint
+             _("push/pop do not support {reglist}^"));
= inst.operands[0];
(&inst.operands[0], 0, sizeof inst.operands[0]);
    inst.operands[0].isreg = 1;

Seems like your mail client or something else has munged the patch.
Can you please resend it as an attachment or ensure that the layout is


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]