Tue Oct 20 11:18:28 1998 Alan Modra <alan@spri.levels.unisa.edu.au>

* config/tc-i386.c (i386_operand): Check for garbage after
	register name.
This commit is contained in:
Ian Lance Taylor
1998-10-20 15:24:45 +00:00
parent f5003e7d62
commit 7540e47096
2 changed files with 51 additions and 50 deletions

View File

@ -1,3 +1,8 @@
Tue Oct 20 11:18:28 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
* config/tc-i386.c (i386_operand): Check for garbage after
register name.
Tue Oct 20 10:49:42 1998 Ian Lance Taylor <ian@cygnus.com> Tue Oct 20 10:49:42 1998 Ian Lance Taylor <ian@cygnus.com>
* config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc

View File

@ -2305,9 +2305,7 @@ i386_operand (operand_string)
op_string = end_op; op_string = end_op;
if (is_space_char (*op_string)) if (is_space_char (*op_string))
++op_string; ++op_string;
if (*op_string == ':') if (*op_string == ':' && (r->reg_type & (SReg2 | SReg3)))
{
if (r->reg_type & (SReg2 | SReg3))
{ {
switch (r->reg_num) switch (r->reg_num)
{ {
@ -2356,13 +2354,11 @@ i386_operand (operand_string)
} }
goto do_memory_reference; goto do_memory_reference;
} }
else if (*op_string)
{ {
as_bad (_("bad segment prefix `%c%s'"), as_bad (_("Junk `%s' after register"), op_string);
REGISTER_PREFIX, r->reg_name);
return 0; return 0;
} }
}
i.types[this_operand] |= r->reg_type & ~BaseIndex; i.types[this_operand] |= r->reg_type & ~BaseIndex;
i.regs[this_operand] = r; i.regs[this_operand] = r;
i.reg_operands++; i.reg_operands++;