aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-arm/translate-a64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index 161f18bb66..15c2fde759 100644
--- a/target-arm/translate-a64.c
+++ b/target-arm/translate-a64.c
@@ -1827,7 +1827,7 @@ static void disas_pc_rel_adr(DisasContext *s, uint32_t insn)
int64_t offset; /* SignExtend(immhi:immlo) -> offset */
page = insn & (1 << 31) ? 1 : 0;
- offset = sextract32(insn, 5, 19) << 2 | extract32(insn, 29, 2);
+ offset = ((int64_t)sextract32(insn, 5, 19) << 2) | extract32(insn, 29, 2);
rd = extract32(insn, 0, 5);
base = s->pc - 4;