summaryrefslogtreecommitdiff
path: root/gas/app.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-10-25 17:40:19 +0000
committerNick Clifton <nickc@redhat.com>2005-10-25 17:40:19 +0000
commitd35e14863d21e7fbfdc164be51d6689cb7d9214f (patch)
tree4a41763cb35edca30b1a33d82068cb3837228567 /gas/app.c
parent5c818fc4573b0f1b6df519e47fce4d5b5bbe1370 (diff)
downloadbinutils-redhat-d35e14863d21e7fbfdc164be51d6689cb7d9214f.tar.gz
Add support for the Z80 processor family
Diffstat (limited to 'gas/app.c')
-rw-r--r--gas/app.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/gas/app.c b/gas/app.c
index 14f2f14b66..3ff7f61e21 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -376,6 +376,10 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
15: After seeing a `(' at state 1, looking for a `)' as
predicate.
#endif
+#ifdef TC_Z80
+ 16: After seeing an 'a' or an 'A' at the start of a symbol
+ 17: After seeing an 'f' or an 'F' in state 16
+#endif
*/
/* I added states 9 and 10 because the MIPS ECOFF assembler uses
@@ -665,6 +669,32 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
PUT ('|');
continue;
#endif
+#ifdef TC_Z80
+ case 16:
+ /* We have seen an 'a' at the start of a symbol, look for an 'f'. */
+ ch = GET ();
+ if (ch == 'f' || ch == 'F')
+ {
+ state = 17;
+ PUT (ch);
+ }
+ else
+ {
+ state = 9;
+ break;
+ }
+ case 17:
+ /* We have seen "af" at the start of a symbol,
+ a ' here is a part of that symbol. */
+ ch = GET ();
+ state = 9;
+ if (ch == '\'')
+ /* Change to avoid warning about unclosed string. */
+ PUT ('`');
+ else
+ UNGET (ch);
+ break;
+#endif
}
/* OK, we are somewhere in states 0 through 4 or 9 through 11. */
@@ -1242,6 +1272,30 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
break;
}
+#ifdef TC_Z80
+ /* "af'" is a symbol containing '\''. */
+ if (state == 3 && (ch == 'a' || ch == 'A'))
+ {
+ state = 16;
+ PUT (ch);
+ ch = GET ();
+ if (ch == 'f' || ch == 'F')
+ {
+ state = 17;
+ PUT (ch);
+ break;
+ }
+ else
+ {
+ state = 9;
+ if (!IS_SYMBOL_COMPONENT (ch))
+ {
+ UNGET (ch);
+ break;
+ }
+ }
+ }
+#endif
if (state == 3)
state = 9;