From e548cd9eb1bfa83c26cf6d33d5e7965736e8a91e Mon Sep 17 00:00:00 2001 From: lazymio Date: Sat, 12 Feb 2022 18:22:56 +0100 Subject: [PATCH] Fix the undefined shift --- qemu/exec-vary.c | 2 +- qemu/target/mips/translate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/exec-vary.c b/qemu/exec-vary.c index 91ce1410..b2f5a678 100644 --- a/qemu/exec-vary.c +++ b/qemu/exec-vary.c @@ -72,7 +72,7 @@ void finalize_target_page_bits(struct uc_struct *uc) if (uc->init_target_page->bits == 0) { uc->init_target_page->bits = TARGET_PAGE_BITS_MIN; } - uc->init_target_page->mask = (target_long)-1 << uc->init_target_page->bits; + uc->init_target_page->mask = ((target_ulong)-1) << uc->init_target_page->bits; uc->init_target_page->decided = true; /* diff --git a/qemu/target/mips/translate.c b/qemu/target/mips/translate.c index 11617489..cbff2e88 100644 --- a/qemu/target/mips/translate.c +++ b/qemu/target/mips/translate.c @@ -37,7 +37,7 @@ #define MIPS_DEBUG_DISAS 0 /* MIPS major opcodes */ -#define MASK_OP_MAJOR(op) (op & (0x3F << 26)) +#define MASK_OP_MAJOR(op) (op & (0x3FL << 26)) enum { /* indirect opcode tables */