Module Name:    src
Committed By:   matt
Date:           Thu Feb  7 01:42:09 UTC 2013

Modified Files:
        src/gnu/dist/binutils/gas/config [matt-nb6-plus]: tc-arm.c

Log Message:
Add support for push/pop register list.


To generate a diff of this commit:
cvs rdiff -u -r1.6.6.6 -r1.6.6.7 src/gnu/dist/binutils/gas/config/tc-arm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/binutils/gas/config/tc-arm.c
diff -u src/gnu/dist/binutils/gas/config/tc-arm.c:1.6.6.6 src/gnu/dist/binutils/gas/config/tc-arm.c:1.6.6.7
--- src/gnu/dist/binutils/gas/config/tc-arm.c:1.6.6.6	Thu Feb  7 01:18:07 2013
+++ src/gnu/dist/binutils/gas/config/tc-arm.c	Thu Feb  7 01:42:08 2013
@@ -6651,25 +6651,35 @@ do_ldmstm (char * str)
 
   skip_whitespace (str);
 
-  if ((base_reg = reg_required_here (&str, 16)) == FAIL)
-    return;
-
-  if (base_reg == REG_PC)
+  base_reg = (inst.instruction >> 16) & 0xf;
+  if (base_reg == 0)
     {
-      inst.error = _("r15 not allowed as base register");
-      return;
-    }
+      if ((base_reg = reg_required_here (&str, 16)) == FAIL)
+	return;
 
-  skip_whitespace (str);
+      if (base_reg == REG_PC)
+	{
+	  inst.error = _("r15 not allowed as base register");
+	  return;
+	}
 
-  if (*str == '!')
-    {
-      inst.instruction |= WRITE_BACK;
-      str++;
+      skip_whitespace (str);
+
+      if (*str == '!')
+	{
+	  inst.instruction |= WRITE_BACK;
+	  str++;
+	}
+
+      if (skip_past_comma (&str) == FAIL)
+	{
+	  if (! inst.error)
+	    inst.error = BAD_ARGS;
+	  return;
+	}
     }
 
-  if (skip_past_comma (&str) == FAIL
-      || (range = reg_list (&str)) == FAIL)
+  if ((range = reg_list (&str)) == FAIL)
     {
       if (! inst.error)
 	inst.error = BAD_ARGS;
@@ -9995,11 +10005,13 @@ static const struct asm_opcode insns[] =
   {"stmda",      0xe8000000, 3,  ARM_EXT_V1,       do_ldmstm},
   {"stmdb",      0xe9000000, 3,  ARM_EXT_V1,       do_ldmstm},
   {"stmfd",      0xe9000000, 3,  ARM_EXT_V1,       do_ldmstm},
+  {"push",	 0xe92d0000, 4,  ARM_EXT_V1,       do_ldmstm},
   {"stmfa",      0xe9800000, 3,  ARM_EXT_V1,       do_ldmstm},
   {"stmea",      0xe8800000, 3,  ARM_EXT_V1,       do_ldmstm},
   {"stmed",      0xe8000000, 3,  ARM_EXT_V1,       do_ldmstm},
 
   {"ldmia",      0xe8900000, 3,  ARM_EXT_V1,       do_ldmstm},
+  {"pop",	 0xe8bd0000, 3,  ARM_EXT_V1,       do_ldmstm},
   {"ldmib",      0xe9900000, 3,  ARM_EXT_V1,       do_ldmstm},
   {"ldmda",      0xe8100000, 3,  ARM_EXT_V1,       do_ldmstm},
   {"ldmdb",      0xe9100000, 3,  ARM_EXT_V1,       do_ldmstm},

Reply via email to