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)
Tue, Apr 22, 3:26 PM
Unknown Object (File)
Mon, Apr 21, 5:05 AM
Unknown Object (File)
Sun, Apr 20, 4:41 PM
Unknown Object (File)
Sun, Apr 20, 4:33 PM
Unknown Object (File)
Sun, Apr 20, 4:27 PM
Unknown Object (File)
Sun, Apr 20, 4:16 PM
Unknown Object (File)
Sun, Apr 20, 3:55 PM
Unknown Object (File)
Sun, Apr 20, 3:50 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.