From 69974ce1dc29b0351ccfd44c48a42454e8a2d1fe Mon Sep 17 00:00:00 2001 From: Leon Alrae Date: Sun, 11 Feb 2018 17:16:17 -0500 Subject: [PATCH] target-mips: use CP0EnLo_XI instead of magic number Backports commit d3b1979d7b37c7fa6b187442e0990afa6f88fe3b from qemu --- qemu/target-mips/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/target-mips/translate.c b/qemu/target-mips/translate.c index 4cae8ea9..f2f502ec 100644 --- a/qemu/target-mips/translate.c +++ b/qemu/target-mips/translate.c @@ -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);