diff options
author | Alan Modra <amodra@gmail.com> | 1999-08-29 23:44:27 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 1999-08-29 23:44:27 +0000 |
commit | 5f47d35be101be073ebdc0cb5ba78740042143cb (patch) | |
tree | b6603c8558cc0b5129c5e273b4f39e1f6552ac27 /gas/config | |
parent | eb1b03df1a293f7aebb67e1deeba4b0bb21c3f9a (diff) | |
download | gdb-5f47d35be101be073ebdc0cb5ba78740042143cb.zip gdb-5f47d35be101be073ebdc0cb5ba78740042143cb.tar.gz gdb-5f47d35be101be073ebdc0cb5ba78740042143cb.tar.bz2 |
Allow spaces in i386 FP reg names, eg. %st ( 1 ).
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index a2c0bcc..085a4b9 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -703,8 +703,6 @@ md_begin () #ifdef LEX_AT identifier_chars['@'] = '@'; #endif - register_chars[')'] = ')'; - register_chars['('] = '('; digit_chars['-'] = '-'; identifier_chars['_'] = '_'; identifier_chars['.'] = '.'; @@ -4166,6 +4164,39 @@ parse_register (reg_string, end_op) r = (const reg_entry *) hash_find (reg_hash, reg_name_given); + /* Handle floating point regs, allowing spaces in the (i) part. */ + if (r == i386_regtab /* %st is first entry of table */) + { + --s; + if (is_space_char (*s)) + ++s; + if (*s == '(') + { + *p++ = *s++; + if (is_space_char (*s)) + ++s; + if (*s >= '0' && *s <= '7') + { + r = &i386_float_regtab[*s - '0']; + *p++ = *s++; + if (is_space_char (*s)) + ++s; + if (*s == ')') + { + *end_op = s + 1; + return r; + } + *p++ = *s; + } + if (!allow_naked_reg) + { + *p = '\0'; + as_bad (_("bad register name `%s'"), reg_name_given); + } + return (const reg_entry *) NULL; + } + } + if (r == NULL) { if (!allow_naked_reg) |