aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-08-01 15:39:17 +0000
committerNick Clifton <nickc@redhat.com>2001-08-01 15:39:17 +0000
commit28bab82b5a7e70d315dc943ae1e10701b0d629da (patch)
treeb675373737f83d66fdda659eaebe66d9ceb64ef7 /gas
parentd8adc60f05ce2e4260c37bf4838a10ce7e431f78 (diff)
downloadgdb-28bab82b5a7e70d315dc943ae1e10701b0d629da.zip
gdb-28bab82b5a7e70d315dc943ae1e10701b0d629da.tar.gz
gdb-28bab82b5a7e70d315dc943ae1e10701b0d629da.tar.bz2
Cleanups for z8k target
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-z8k.c12
2 files changed, 18 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index eaa252a..2793980 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-01 Christian Groessler <cpg@aladdin.de>
+
+ * config/tc-z8k.c (parse_reg): If a string starts with "r", "rl",
+ "rh", "rr", "rq", or "sp" then don't automatically assume
+ it's a register name. Check whether there is a number
+ following.
+
2001-08-01 Alan Modra <amodra@bigpond.net.au>
* config/tc-i386.c (lex_got): Match lower case relocation tokens.
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c
index 73666ca..d8bbb8b 100644
--- a/gas/config/tc-z8k.c
+++ b/gas/config/tc-z8k.c
@@ -259,7 +259,7 @@ parse_reg (src, mode, reg)
char *res = 0;
char regno;
- if (src[0] == 's' && src[1] == 'p')
+ if (src[0] == 's' && src[1] == 'p' && (src[2] == 0 || src[2] == ','))
{
if (segmented_mode)
{
@@ -277,6 +277,8 @@ parse_reg (src, mode, reg)
{
if (src[1] == 'r')
{
+ if (src[2] < '0' || src[2] > '9')
+ return res; /* Assume no register name but a label starting with 'rr'. */
*mode = CLASS_REG_LONG;
res = whatreg (reg, src + 2);
regno = *reg;
@@ -285,6 +287,8 @@ parse_reg (src, mode, reg)
}
else if (src[1] == 'h')
{
+ if (src[2] < '0' || src[2] > '9')
+ return res; /* Assume no register name but a label starting with 'rh'. */
*mode = CLASS_REG_BYTE;
res = whatreg (reg, src + 2);
regno = *reg;
@@ -293,6 +297,8 @@ parse_reg (src, mode, reg)
}
else if (src[1] == 'l')
{
+ if (src[2] < '0' || src[2] > '9')
+ return res; /* Assume no register name but a label starting with 'rl'. */
*mode = CLASS_REG_BYTE;
res = whatreg (reg, src + 2);
regno = *reg;
@@ -302,6 +308,8 @@ parse_reg (src, mode, reg)
}
else if (src[1] == 'q')
{
+ if (src[2] < '0' || src[2] > '9')
+ return res; /* Assume no register name but a label starting with 'rq'. */
*mode = CLASS_REG_QUAD;
res = whatreg (reg, src + 2);
regno = *reg;
@@ -310,6 +318,8 @@ parse_reg (src, mode, reg)
}
else
{
+ if (src[1] < '0' || src[1] > '9')
+ return res; /* Assume no register name but a label starting with 'r'. */
*mode = CLASS_REG_WORD;
res = whatreg (reg, src + 1);
regno = *reg;