x86: drop LOCK from XCHG when optimizing
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Feb 2023 07:23:05 +0000 (08:23 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Feb 2023 07:23:05 +0000 (08:23 +0100)
commit9a4a44998662fc71b821ce46ad71e5063b38d758
treeb63bbe872c42e1177a99e324e1367a4c1cb4b281
parent33740f219e4eec3ee0f428a76390b9afc8140ad6
x86: drop LOCK from XCHG when optimizing

Like with segment overrides on LEA, optimize away such a redundant
instruction prefix.
gas/config/tc-i386.c
gas/testsuite/gas/i386/optimize-2.d
gas/testsuite/gas/i386/optimize-2.s
gas/testsuite/gas/i386/optimize-2b.d
gas/testsuite/gas/i386/optimize-3.d
gas/testsuite/gas/i386/optimize-3.s