From patchwork Fri Dec 13 17:31:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 850202 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp1643080wry; Fri, 13 Dec 2024 09:44:58 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWxNE43aD4txrOblD2Ou8/NeL4N30zYZYa3Tuw3GrB3m1eJwFxBllSQDGOXb0Lsz6/2g28K/g==@linaro.org X-Google-Smtp-Source: AGHT+IFbCG5MJZ3lXVJ63olat0kfSvUq7mKK4s0vz2zpbeilrFvEDfaRyU5Yh5zldUdv2RdaCHcw X-Received: by 2002:a17:906:b5b:b0:aab:9145:30a8 with SMTP id a640c23a62f3a-aab9145311emr103459866b.50.1734111897950; Fri, 13 Dec 2024 09:44:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734111897; cv=none; d=google.com; s=arc-20240605; b=AYiWiCY3a8uru/cG1rySLCOq1fxXZyAWceQLdjxEpcQ2l3te8C3PKKqB4bpfU4IYmf XCrK8KbK/yew3MnxpaUQnbnjEi7S8l3OtA9VcEfpGnslKfyZdaNmSIumE0w1bo5s9zmj SqzhIGx5KZCU2uNhQ3dxKlE78YofZeDrSnummEXN2cam9aAxiu2Xkp9jwj2LCLoaXY4+ xw/2J3s4MNPLkfniP2GdfpG59t36u9MKfmwhbV0J8TAuhRQMUEuZhjOzK3MLhwr69g07 wUVv46Y5zFuiGtYGYHdLqnK397cBy9Ytli2V7YOCPssGQeIPS+a+z4rDpjWiKQitnuyP lXtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=K6tFM8RqNXAp8SOBzyhkiiQ54MPDAGBytFPbzLtpuXE=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=bSAq8RoyfifFaKmAZJcuttijNyFMlV0mcGfUCCxvMBf+l0xQLFC+HlPHSsVOXA8nw6 Blylz1RVLfaOUVHzA1XNoy0GKEW9UR0J5X8Gx/q59avitCbMwFDGGxyT1V/DdmHgZh6P xn+wUEP+xYwbd/8CXR9jFgkrfXQkqetvqZWNjwkY/U5Lysx0Cgc5Srj+T2aIg/okDESl 5QgD3jhxSdFDy61zz/CRaz68i+mFNB7W0rMPJH5moudlmiEJdzlgGCEw5/oaub3XzRUs OSkuCerNQOLSh+6csYattyVnxBvdW1TANZHtzNMQ0O5vcn8/X/ElN7G1Ndr1CczYwvP5 GwLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WlNpwxzb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a640c23a62f3a-aa6261d4843si1297933966b.786.2024.12.13.09.44.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Dec 2024 09:44:57 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WlNpwxzb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM9Xi-0007lU-0v; Fri, 13 Dec 2024 12:33:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tM9XK-0007BO-Sn for qemu-devel@nongnu.org; Fri, 13 Dec 2024 12:33:12 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM9XI-0001Zl-SX for qemu-devel@nongnu.org; Fri, 13 Dec 2024 12:33:10 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-38632b8ae71so1477163f8f.0 for ; Fri, 13 Dec 2024 09:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734111186; x=1734715986; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=K6tFM8RqNXAp8SOBzyhkiiQ54MPDAGBytFPbzLtpuXE=; b=WlNpwxzbpZjDU4AhOZS3f/+kcM24JD+DbCYvDGspPgHP4ORzfwRBTvWzPROnvxCvhu bXt04cg/yvXjxWBGny8cnscoe1psKpJM66PxiCjXEKjruoFth6QpBV7giWka/BIxRRxP dl2jO0LlrYraVBVsLk8J7uMCp2doMxl7R9Hch6IxS7KYj1dnrk9tYuUSIJSz1dEv66dd O5A1wXOGHPY4MNa9VRuu1V5BdKcVCGw0y5+EY8GlZ1UjWUvlgYyvwFm3LXIIzSsmnnSF dG5N5qAtrsKoE0yzuzlBzuQG6xqOYgv8jkGlbg4IRz7sqkA1LNw9xlzFRirx3fP2T/SK M5Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734111186; x=1734715986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K6tFM8RqNXAp8SOBzyhkiiQ54MPDAGBytFPbzLtpuXE=; b=V6kz+7Dr7M8c3LCEyb84bGtfrgLLhK1xAzMRA4MWqMsoYh4mh2k9hOJ5P0Mm0sFMFJ Cw0pzHLduv9m+AGlRkcxDuvtpNA+m38JLFZvuUgeXkE3BS5pLpyFKPwFEMrofz0mzW5e 88o43/4HdwqD6ZxkFczJcwRGNf4YyAvnA9rpe+5VKSTv7oof0/VZ5aF/WnfNLwKvGXKS MqByaPABfjv1Lvps5+xeg5Aij8ZbCHz6dz6Q/MUCZKYeg4spTdPNQjKrxn4m8Dnf0Ev3 7NkEo9+JWy0mOs66VLDfQ/2GoWPXpX7/VrOXfD3UhTSpkI+Vogq0Jsu98Rk4GhHTA2VL 2Ejw== X-Gm-Message-State: AOJu0YwbQyNgJqWBEzQ1UAXYU1UO1YEQYDbt8Y3V1XPEqpG018oM2dPI Jk5kS48hbbk62xnKrvFBGaH6XIg4KOJ7vcdvqAGxhPLrFeAIvVcbaaZ1zwcFtxhtG2G4TLghP1g p X-Gm-Gg: ASbGnctkXt+Q8tF8HLF7VHFXJYa5LOZ3gCQgbpOAfMd3Q7q42EwpiACV7Zjgi0rL7Cs PVQCLhOvbRYymhdmzfu+lzA2NINUcF93yMJwVTdUATdn1p7ogr2FR9JZAhEX8OoZnxMI/FMdPbT 59tvsk9ydTtpSUOhxKidDOtiDZnBefkOyK8MPh3YVt8FV3fBau8wEMrkTGyhDS2xjQZ0wENBfGZ QGxlIU3tuOJ00JPCfKGazfx2dSUasTszDC8Ik7pYuGNZvXHCAYK/8a0T/wBtQ== X-Received: by 2002:a05:6000:4012:b0:385:ecdf:a30a with SMTP id ffacd0b85a97d-38880adb32cmr3273864f8f.33.1734111186486; Fri, 13 Dec 2024 09:33:06 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c80162ddsm87026f8f.37.2024.12.13.09.33.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 09:33:05 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 33/85] target/arm: Convert FJCVTZS to decodetree Date: Fri, 13 Dec 2024 17:31:37 +0000 Message-Id: <20241213173229.3308926-34-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241213173229.3308926-1-peter.maydell@linaro.org> References: <20241213173229.3308926-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20241211163036.2297116-34-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 2 ++ target/arm/tcg/translate-a64.c | 41 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 5e170cec7a8..cd109616184 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -1363,6 +1363,8 @@ FCVTZU_g . 0011110 .. 111001 000000 ..... ..... @icvt FCVTAS_g . 0011110 .. 100100 000000 ..... ..... @icvt FCVTAU_g . 0011110 .. 100101 000000 ..... ..... @icvt +FJCVTZS 0 0011110 01 111110 000000 ..... ..... @rr + # Floating-point data processing (1 source) FMOV_s 00011110 .. 1 000000 10000 ..... ..... @rr_hsd diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 67227e26767..d260b45ddb2 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -8714,6 +8714,26 @@ TRANS(FCVTZU_g, do_fcvt_g, a, FPROUNDING_ZERO, false) TRANS(FCVTAS_g, do_fcvt_g, a, FPROUNDING_TIEAWAY, true) TRANS(FCVTAU_g, do_fcvt_g, a, FPROUNDING_TIEAWAY, false) +static bool trans_FJCVTZS(DisasContext *s, arg_FJCVTZS *a) +{ + if (!dc_isar_feature(aa64_jscvt, s)) { + return false; + } + if (fp_access_check(s)) { + TCGv_i64 t = read_fp_dreg(s, a->rn); + TCGv_ptr fpstatus = fpstatus_ptr(FPST_FPCR); + + gen_helper_fjcvtzs(t, t, fpstatus); + + tcg_gen_ext32u_i64(cpu_reg(s, a->rd), t); + tcg_gen_extrh_i64_i32(cpu_ZF, t); + tcg_gen_movi_i32(cpu_CF, 0); + tcg_gen_movi_i32(cpu_NF, 0); + tcg_gen_movi_i32(cpu_VF, 0); + } + return true; +} + static void handle_fmov(DisasContext *s, int rd, int rn, int type, bool itof) { /* FMOV: gpr to or from float, double, or top half of quad fp reg, @@ -8775,20 +8795,6 @@ static void handle_fmov(DisasContext *s, int rd, int rn, int type, bool itof) } } -static void handle_fjcvtzs(DisasContext *s, int rd, int rn) -{ - TCGv_i64 t = read_fp_dreg(s, rn); - TCGv_ptr fpstatus = fpstatus_ptr(FPST_FPCR); - - gen_helper_fjcvtzs(t, t, fpstatus); - - tcg_gen_ext32u_i64(cpu_reg(s, rd), t); - tcg_gen_extrh_i64_i32(cpu_ZF, t); - tcg_gen_movi_i32(cpu_CF, 0); - tcg_gen_movi_i32(cpu_NF, 0); - tcg_gen_movi_i32(cpu_VF, 0); -} - /* Floating point <-> integer conversions * 31 30 29 28 24 23 22 21 20 19 18 16 15 10 9 5 4 0 * +----+---+---+-----------+------+---+-------+-----+-------------+----+----+ @@ -8843,13 +8849,6 @@ static void disas_fp_int_conv(DisasContext *s, uint32_t insn) break; case 0b00111110: /* FJCVTZS */ - if (!dc_isar_feature(aa64_jscvt, s)) { - goto do_unallocated; - } else if (fp_access_check(s)) { - handle_fjcvtzs(s, rd, rn); - } - break; - default: do_unallocated: unallocated_encoding(s);