Clean up handling of CP0 register 29. Backports commit af4bb6da80d3f6c733055bb4e2a1b99a30e81d24 from qemu