aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorScott Bambrough <scottb@netwinder.org>2000-06-01 19:07:54 +0000
committerScott Bambrough <scottb@netwinder.org>2000-06-01 19:07:54 +0000
commita6836251f636c0cb1078966331647d70376208ed (patch)
tree5a23d5f6e2a94d6e7997bb30f6145773aded6a08 /gas
parent3903e627f366251cede71c48c67b4f214b1cdcf4 (diff)
downloadgdb-a6836251f636c0cb1078966331647d70376208ed.zip
gdb-a6836251f636c0cb1078966331647d70376208ed.tar.gz
gdb-a6836251f636c0cb1078966331647d70376208ed.tar.bz2
The ARM assembler is not assembling the following instruction
correctly. mrs lr, spsr The string pointer is advanced to far before the check to set the SPSR bit. Thu Jun 01 2000 Scott Bambrough <scottb@netwinder.org> * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-arm.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 98ac949..e04fceb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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-29 Nick Clifton <nickc@cygnus.com>
* config/tc-sh.c: Fix compile time warning messages.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 4c71976..c5b2cd7 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -1914,6 +1914,8 @@ do_mrs (str, flags)
char *str;
unsigned long flags;
{
+ int skip = 0;
+
/* Only one syntax. */
skip_whitespace (str);
@@ -1936,11 +1938,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");
@@ -1949,6 +1951,7 @@ do_mrs (str, flags)
if (* str == 's' || * str == 'S')
inst.instruction |= SPSR_BIT;
+ str += skip;
inst.instruction |= flags;
end_of_line (str);