These are actually Ken's patches--I told him I'd take move them from
p3 into devo. * tc-m68k.c (m68k_reg_parse): If REGISTER_PREFIX isn't defined, still accept (but don't require) OPTIONAL_REGISTER_PREFIX before the register name. * tc-m68k.h (OPTIONAL_REGISTER_PREFIX): Define to be "%", if not M68KCOFF.
This commit is contained in:
parent
587c4264e0
commit
0069b1f670
2 changed files with 33 additions and 23 deletions
|
@ -1,5 +1,11 @@
|
||||||
Tue Nov 10 09:50:25 1992 Ian Lance Taylor (ian@cygnus.com)
|
Tue Nov 10 09:50:25 1992 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
|
* tc-m68k.c (m68k_reg_parse): If REGISTER_PREFIX isn't defined,
|
||||||
|
still accept (but don't require) OPTIONAL_REGISTER_PREFIX before
|
||||||
|
the register name.
|
||||||
|
* tc-m68k.h (OPTIONAL_REGISTER_PREFIX): Define to be "%", if not
|
||||||
|
M68KCOFF.
|
||||||
|
|
||||||
* obj-coffbfd.c (fill_section): set STYP_NOLOAD bit for .bss
|
* obj-coffbfd.c (fill_section): set STYP_NOLOAD bit for .bss
|
||||||
section.
|
section.
|
||||||
|
|
||||||
|
|
|
@ -579,42 +579,43 @@ static char alt_notend_table[256];
|
||||||
* advance the pointer.
|
* advance the pointer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum _register
|
enum _register m68k_reg_parse(ccp)
|
||||||
m68k_reg_parse(ccp)
|
register char **ccp;
|
||||||
register char **ccp;
|
|
||||||
{
|
{
|
||||||
char *start = *ccp;
|
char *start = *ccp;
|
||||||
|
char c;
|
||||||
|
char *p;
|
||||||
|
symbolS *symbolP;
|
||||||
|
|
||||||
#ifdef REGISTER_PREFIX
|
#ifdef REGISTER_PREFIX
|
||||||
if (*start == REGISTER_PREFIX)
|
if (*start != REGISTER_PREFIX)
|
||||||
++start;
|
return FAIL;
|
||||||
|
p = start + 1;
|
||||||
|
#else
|
||||||
|
p = start;
|
||||||
|
if (*p == OPTIONAL_REGISTER_PREFIX)
|
||||||
|
p++, start++;
|
||||||
#endif
|
#endif
|
||||||
|
if (!isalpha (*p) || !is_name_beginner (*p))
|
||||||
|
return FAIL;
|
||||||
|
|
||||||
if (isalpha(*start) && is_name_beginner(*start))
|
c = *p++;
|
||||||
{
|
while (isalpha(c) || isdigit(c) || c == '_')
|
||||||
char c;
|
{
|
||||||
char *p = start;
|
c = *p++;
|
||||||
symbolS *symbolP;
|
}
|
||||||
|
|
||||||
c = *p++;
|
* -- p = 0;
|
||||||
while (isalpha(c) || isdigit(c) || c == '_')
|
symbolP = symbol_find(start);
|
||||||
{
|
*p = c;
|
||||||
c = *p++;
|
|
||||||
}
|
|
||||||
|
|
||||||
* -- p = 0;
|
if (symbolP && S_GET_SEGMENT(symbolP) == SEG_REGISTER)
|
||||||
symbolP = symbol_find(start);
|
|
||||||
*p = c;
|
|
||||||
|
|
||||||
if (symbolP && S_GET_SEGMENT(symbolP) == SEG_REGISTER)
|
|
||||||
{
|
{
|
||||||
*ccp = p;
|
*ccp = p;
|
||||||
return S_GET_VALUE(symbolP);
|
return S_GET_VALUE(symbolP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SKIP_WHITE() { str++; if(*str==' ') str++;}
|
#define SKIP_WHITE() { str++; if(*str==' ') str++;}
|
||||||
|
@ -3373,6 +3374,9 @@ void
|
||||||
#ifdef REGISTER_PREFIX
|
#ifdef REGISTER_PREFIX
|
||||||
alt_notend_table[REGISTER_PREFIX] = 1;
|
alt_notend_table[REGISTER_PREFIX] = 1;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef OPTIONAL_REGISTER_PREFIX
|
||||||
|
alt_notend_table[OPTIONAL_REGISTER_PREFIX] = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MIT_SYNTAX_ONLY
|
#ifndef MIT_SYNTAX_ONLY
|
||||||
/* Insert pseudo ops, these have to go into the opcode table since
|
/* Insert pseudo ops, these have to go into the opcode table since
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue