mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 18:44:20 +08:00
Fix crash on intelbad.
gas/ 2013-12-03 Tristan Gingold <gingold@adacore.com> * config/tc-i386-intel.c (i386_intel_simplify): Avoid arithmetic overflow on pointers.
This commit is contained in:
parent
11a6da5617
commit
c2a5914e1b
@ -1,3 +1,8 @@
|
||||
2013-12-03 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* config/tc-i386-intel.c (i386_intel_simplify): Avoid arithmetic
|
||||
overflow on pointers.
|
||||
|
||||
2013-11-19 Yufeng Zhang <yufeng.zhang@arm.com>
|
||||
|
||||
Revert
|
||||
|
@ -417,23 +417,21 @@ static int i386_intel_simplify (expressionS *e)
|
||||
if (this_operand >= 0 && intel_state.in_bracket)
|
||||
{
|
||||
expressionS *scale = NULL;
|
||||
|
||||
if (intel_state.index)
|
||||
--scale;
|
||||
int has_index = (intel_state.index != NULL);
|
||||
|
||||
if (!intel_state.in_scale++)
|
||||
intel_state.scale_factor = 1;
|
||||
|
||||
ret = i386_intel_simplify_symbol (e->X_add_symbol);
|
||||
if (ret && !scale && intel_state.index)
|
||||
if (ret && !has_index && intel_state.index)
|
||||
scale = symbol_get_value_expression (e->X_op_symbol);
|
||||
|
||||
if (ret)
|
||||
ret = i386_intel_simplify_symbol (e->X_op_symbol);
|
||||
if (ret && !scale && intel_state.index)
|
||||
if (ret && !scale && !has_index && intel_state.index)
|
||||
scale = symbol_get_value_expression (e->X_add_symbol);
|
||||
|
||||
if (ret && scale && (scale + 1))
|
||||
if (ret && scale)
|
||||
{
|
||||
resolve_expression (scale);
|
||||
if (scale->X_op != O_constant
|
||||
|
Loading…
Reference in New Issue
Block a user