c4-project / c4f

The C4 Concurrent C Fuzzer
MIT License
13 stars 1 forks source link

Generalise memory orders to expressions #233

Open MattWindsor91 opened 3 years ago

MattWindsor91 commented 3 years ago

Presently, memory orders are a static enumeration. However, it transpires that we miss a lot of Clang codegen code by not having statically unknowable memory orders!

As such, we should be able to have arbitrary memory order expressions. I suspect these would be most easily implemented by:

I'm unsure at which point this sort of exotic memory order work becomes undefined behaviour; maybe I'll need to spend some winter nights with a draft copy of C11.