ensure the compiler does not move around thread-register-based reads