Received: from eggs.gnu.org ([2001:4830:134:3::10]:47603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cemna-0003yf-DA for qemu-devel@nongnu.org; Fri, 17 Feb 2017 12:58:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cemnX-0003fP-9h for qemu-devel@nongnu.org; Fri, 17 Feb 2017 12:58:26 -0500 From: Nick Reilly Date: Fri, 17 Feb 2017 12:58:04 -0500 Message-Id: <1487354284-7587-1-git-send-email-nreilly@blackberry.com> Subject: [Qemu-devel] [PATCH] Add missing fp_access_check() to aarch64 crypto instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: peter.maydell@linaro.org, Nick Reilly The aarch64 crypto instructions for AES and SHA are missing the check for if the FPU is enabled. Signed-off-by: Nick Reilly --- target/arm/translate-a64.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index e61bbd6..8105e7e 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -10929,6 +10929,10 @@ static void disas_crypto_aes(DisasContext *s, uint32_t insn) return; } + if (!fp_access_check(s)) { + return; + } + /* Note that we convert the Vx register indexes into the * index within the vfp.regs[] array, so we can share the * helper with the AArch32 instructions. @@ -10993,6 +10997,10 @@ static void disas_crypto_three_reg_sha(DisasContext *s, uint32_t insn) return; } + if (!fp_access_check(s)) { + return; + } + tcg_rd_regno = tcg_const_i32(rd << 1); tcg_rn_regno = tcg_const_i32(rn << 1); tcg_rm_regno = tcg_const_i32(rm << 1); @@ -11056,6 +11064,10 @@ static void disas_crypto_two_reg_sha(DisasContext *s, uint32_t insn) return; } + if (!fp_access_check(s)) { + return; + } + tcg_rd_regno = tcg_const_i32(rd << 1); tcg_rn_regno = tcg_const_i32(rn << 1); -- 1.9.1