target-mips: use CP0EnLo_XI instead of magic number

Backports commit d3b1979d7b37c7fa6b187442e0990afa6f88fe3b from qemu
This commit is contained in:
Leon Alrae 2018-02-11 17:16:17 -05:00 committed by Lioncash
parent 4d259dda9a
commit 69974ce1dc
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -5011,7 +5011,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
#if defined(TARGET_MIPS64)
if (ctx->rxi) {
TCGv tmp = tcg_temp_new(tcg_ctx);
tcg_gen_andi_tl(tcg_ctx, tmp, arg, (3ull << 62));
tcg_gen_andi_tl(tcg_ctx, tmp, arg, (3ull << CP0EnLo_XI));
tcg_gen_shri_tl(tcg_ctx, tmp, tmp, 32);
tcg_gen_or_tl(tcg_ctx, arg, arg, tmp);
tcg_temp_free(tcg_ctx, tmp);
@ -5066,7 +5066,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
#if defined(TARGET_MIPS64)
if (ctx->rxi) {
TCGv tmp = tcg_temp_new(tcg_ctx);
tcg_gen_andi_tl(tcg_ctx, tmp, arg, (3ull << 62));
tcg_gen_andi_tl(tcg_ctx, tmp, arg, (3ull << CP0EnLo_XI));
tcg_gen_shri_tl(tcg_ctx, tmp, tmp, 32);
tcg_gen_or_tl(tcg_ctx, arg, arg, tmp);
tcg_temp_free(tcg_ctx, tmp);