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)
Jan 7 2024, 7:06 PM
Unknown Object (File)
Dec 20 2023, 1:07 AM
Unknown Object (File)
Nov 7 2023, 1:35 AM
Unknown Object (File)
Nov 4 2023, 6:09 PM
Unknown Object (File)
Nov 4 2023, 5:53 PM
Unknown Object (File)
Nov 1 2023, 9:08 PM
Unknown Object (File)
Oct 6 2023, 12:36 AM
Unknown Object (File)
Oct 3 2023, 6:07 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.