I’ve often wondering how are these bits set?
Like can you do it from Swift? Or need assembly?
Like can you do it from Swift? Or need assembly?
The kernel would have to be aware of it in order to be able to restore its state across context switches though, unless it's part of a set of registers that is automatically persisted. But given that Apple is publicly documenting this flag, I suppose it is.
Here's an interesting conversation by the Go developers from as early as 2021 being suspicious of DIT: https://github.com/golang/go/issues/49702