Skip to content

NCG: Unreachable incorrect code in `outOfLineCmmOp`

Summary

Certain MachOps are implemented by calls to C libs.

However we have code in this function which:

  • Implements emmision for a call which is never used (we will always generate inline code).
  • If we were to use the call the symbol name would be incorrect.

As far as I can tell that's the case for these atomics

              MO_AtomicRMW _ _ -> fsLit "atomicrmw"
              MO_AtomicRead _  -> fsLit "atomicread"
              MO_AtomicWrite _ -> fsLit "atomicwrite"
              MO_Cmpxchg _     -> fsLit "cmpxchg"

There were all added in the same commit so that makes sense. They should use the labels in fashion like clzLabel does.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information