This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49244] __sync or __atomic builtins will not emit 'lock bts/btr/btc'
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 May 2016 00:31:44 +0000
- Subject: [Bug target/49244] __sync or __atomic builtins will not emit 'lock bts/btr/btc'
- Auto-submitted: auto-generated
- References: <bug-49244-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49244
--- Comment #16 from Paolo Bonzini <bonzini at gnu dot org> ---
> This also suggests there's an error in the current x86_64 kernel implementation
> as the kernel bitops are supposed to operate on machine word-size locations, so
> it should be using BTSQ not BTSL
Why? Since bts adjust the memory address according to the bit number, btsl and
btsq are entirely the same instruction.