[LLVMdev] atomics

Andrew Lenharth andrewl at lenharth.org
Wed Feb 20 20:36:02 PST 2008


Attached is a patch to support atomic compare and swap, load add
store, and swap.  These I think should be a sufficient minimal set of
atomic intrinsics.

Only Alpha has codegen support for all intrinsics (hey, alpha has to
have something shiny and new occasionally).  X86 is a matter of
implementing the various xchange instructions and the lock prefix (by
someone more familiar with that .td file than me :) ).

I also attached the two testcases I've been using.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atomic.patch
Type: text/x-diff
Size: 33663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080220/49fabbdc/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test32.ll
Type: application/octet-stream
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080220/49fabbdc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test64.ll
Type: application/octet-stream
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080220/49fabbdc/attachment-0001.obj>


More information about the llvm-dev mailing list