simulator: add support for illegal instruction traps