diff --git a/gas/ChangeLog b/gas/ChangeLog index f4bbc8d0fa..445e36d3da 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2012-07-24 Jan Beulich + + * config/tc-i386-intel.c (i386_intel_simplify_register): + Replace literal 4 by corresponding ESP_REG_NUM. + 2012-07-24 Sandra Loosemore Jie Zhang diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c index 1e563b2d81..919f27ca30 100644 --- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -285,7 +285,7 @@ i386_intel_simplify_register (expressionS *e) else { /* esp is invalid as index */ - intel_state.index = i386_regtab + REGNAM_EAX + 4; + intel_state.index = i386_regtab + REGNAM_EAX + ESP_REG_NUM; } return 2; } @@ -440,7 +440,7 @@ static int i386_intel_simplify (expressionS *e) break; default: /* esp is invalid as index */ - intel_state.index = i386_regtab + REGNAM_EAX + 4; + intel_state.index = i386_regtab + REGNAM_EAX + ESP_REG_NUM; break; }