]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: move more disp processing out of md_assemble()
authorJan Beulich <jbeulich@suse.com>
Fri, 10 Mar 2023 10:06:17 +0000 (11:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Mar 2023 10:06:17 +0000 (11:06 +0100)
commit0de704b9cdd3ca093317820d15134b7f72f5a7e1
treefac876458890387fcf443793b384601633f65e18
parent0a3eba426589cb2b5dc3a51ee8a3821c578c7c5f
x86: move more disp processing out of md_assemble()

Put it in optimize_disp() such that it can then be re-used by .insn
handling. The movement makes it necessary (or at least very desirable,
to avoid introducing a fragile cast) to convert to local variable to
"unsigned", which in turn requires an adjustment to the pre-existing
loop header.

Having the caller pass in the specific template under consideration has
another benefit then: We can replace the two uses of current_templates
in the function as well, thus no longer looking at some merely "related"
template. (This may allow further tightening, but if so that's to be the
subject of another change.)
gas/config/tc-i386.c