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)
Mon, Dec 29, 6:47 PM
Unknown Object (File)
Mon, Dec 15, 10:29 PM
Unknown Object (File)
Mon, Dec 15, 3:51 AM
Unknown Object (File)
Sat, Dec 6, 4:10 PM
Unknown Object (File)
Nov 28 2025, 4:18 PM
Unknown Object (File)
Nov 23 2025, 6:03 AM
Unknown Object (File)
Nov 20 2025, 11:48 PM
Unknown Object (File)
Nov 19 2025, 2:05 AM
Subscribers
None

Details

Summary

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

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8176
Build 8404: arc lint + arc unit

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–224

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–224

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.