Page MenuHomeFreeBSD

Support 1 and 2 byte cmpset on x86
ClosedPublic

Authored by markj on Mar 20 2017, 11:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 17, 9:53 PM
Unknown Object (File)
Aug 2 2025, 11:00 AM
Unknown Object (File)
Jul 28 2025, 1:20 PM
Unknown Object (File)
Jul 28 2025, 4:36 AM
Unknown Object (File)
Jul 26 2025, 1:39 PM
Unknown Object (File)
Jun 30 2025, 9:09 PM
Unknown Object (File)
Jun 30 2025, 7:27 PM
Unknown Object (File)
Jun 28 2025, 4:44 PM
Subscribers
None

Details

Summary

This is intended for use in the LinuxKPI - the DRM code needs it.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj retitled this revision from Support 1 and 2 byte cmpset on x86. to Support 1 and 2 byte cmpset on x86.Mar 20 2017, 11:29 PM
markj edited the summary of this revision. (Show Details)
markj added reviewers: jhb, kib.
sys/i386/include/atomic.h
222 โ†—(On Diff #26470)

There is %zN construct, which prints opcode suffix for operand N. I think it is supported by clang. If you use it, you would avoid passing the instruction mnemonic to macros. Also, I suspect that it would work without suffix at all.

sys/i386/include/atomic.h
222 โ†—(On Diff #26470)

With clang 4.0 I get "error: invalid operand in inline asm," though it works with gcc 4.9. But indeed, it looks like the suffixes aren't needed anyway.

Don't specify the operand type, it can be inferred.

This revision is now accepted and ready to land.Mar 21 2017, 6:28 PM
This revision was automatically updated to reflect the committed changes.