mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-26 11:22:28 +08:00
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:
@ -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
|
||||||
|
@ -2305,63 +2305,59 @@ 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)
|
case 0:
|
||||||
{
|
i.seg[i.mem_operands] = &es;
|
||||||
case 0:
|
break;
|
||||||
i.seg[i.mem_operands] = &es;
|
case 1:
|
||||||
break;
|
i.seg[i.mem_operands] = &cs;
|
||||||
case 1:
|
break;
|
||||||
i.seg[i.mem_operands] = &cs;
|
case 2:
|
||||||
break;
|
i.seg[i.mem_operands] = &ss;
|
||||||
case 2:
|
break;
|
||||||
i.seg[i.mem_operands] = &ss;
|
case 3:
|
||||||
break;
|
i.seg[i.mem_operands] = &ds;
|
||||||
case 3:
|
break;
|
||||||
i.seg[i.mem_operands] = &ds;
|
case 4:
|
||||||
break;
|
i.seg[i.mem_operands] = &fs;
|
||||||
case 4:
|
break;
|
||||||
i.seg[i.mem_operands] = &fs;
|
case 5:
|
||||||
break;
|
i.seg[i.mem_operands] = &gs;
|
||||||
case 5:
|
break;
|
||||||
i.seg[i.mem_operands] = &gs;
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Skip the ':' and whitespace. */
|
/* Skip the ':' and whitespace. */
|
||||||
|
++op_string;
|
||||||
|
if (is_space_char (*op_string))
|
||||||
|
++op_string;
|
||||||
|
|
||||||
|
/* Pretend given string starts here. */
|
||||||
|
operand_string = op_string;
|
||||||
|
if (!is_digit_char (*op_string)
|
||||||
|
&& !is_identifier_char (*op_string)
|
||||||
|
&& *op_string != '('
|
||||||
|
&& *op_string != ABSOLUTE_PREFIX)
|
||||||
|
{
|
||||||
|
as_bad (_("bad memory operand `%s'"), op_string);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* Handle case of %es:*foo. */
|
||||||
|
if (*op_string == ABSOLUTE_PREFIX)
|
||||||
|
{
|
||||||
++op_string;
|
++op_string;
|
||||||
if (is_space_char (*op_string))
|
if (is_space_char (*op_string))
|
||||||
++op_string;
|
++op_string;
|
||||||
|
i.types[this_operand] |= JumpAbsolute;
|
||||||
/* Pretend given string starts here. */
|
|
||||||
operand_string = op_string;
|
|
||||||
if (!is_digit_char (*op_string)
|
|
||||||
&& !is_identifier_char (*op_string)
|
|
||||||
&& *op_string != '('
|
|
||||||
&& *op_string != ABSOLUTE_PREFIX)
|
|
||||||
{
|
|
||||||
as_bad (_("bad memory operand `%s'"), op_string);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/* Handle case of %es:*foo. */
|
|
||||||
if (*op_string == ABSOLUTE_PREFIX)
|
|
||||||
{
|
|
||||||
++op_string;
|
|
||||||
if (is_space_char (*op_string))
|
|
||||||
++op_string;
|
|
||||||
i.types[this_operand] |= JumpAbsolute;
|
|
||||||
}
|
|
||||||
goto do_memory_reference;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
as_bad (_("bad segment prefix `%c%s'"),
|
|
||||||
REGISTER_PREFIX, r->reg_name);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
goto do_memory_reference;
|
||||||
|
}
|
||||||
|
if (*op_string)
|
||||||
|
{
|
||||||
|
as_bad (_("Junk `%s' after register"), op_string);
|
||||||
|
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;
|
||||||
|
Reference in New Issue
Block a user