2

I’m trying to implement mutexes in the LLVM backend I’m writing for my programming language. I’m having trouble figuring out the exact API call, using the OCaml llvm bindings, to generate a cmpxchg instruction.

I'm using OCaml 4.14.0 and llvm@14.0.6.

In my research, I found an example using a “build_cmpxchg,” and I also found a definition of AtomicCmpXchg as a part of an enum in LLVM’s OCaml bindings. However, I can’t find any function in these bindings that would create this instruction.

What am I missing? How can I tell the LLVM OCaml bindings to add this instruction?

Luke Taylor
  • 8,631
  • 8
  • 54
  • 92
Nick Doan
  • 31
  • 2
  • 3
    At the moment, LLVM binding are maintained by Alan. https://discuss.ocaml.org/u/alan/ If you won't get any luck here, you may ping him on OCaml Discuss forum. – Kakadu May 02 '23 at 08:27

0 Answers0