Implement Q{Save,Restore}RegisterState.