* [PATCH] x86/Intel: use proper manifest constant in favor of literal number
@ 2012-07-24 14:50 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2012-07-24 14:50 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
Using the dedicated manifest constant is more descriptive.
2012-07-24 Jan Beulich <jbeulich@suse.com>
* config/tc-i386-intel.c (i386_intel_simplify_register):
Replace literal 4 by corresponding ESP_REG_NUM.
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -285,7 +285,7 @@ i386_intel_simplify_register (expression
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 (expressi
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;
}
[-- Attachment #2: binutils-mainline-x86-intel-esp-name.patch --]
[-- Type: text/plain, Size: 825 bytes --]
Using the dedicated manifest constant is more descriptive.
2012-07-24 Jan Beulich <jbeulich@suse.com>
* config/tc-i386-intel.c (i386_intel_simplify_register):
Replace literal 4 by corresponding ESP_REG_NUM.
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -285,7 +285,7 @@ i386_intel_simplify_register (expression
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 (expressi
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-24 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 14:50 [PATCH] x86/Intel: use proper manifest constant in favor of literal number Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).