x86: i386_generate_nops() may not derive decisions from global variables
authorJan Beulich <jbeulich@suse.com>
Mon, 23 Oct 2023 08:29:54 +0000 (10:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 23 Oct 2023 08:29:54 +0000 (10:29 +0200)
commitd12c7ab814cdb61da22c8d362e109ed55982a74b
tree6f7aa115bad8d469f0abf2875baad50e2257ce4c
parented71929492f2219ef116ad43b4c36d08249aee93
x86: i386_generate_nops() may not derive decisions from global variables

What matters is what was in effect at the time the original directive
was issued. Later changes to global state (bitness or ISA) must not
affect what code is generated.
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/nops-10.d [new file with mode: 0644]
gas/testsuite/gas/i386/nops-10.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-nops-6.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-nops-6.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64.exp