From 0b7f1ff086bc3a380fc61eea7cf7d44e696132dd Mon Sep 17 00:00:00 2001 From: Remi Denis-Courmont Date: Sun, 3 Feb 2019 17:53:48 -0500 Subject: [PATCH] target/arm: fix decoding of B{,L}RA{A,B} A flawed test lead to the instructions always being treated as unallocated encodings. Fixes: https://bugs.launchpad.net/bugs/1813460 Backports commit 1cf86a8618644beb860951ff4383457ee88a7f4a from qemu --- qemu/target/arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target/arm/translate-a64.c b/qemu/target/arm/translate-a64.c index 64cbc152..cbb54931 100644 --- a/qemu/target/arm/translate-a64.c +++ b/qemu/target/arm/translate-a64.c @@ -2117,7 +2117,7 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn) if (!dc_isar_feature(aa64_pauth, s)) { goto do_unallocated; } - if (op3 != 2 || op3 != 3) { + if ((op3 & ~1) != 2) { goto do_unallocated; } if (s->pauth_active) {