Add some additional conversions for ELF assembler output.

This commit is contained in:
mhitch 2001-12-17 05:45:08 +00:00
parent 29ee3faf63
commit 5a3ab70cb5

View File

@ -1,20 +1,23 @@
void munchit(char *);
%%
.\.l\ [._A-Za-z][A-Za-z0-9_.]*/\, {printf("%c.l",yytext[0]);munchit(yytext+3);}
.\.w\ [._A-Za-z][A-Za-z0-9_.]*/\, {printf("%c.w",yytext[0]);munchit(yytext+3);}
\..*\n printf("%s", yytext);
pea[ ][_A-Za-z][A-Za-z0-9_]*$ {printf("pea");munchit(yytext+3);}
\ [_A-Za-z][A-Za-z0-9_]*/\, munchit(yytext);
pea[ ][._A-Za-z][A-Za-z0-9_.]*$ {printf("pea");munchit(yytext+3);}
\ [._A-Za-z][A-Za-z0-9_.]*/\, munchit(yytext);
. putchar(*yytext);
%%
/* $NetBSD: txlt.l,v 1.3 2001/03/02 16:43:25 mhitch Exp $ */
/* $NetBSD: txlt.l,v 1.4 2001/12/17 05:45:08 mhitch Exp $ */
void
munchit(s)
char *s;
{
putchar(*s++);
if (!strncmp(s, "fp", 2) ||
if ((!strncmp(s, "fp", 2) ||
!strncmp(s, "sp", 2) ||
((*s == 'a') || (*s == 'd')) && ((s[1]-'0')<=7))
((*s == 'a') || (*s == 'd')) && ((s[1]-'0')<=7)) &&
(s[2] == 0 || s[2] == ','))
printf("%s", s);
else
printf("%%pc@(%s)",s);