]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
The ARM assembler is not assembling the following instruction
authorScott Bambrough <scottb@netwinder.org>
Thu, 1 Jun 2000 19:15:39 +0000 (19:15 +0000)
committerScott Bambrough <scottb@netwinder.org>
Thu, 1 Jun 2000 19:15:39 +0000 (19:15 +0000)
correctly.

mrs lr, spsr

The string pointer is advanced to far before the check to set
the SPSR bit.

2000-06-01  Scott Bambrough <scottb@netwinder.org>

* config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.

gas/ChangeLog
gas/config/tc-arm.c

index 0136e9c7f02a2b7bb1388cb7fc8336454a8adb29..2dd69418f273db29c9335357664bd5a6515057eb 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-01  Scott Bambrough <scottb@netwinder.org>
+
+       * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.
+
 2000-05-22  David O'Brien  <obrien@FreeBSD.org>
 
        * configure.in: Recognize alpha-*-freebsd*.
index 44c05b3c6eba411a61f95d16e229f3d70ec68692..aadea2699c9637468f1a00e519afb15c13539de2 100644 (file)
@@ -1915,6 +1915,8 @@ do_mrs (str, flags)
      char *str;
      unsigned long flags;
 {
+  int skip = 0;
+  
   /* Only one syntax.  */
   skip_whitespace (str);
 
@@ -1937,11 +1939,11 @@ do_mrs (str, flags)
         /* Lower case versions for backwards compatability.  */
       || strcmp (str, "cpsr") == 0
       || strcmp (str, "spsr") == 0)
-    str += 4;
+    skip = 4;
   /* This is for backwards compatability with older toolchains.  */
   else if (strcmp (str, "cpsr_all") == 0
           || strcmp (str, "spsr_all") == 0)
-    str += 7;
+    skip = 7;
   else
     {
       inst.error = _("{C|S}PSR expected");
@@ -1950,6 +1952,7 @@ do_mrs (str, flags)
 
   if (* str == 's' || * str == 'S')
     inst.instruction |= SPSR_BIT;
+  str += skip;
   
   inst.instruction |= flags;
   end_of_line (str);