From nobody Mon Feb 9 10:52:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) client-ip=209.85.128.45; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f45.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.zohomail.com with SMTPS id 1613690928733220.9396255241495; Thu, 18 Feb 2021 15:28:48 -0800 (PST) Received: by mail-wm1-f45.google.com with SMTP id l17so5146406wmq.2 for ; Thu, 18 Feb 2021 15:28:48 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id j40sm8918938wmp.47.2021.02.18.15.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 15:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UbCbe7JoTiE4HG47VRxDttCSYMBJO1p5W411N64P0j4=; b=Re1FCiuZ3bw2BDoIcGme+ztzLmAzncc6+EjeJLU8uUzBOntQpMhbGHNGd0x7Sn1jZg OXYJdZd9p/+rb4ZdhgHDcsJ4CDu4aHK2qgrohGbx++jv99LUe17RiKaIbpzV3iTozZUn kAY2Ii3VGdp1vk8ZzFbGgELZVfUwBB3AlNLB2+/gsE45lspbWr4GpESn9qOzIq+DE9Uj jufFAlo0ylG1v5CyMB+irv3z3ydKATHf4pQrSyjJZBggC7iOVnqdQlan+2P4a0ukQLk1 /7jsKbFZ4KqF0FCmqO5ORztaqfQqMUztHRQUbhFHd7SXs3gJECnoEKdj6KGjXNlY+408 yY+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=UbCbe7JoTiE4HG47VRxDttCSYMBJO1p5W411N64P0j4=; b=AnFlQLelyjJtSZVUN3mvRkk4FmKaY0RPYFOj1XHZrSNQ/G+PU9EyiwSGCaBUGcFEib NHhHCj05Y/BjSlq+eMGftoJVlmC1hXbHdOrc+is90r/XSoo4j/vvrz7dTYH0exlWVEkV 9h2zBZ0ggC5QETSKlA0FHAOT/MqmoMUMXiPgE9tzmN/6ezOa+dnCjnMglA3oODM4yDSR Hs0Az6qUmAC8luMREbkJr9uLrSHCke/1UUU8QbO5ZNz+B8qf4Dc2WXNI8ItRkKaXbnnh Y9WQWrd6196c5IURwU6ZAYE6X/abvrd7appqBUfiWXsFab4qsG1VQQTrB2dgfuL4NrAE CypA== X-Gm-Message-State: AOAM530rlaNgoavaYJDldGWiSBCRKr28ABNEcSIkSpBpdfLtsTq4o/N9 EyH8fEKe66dLnP6yGWvXoEM= X-Google-Smtp-Source: ABdhPJyO/HK0xsGFRG1uFXcyspZMEX83aFUtKw2rtcAQ05VM6FJtHgBeuj5eLNtma2xpQYiQ9m0GfQ== X-Received: by 2002:a05:600c:3546:: with SMTP id i6mr5655798wmq.24.1613690926940; Thu, 18 Feb 2021 15:28:46 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/5] tcg/tci: Merge identical cases in generation (arithmetic opcodes) Date: Fri, 19 Feb 2021 00:28:36 +0100 Message-Id: <20210218232840.1760806-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210218232840.1760806-1-f4bug@amsat.org> References: <20210218232840.1760806-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Richard Henderson Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210217202036.1724901-5-richard.henderson@linaro.org> [PMD: Split patch as 1/5] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tcg/tci/tcg-target.c.inc | 85 +++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 48 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index feac4659cc8..ea42775cb03 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -380,6 +380,18 @@ static inline void tcg_out_call(TCGContext *s, const t= cg_insn_unit *arg) old_code_ptr[1] =3D s->code_ptr - old_code_ptr; } =20 +#if TCG_TARGET_REG_BITS =3D=3D 64 +# define CASE_32_64(x) \ + case glue(glue(INDEX_op_, x), _i64): \ + case glue(glue(INDEX_op_, x), _i32): +# define CASE_64(x) \ + case glue(glue(INDEX_op_, x), _i64): +#else +# define CASE_32_64(x) \ + case glue(glue(INDEX_op_, x), _i32): +# define CASE_64(x) +#endif + static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, const int *const_args) { @@ -391,6 +403,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, co= nst TCGArg *args, case INDEX_op_exit_tb: tcg_out64(s, args[0]); break; + case INDEX_op_goto_tb: if (s->tb_jmp_insn_offset) { /* Direct jump method. */ @@ -456,22 +469,27 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, = const TCGArg *args, tcg_debug_assert(args[2] =3D=3D (int32_t)args[2]); tcg_out32(s, args[2]); break; - case INDEX_op_add_i32: - case INDEX_op_sub_i32: - case INDEX_op_mul_i32: - case INDEX_op_and_i32: - case INDEX_op_andc_i32: /* Optional (TCG_TARGET_HAS_andc_i32). */ - case INDEX_op_eqv_i32: /* Optional (TCG_TARGET_HAS_eqv_i32). */ - case INDEX_op_nand_i32: /* Optional (TCG_TARGET_HAS_nand_i32). */ - case INDEX_op_nor_i32: /* Optional (TCG_TARGET_HAS_nor_i32). */ - case INDEX_op_or_i32: - case INDEX_op_orc_i32: /* Optional (TCG_TARGET_HAS_orc_i32). */ - case INDEX_op_xor_i32: - case INDEX_op_shl_i32: - case INDEX_op_shr_i32: - case INDEX_op_sar_i32: - case INDEX_op_rotl_i32: /* Optional (TCG_TARGET_HAS_rot_i32). */ - case INDEX_op_rotr_i32: /* Optional (TCG_TARGET_HAS_rot_i32). */ + + CASE_32_64(add) + CASE_32_64(sub) + CASE_32_64(mul) + CASE_32_64(and) + CASE_32_64(or) + CASE_32_64(xor) + CASE_32_64(andc) /* Optional (TCG_TARGET_HAS_andc_*). */ + CASE_32_64(orc) /* Optional (TCG_TARGET_HAS_orc_*). */ + CASE_32_64(eqv) /* Optional (TCG_TARGET_HAS_eqv_*). */ + CASE_32_64(nand) /* Optional (TCG_TARGET_HAS_nand_*). */ + CASE_32_64(nor) /* Optional (TCG_TARGET_HAS_nor_*). */ + CASE_32_64(shl) + CASE_32_64(shr) + CASE_32_64(sar) + CASE_32_64(rotl) /* Optional (TCG_TARGET_HAS_rot_*). */ + CASE_32_64(rotr) /* Optional (TCG_TARGET_HAS_rot_*). */ + CASE_32_64(div) /* Optional (TCG_TARGET_HAS_div_*). */ + CASE_32_64(divu) /* Optional (TCG_TARGET_HAS_div_*). */ + CASE_32_64(rem) /* Optional (TCG_TARGET_HAS_div_*). */ + CASE_32_64(remu) /* Optional (TCG_TARGET_HAS_div_*). */ tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); tcg_out_r(s, args[2]); @@ -487,30 +505,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, break; =20 #if TCG_TARGET_REG_BITS =3D=3D 64 - case INDEX_op_add_i64: - case INDEX_op_sub_i64: - case INDEX_op_mul_i64: - case INDEX_op_and_i64: - case INDEX_op_andc_i64: /* Optional (TCG_TARGET_HAS_andc_i64). */ - case INDEX_op_eqv_i64: /* Optional (TCG_TARGET_HAS_eqv_i64). */ - case INDEX_op_nand_i64: /* Optional (TCG_TARGET_HAS_nand_i64). */ - case INDEX_op_nor_i64: /* Optional (TCG_TARGET_HAS_nor_i64). */ - case INDEX_op_or_i64: - case INDEX_op_orc_i64: /* Optional (TCG_TARGET_HAS_orc_i64). */ - case INDEX_op_xor_i64: - case INDEX_op_shl_i64: - case INDEX_op_shr_i64: - case INDEX_op_sar_i64: - case INDEX_op_rotl_i64: /* Optional (TCG_TARGET_HAS_rot_i64). */ - case INDEX_op_rotr_i64: /* Optional (TCG_TARGET_HAS_rot_i64). */ - case INDEX_op_div_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - case INDEX_op_divu_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - case INDEX_op_rem_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - case INDEX_op_remu_i64: /* Optional (TCG_TARGET_HAS_div_i64). */ - tcg_out_r(s, args[0]); - tcg_out_r(s, args[1]); - tcg_out_r(s, args[2]); - break; case INDEX_op_deposit_i64: /* Optional (TCG_TARGET_HAS_deposit_i64). = */ tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); @@ -551,14 +545,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); break; - case INDEX_op_div_i32: /* Optional (TCG_TARGET_HAS_div_i32). */ - case INDEX_op_divu_i32: /* Optional (TCG_TARGET_HAS_div_i32). */ - case INDEX_op_rem_i32: /* Optional (TCG_TARGET_HAS_div_i32). */ - case INDEX_op_remu_i32: /* Optional (TCG_TARGET_HAS_div_i32). */ - tcg_out_r(s, args[0]); - tcg_out_r(s, args[1]); - tcg_out_r(s, args[2]); - break; + #if TCG_TARGET_REG_BITS =3D=3D 32 case INDEX_op_add2_i32: case INDEX_op_sub2_i32: @@ -628,8 +615,10 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, } tcg_out_i(s, *args++); break; + case INDEX_op_mb: break; + case INDEX_op_mov_i32: /* Always emitted via tcg_out_mov. */ case INDEX_op_mov_i64: case INDEX_op_call: /* Always emitted via tcg_out_call. */ --=20 2.26.2 From nobody Mon Feb 9 10:52:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) client-ip=209.85.221.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613690933; cv=none; d=zohomail.com; s=zohoarc; b=R0LtPLik+RybCXXibCVpwVltsRQH8Am8vi6B0GKDWk+lqiG/AozktZ7bArmmJZUzDE69ODvPqvzoIHYMJQrcRmZskH/CiiTs7QcG4LR26CsN6fUOPVXYG39NOyIcoD9QHehXVe84YfpD2Gsq/JWU36p3FG/Aj8JBrMpnmfq+a1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613690933; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3ZhtTOmOcuAwJkpiP3SNlP+RXPtaVYBvq0r03hY5TCU=; b=JVM+9i8FBUruAIIUGD28xDTNfBdZA0IVPSZuAlx+c2Yp4GMGglhl3aCpwRNbGpzsY4Kz0K4Z+wstMTj1WX/cWfKCgIZS7PF8Ckc5oSjrqCbp3AeQ63CVDfSBEBBf1vzmsFvGl+JguHloU+8GLnw4Nw4iRQk3oNzp4rDCcWANGts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.zohomail.com with SMTPS id 161369093338030.474848680659875; Thu, 18 Feb 2021 15:28:53 -0800 (PST) Received: by mail-wr1-f54.google.com with SMTP id n8so4744724wrm.10 for ; Thu, 18 Feb 2021 15:28:52 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id j17sm9307200wmc.28.2021.02.18.15.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 15:28:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3ZhtTOmOcuAwJkpiP3SNlP+RXPtaVYBvq0r03hY5TCU=; b=Xy77iNFrcNh6DU+f2pRM4mzdONTmbkmqMjCTmhi/9n2a61V9jMfLh2TMrx2pCVqoXP l+pkChwD+A3I8Woco3Xa6GhPG+W2PRPiBR3QoHV23JLZS8G4x3CbBrkWvIFfmrDs5zX2 MopjpgmP0v+BhEi5twwVd5A5DeJiQaFOe6ML11p3bWynQVLC9kaIKM0rmjrdlYo4n+4F cP6YJz6VFKaC1+hI6ihxnEBb2nT3nVjwIPktw9v6w7RenOR9qpv5jXJE/2wy+8IIvWFF CmT7judjGX5YySl0oQ0egE2PkPQ9+WqzkZ3V6fsyLzPaz6nmStN+fJeAjfwi40lc+E72 XESw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3ZhtTOmOcuAwJkpiP3SNlP+RXPtaVYBvq0r03hY5TCU=; b=RZpg/xsknaIgPmy1Z7HHyyB1Iw8kEuPgfu8hWXMIrNJnYdQaCgTFP585mowedrGEsC +KwvMLf4A6yRuYqWlglNNgsL+RfdNEJiE2EBmQRxh9wZiRGGjOhiBu9CKLnmdyRoPAmR LyvcHTojbsMHcmMb6mA40HN5FarO4PjRkYf2N98hIPbsFyU8TVYOGWvL1Kvg0URXkdB1 nzOOJlnHtQ43Pmjce2cNtVghp6wBbcC+MesoV6FwtUUnd5dkOi3SjVGwQs4m4n2klV0H kEC7JAf2OLbPN7phiQT0iuJ7IXrlRJLfzAY3F4MBLBCVztONoH1pM0v/mL094QfMwMVs 5dMw== X-Gm-Message-State: AOAM5315FOvjtrKFVpvU3KA7HRKFCpUYiTY/m88e4+rPgh0n/eEgSQnM rsW19Aic/YW0GzFKF4kU7YM= X-Google-Smtp-Source: ABdhPJxcn4zWhqiWcWrCJccP7l8lc3dzFWI6MIgPq44m2DpjfuKFUCQJrer7B1RN44eoEXTSCPdyWw== X-Received: by 2002:a5d:550c:: with SMTP id b12mr6670838wrv.200.1613690931573; Thu, 18 Feb 2021 15:28:51 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/5] tcg/tci: Merge identical cases in generation (exchange opcodes) Date: Fri, 19 Feb 2021 00:28:37 +0100 Message-Id: <20210218232840.1760806-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210218232840.1760806-1-f4bug@amsat.org> References: <20210218232840.1760806-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Richard Henderson Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210217202036.1724901-5-richard.henderson@linaro.org> [PMD: Split patch as 2/5] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tcg/tci/tcg-target.c.inc | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index ea42775cb03..1896efd1006 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -520,28 +520,21 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, = const TCGArg *args, tcg_out8(s, args[2]); /* condition */ tci_out_label(s, arg_label(args[3])); break; - case INDEX_op_bswap16_i64: /* Optional (TCG_TARGET_HAS_bswap16_i64). = */ - case INDEX_op_bswap32_i64: /* Optional (TCG_TARGET_HAS_bswap32_i64). = */ - case INDEX_op_bswap64_i64: /* Optional (TCG_TARGET_HAS_bswap64_i64). = */ - case INDEX_op_not_i64: /* Optional (TCG_TARGET_HAS_not_i64). */ - case INDEX_op_neg_i64: /* Optional (TCG_TARGET_HAS_neg_i64). */ - case INDEX_op_ext8s_i64: /* Optional (TCG_TARGET_HAS_ext8s_i64). */ - case INDEX_op_ext8u_i64: /* Optional (TCG_TARGET_HAS_ext8u_i64). */ - case INDEX_op_ext16s_i64: /* Optional (TCG_TARGET_HAS_ext16s_i64). */ - case INDEX_op_ext16u_i64: /* Optional (TCG_TARGET_HAS_ext16u_i64). */ - case INDEX_op_ext32s_i64: /* Optional (TCG_TARGET_HAS_ext32s_i64). */ - case INDEX_op_ext32u_i64: /* Optional (TCG_TARGET_HAS_ext32u_i64). */ - case INDEX_op_ext_i32_i64: - case INDEX_op_extu_i32_i64: #endif /* TCG_TARGET_REG_BITS =3D=3D 64 */ - case INDEX_op_neg_i32: /* Optional (TCG_TARGET_HAS_neg_i32). */ - case INDEX_op_not_i32: /* Optional (TCG_TARGET_HAS_not_i32). */ - case INDEX_op_ext8s_i32: /* Optional (TCG_TARGET_HAS_ext8s_i32). */ - case INDEX_op_ext16s_i32: /* Optional (TCG_TARGET_HAS_ext16s_i32). */ - case INDEX_op_ext8u_i32: /* Optional (TCG_TARGET_HAS_ext8u_i32). */ - case INDEX_op_ext16u_i32: /* Optional (TCG_TARGET_HAS_ext16u_i32). */ - case INDEX_op_bswap16_i32: /* Optional (TCG_TARGET_HAS_bswap16_i32). = */ - case INDEX_op_bswap32_i32: /* Optional (TCG_TARGET_HAS_bswap32_i32). = */ + + CASE_32_64(neg) /* Optional (TCG_TARGET_HAS_neg_*). */ + CASE_32_64(not) /* Optional (TCG_TARGET_HAS_not_*). */ + CASE_32_64(ext8s) /* Optional (TCG_TARGET_HAS_ext8s_*). */ + CASE_32_64(ext8u) /* Optional (TCG_TARGET_HAS_ext8u_*). */ + CASE_32_64(ext16s) /* Optional (TCG_TARGET_HAS_ext16s_*). */ + CASE_32_64(ext16u) /* Optional (TCG_TARGET_HAS_ext16u_*). */ + CASE_64(ext32s) /* Optional (TCG_TARGET_HAS_ext32s_i64). */ + CASE_64(ext32u) /* Optional (TCG_TARGET_HAS_ext32u_i64). */ + CASE_64(ext_i32) + CASE_64(extu_i32) + CASE_32_64(bswap16) /* Optional (TCG_TARGET_HAS_bswap16_*). */ + CASE_32_64(bswap32) /* Optional (TCG_TARGET_HAS_bswap32_*). */ + CASE_64(bswap64) /* Optional (TCG_TARGET_HAS_bswap64_i64). */ tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); break; --=20 2.26.2 From nobody Mon Feb 9 10:52:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) client-ip=209.85.221.44; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f44.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613690938; cv=none; d=zohomail.com; s=zohoarc; b=C9Z0z4UM/WAPtEIJWlyqjDoVGqV0u+aWH5pEWR66dBwcH364+saD24TEwgrWJVkhUwbJ11Tkc6UHZU0ClkDNxRtqn03oMi+Pxr6q2lWmKG9GDbK0GKSgTp6mEp2tHRSDOd+GvbxSv/BfW7l/lWnXMsowWeiHDeVRYc6TVpus4xY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613690938; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XXMkXBsF42vikYhWm6f6trPmrfhthLvIloNBgjaGteM=; b=PB1JhLla/30Ez7CGNwxZVwF5xTsSl0DgANNOVyXWuRsL3AZ7XzrvTqw7tIVlfmsGzbS6gEIB0CHfNJmA5w53+/Xfebjj1GwoXJ06nIOy1yZ7jZ3/2eMUAh3TZCv7vTPgjIj6M4s6hRNbE6J9uvk2cErz5fyyUx/ktrMQOju1bTA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.zohomail.com with SMTPS id 1613690937852436.15580303440856; Thu, 18 Feb 2021 15:28:57 -0800 (PST) Received: by mail-wr1-f44.google.com with SMTP id b3so4781104wrj.5 for ; Thu, 18 Feb 2021 15:28:57 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id 64sm12328012wrc.50.2021.02.18.15.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 15:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XXMkXBsF42vikYhWm6f6trPmrfhthLvIloNBgjaGteM=; b=fBbbRjMD3joQj20o1bPi6McfeLQOmLnTPQByudyL9INOSZ39LQhc2Mc2oa+3n8Oftc qdFaIBhF9i/RSHSYXwy20xqeXZ0vNrjGssbsKNbGQ8FcJzx7yX9mUL26XompY4JckxW6 dbwBbQ04fiO5pvRfGUjM/bAC3SP8h+G+12qKQjjfvq11ZFAVijvok9HocaIqFCywXDXG obdrf9vtBvTeB9LbErxLjhD2bMZNJSoVD3vQYSVZzbCN0x4g2OYe8JSF4yjfHQId/z7J MsrPyC2kIXrOpR4XzgPA/CKUIb1SRPD7YR+m9MARXUvOZYSLP5syhIEyf85FepR1I4NH wwxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XXMkXBsF42vikYhWm6f6trPmrfhthLvIloNBgjaGteM=; b=Yf6hCy1e+xR9a0wo5+x/Uqef95ZHLa2M6htum210P/NS72z9pqJvSTYb/iAyjdQZUA Id+B1/bJWCQjeXILNyMbj/kCYb4gS6IUQk+eR8EuVeBtXRDp3Ox8OWHZksIpvLpIVZ+J g5cRmkDM9Aszjpsj1ADSUKQ/BWTm0MQ+dN/2foUmgT1RoQIwsDvoLlJUSBggLT34uzQV PHCDo+vrc27Y5V7yWbbIJ9W4+Dyy/1jno8QPOWq8qk5OALorIBc9Fo/3lUqe79HdYCre eBgx2VweZbWjQhRoZcJNyobSiNCQWWvsGeBzf8ZSlym1EqY8D5y9zpWQIGuwzPtkUKcD n1Iw== X-Gm-Message-State: AOAM5303ngWWTIrAvfxEMQcZCSUV2mVddFTON+WaN5A081eWiL+QkJdO c6MC9QX96XCH4FJfwDninsE= X-Google-Smtp-Source: ABdhPJyicduoxsmCMAvSK3yw/1xCq4DYSvQL96NtDA/mjr0ihd0NhZgHmghYQXTCaPGY0+CdkmhySw== X-Received: by 2002:a5d:40cd:: with SMTP id b13mr6360482wrq.3.1613690936170; Thu, 18 Feb 2021 15:28:56 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/5] tcg/tci: Merge identical cases in generation (deposit opcode) Date: Fri, 19 Feb 2021 00:28:38 +0100 Message-Id: <20210218232840.1760806-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210218232840.1760806-1-f4bug@amsat.org> References: <20210218232840.1760806-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Richard Henderson Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210217202036.1724901-5-richard.henderson@linaro.org> [PMD: Split patch as 3/5] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tcg/tci/tcg-target.c.inc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 1896efd1006..4a86a3bb466 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -494,7 +494,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, co= nst TCGArg *args, tcg_out_r(s, args[1]); tcg_out_r(s, args[2]); break; - case INDEX_op_deposit_i32: /* Optional (TCG_TARGET_HAS_deposit_i32). = */ + + CASE_32_64(deposit) /* Optional (TCG_TARGET_HAS_deposit_*). */ tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); tcg_out_r(s, args[2]); @@ -505,15 +506,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, break; =20 #if TCG_TARGET_REG_BITS =3D=3D 64 - case INDEX_op_deposit_i64: /* Optional (TCG_TARGET_HAS_deposit_i64). = */ - tcg_out_r(s, args[0]); - tcg_out_r(s, args[1]); - tcg_out_r(s, args[2]); - tcg_debug_assert(args[3] <=3D UINT8_MAX); - tcg_out8(s, args[3]); - tcg_debug_assert(args[4] <=3D UINT8_MAX); - tcg_out8(s, args[4]); - break; case INDEX_op_brcond_i64: tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); --=20 2.26.2 From nobody Mon Feb 9 10:52:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) client-ip=209.85.221.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1613690942; cv=none; d=zohomail.com; s=zohoarc; b=ZMP+15wxuDY7j7OYMERswOGFuSSn3s2tgWr+UvD3yKEKWD9wNUhAdYpZS8Et+gCmwUH5IrhjgyW6wKSaLkIwV6PHKcRSMdgUgFa5eiceukiMFBSENT+Q/+4EpuKdEFxCfZL6VLvEIdBxN4upcCtjJX4jwR2L6SFjI9DvyhpkxQA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613690942; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oylI3wFZAxZOnCSrB2Lv4VednOQz6GcXzyENdSLrLcw=; b=Fan/GIYy+PMrR3eOVM5cimUGBC9ub0qM0PfOdqkwpro91Kuo83hGDDwXixPA3zSALV48bL8GZJrP04pB0Xr82NIQNVlwFHQN902GteawcaB+myiXkWcK0XBPNHnYnqULmuAnLfxCTGe5ivXY0pCLJTerP0vfnqI4JE+5t5Yli9U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.zohomail.com with SMTPS id 1613690942485170.0410055311619; Thu, 18 Feb 2021 15:29:02 -0800 (PST) Received: by mail-wr1-f54.google.com with SMTP id v14so4773186wro.7 for ; Thu, 18 Feb 2021 15:29:01 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id z5sm11108651wrn.8.2021.02.18.15.28.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 15:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oylI3wFZAxZOnCSrB2Lv4VednOQz6GcXzyENdSLrLcw=; b=ic7ahWeOAtpbZt8zVbft0bdTtGNXWpnhO12TdXItvZfvkEExCZpI54Jb7SgADOm0Jo kcNr0as6t+Bm/NUyEeol4+5su1ucyRQ0w9OkTVuoT9cNNPp9v+3H1yCMDRoDSOppmV4i LlELQBDHewZiR8JqXQ8gSYIrBnyQes9ulhshDthnBQeTA5jeKLuohqe2Fc+TQsT3lz0D 1A26H8/ydHYsnhsWdhA/ele05P85wuH1uk2g+QbEppA/KqfEOr9apUYeRDUCBIZLkl+e QyprBUgAt2kiPeZvG5yX/mAzZkcV/EjnGSXrS5Ich4PIS1t9aXRMVXIJ+qpNW+t6UVGU KuaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=oylI3wFZAxZOnCSrB2Lv4VednOQz6GcXzyENdSLrLcw=; b=dQWSCat/4jk7DHY7vkJz4hjfKQBIqDs8J7HJg78DwqTON/JLDDORghOQoUriiGrJxq BebrFrQm30UPVhk7lTqypZSYpNokcTVe0YeGje5gU5cXbyF1UbgHn4NZJWaEZ5uCwqY7 mvAkC8UU540oi099Dpll409wXSkAhVhTVBAMMX11gvp/jLiNmHPDzGQXXiL0UdSD2S87 rlRe1x8HbYrapmvl72aakOh7jwBhFjlP2j4TgEq6nJwrKH7KYMmEJ80mRV0WcEqKMOJI BafpsF8qqKIYiPLdt6daVjeWUCR+F/WsPSTfKJA3DDCqCdBwMDdY2c+rai2fm4ORnU/i 69PA== X-Gm-Message-State: AOAM5316uLqqCjj78x0zU/eq1W1DlPbSMmYlA5ZhjYCIqARelO/KRQ7+ r92RqI+kAV/AeFJk5Dlp1ac= X-Google-Smtp-Source: ABdhPJwbRn5nQtfcJoRGiaKO3I2jfUv1tdB4QG/ZxuoYCQ8+p10EvpMM9hGs/QsMms9RQTF+O65TNw== X-Received: by 2002:adf:9504:: with SMTP id 4mr6327667wrs.306.1613690940729; Thu, 18 Feb 2021 15:29:00 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] tcg/tci: Merge identical cases in generation (conditional opcodes) Date: Fri, 19 Feb 2021 00:28:39 +0100 Message-Id: <20210218232840.1760806-5-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210218232840.1760806-1-f4bug@amsat.org> References: <20210218232840.1760806-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Richard Henderson Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210217202036.1724901-5-richard.henderson@linaro.org> [PMD: Split patch as 4/5] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tcg/tci/tcg-target.c.inc | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 4a86a3bb466..f9893b9539e 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -417,15 +417,18 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, = const TCGArg *args, } set_jmp_reset_offset(s, args[0]); break; + case INDEX_op_br: tci_out_label(s, arg_label(args[0])); break; - case INDEX_op_setcond_i32: + + CASE_32_64(setcond) tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); tcg_out_r(s, args[2]); tcg_out8(s, args[3]); /* condition */ break; + #if TCG_TARGET_REG_BITS =3D=3D 32 case INDEX_op_setcond2_i32: /* setcond2_i32 cond, t0, t1_low, t1_high, t2_low, t2_high */ @@ -436,13 +439,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, tcg_out_r(s, args[4]); tcg_out8(s, args[5]); /* condition */ break; -#elif TCG_TARGET_REG_BITS =3D=3D 64 - case INDEX_op_setcond_i64: - tcg_out_r(s, args[0]); - tcg_out_r(s, args[1]); - tcg_out_r(s, args[2]); - tcg_out8(s, args[3]); /* condition */ - break; #endif case INDEX_op_ld8u_i32: case INDEX_op_ld8s_i32: @@ -505,14 +501,12 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, = const TCGArg *args, tcg_out8(s, args[4]); break; =20 -#if TCG_TARGET_REG_BITS =3D=3D 64 - case INDEX_op_brcond_i64: + CASE_32_64(brcond) tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); tcg_out8(s, args[2]); /* condition */ tci_out_label(s, arg_label(args[3])); break; -#endif /* TCG_TARGET_REG_BITS =3D=3D 64 */ =20 CASE_32_64(neg) /* Optional (TCG_TARGET_HAS_neg_*). */ CASE_32_64(not) /* Optional (TCG_TARGET_HAS_not_*). */ @@ -556,12 +550,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, tcg_out_r(s, args[3]); break; #endif - case INDEX_op_brcond_i32: - tcg_out_r(s, args[0]); - tcg_out_r(s, args[1]); - tcg_out8(s, args[2]); /* condition */ - tci_out_label(s, arg_label(args[3])); - break; + case INDEX_op_qemu_ld_i32: tcg_out_r(s, *args++); tcg_out_r(s, *args++); --=20 2.26.2 From nobody Mon Feb 9 10:52:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) client-ip=209.85.128.46; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f46.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.zohomail.com with SMTPS id 1613690947122135.0060836280719; Thu, 18 Feb 2021 15:29:07 -0800 (PST) Received: by mail-wm1-f46.google.com with SMTP id o24so5350798wmh.5 for ; Thu, 18 Feb 2021 15:29:06 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id b83sm4507958wmd.4.2021.02.18.15.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 15:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HWEzlOjuX0padjF5jmJWlKBlFUrkpDO3sa2VHTewRFM=; b=cfGrCKROdWsp8c+1vxcVc/rxpe5apTe9y67VYuVPhT02OTvyb49jaPz/jVBMWAfUuA A/CRcC4IaAnngaTY3QjW2v7xKD85QUe8XI+DWMQ7PQK9AFM95stso3G38Dzpt/XGUHef Lm3AABQJTheLakwNRMHouC5JXJ48v0AOposy1b4Hk0D52XsVjs4i5XbrHL8Arvf7K5Oq YSj9qwnxG0KSmesmXKh8aEgG0NANmn4o7UHB8t1jGyUZ4ACA1QbvGtch3onSbn/fgPqP odTFMX1Ko7h3xF4b5CV1gaE7ykUYL6hqBJ1Rf+unQov7SrJVB2azclaQjd4l2Tp38U+6 IeJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HWEzlOjuX0padjF5jmJWlKBlFUrkpDO3sa2VHTewRFM=; b=C8KxK24ECtn4vMZNj1ObezZo/pefdHMA53ecvzoUq9RVU3yE9OK6UZOWFyQfI3sQHs 3BB7gMauGfBXFqZ5XszS5EDx+9ghFstQDWLOZTq57Jl27g5q5QWRhpqBQEjWyrWLJdvU 4KyYgwG5NzzftA7NZlx06aB9TzKOqmm51BGrPjqfZw3+WczMYsemcKrGnUgVT3MC1QK3 X0MxZ2hERuQC/6vFtceubQOOsdNHGsOPAt9dK+DCQWV4+VC6NaQ76i+20gjTfkKEQsLf J7aA70XzthqcdNOpdu8ZxQOsURFiScOBAkjdO5Wvql0UiV3L7Cy6R9iC9HgcXVUhYKRC FBfg== X-Gm-Message-State: AOAM53178wzXZdhiu+9z9c7RJN2xhUCO4BFEtepME3UhlNPXG9TZoqLK rD+ZNiWFlEoiAALTjHtD3Wg= X-Google-Smtp-Source: ABdhPJzkIqVjTK1WpSmMcBlUqsKWoDrgzrHQdtw3ebEeOakCKmm09zT95WzUogU5qo9OpVR+5vQm/Q== X-Received: by 2002:a1c:4b05:: with SMTP id y5mr5539614wma.37.1613690945331; Thu, 18 Feb 2021 15:29:05 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 5/5] tcg/tci: Merge identical cases in generation (load/store opcodes) Date: Fri, 19 Feb 2021 00:28:40 +0100 Message-Id: <20210218232840.1760806-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210218232840.1760806-1-f4bug@amsat.org> References: <20210218232840.1760806-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Richard Henderson Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210217202036.1724901-5-richard.henderson@linaro.org> [PMD: Split patch as 5/5] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tcg/tci/tcg-target.c.inc | 49 ++++++++++++---------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index f9893b9539e..c79f9c32d8b 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -440,25 +440,20 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, = const TCGArg *args, tcg_out8(s, args[5]); /* condition */ break; #endif - case INDEX_op_ld8u_i32: - case INDEX_op_ld8s_i32: - case INDEX_op_ld16u_i32: - case INDEX_op_ld16s_i32: + + CASE_32_64(ld8u) + CASE_32_64(ld8s) + CASE_32_64(ld16u) + CASE_32_64(ld16s) case INDEX_op_ld_i32: - case INDEX_op_st8_i32: - case INDEX_op_st16_i32: + CASE_64(ld32u) + CASE_64(ld32s) + CASE_64(ld) + CASE_32_64(st8) + CASE_32_64(st16) case INDEX_op_st_i32: - case INDEX_op_ld8u_i64: - case INDEX_op_ld8s_i64: - case INDEX_op_ld16u_i64: - case INDEX_op_ld16s_i64: - case INDEX_op_ld32u_i64: - case INDEX_op_ld32s_i64: - case INDEX_op_ld_i64: - case INDEX_op_st8_i64: - case INDEX_op_st16_i64: - case INDEX_op_st32_i64: - case INDEX_op_st_i64: + CASE_64(st32) + CASE_64(st) stack_bounds_check(args[1], args[2]); tcg_out_r(s, args[0]); tcg_out_r(s, args[1]); @@ -552,24 +547,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, c= onst TCGArg *args, #endif =20 case INDEX_op_qemu_ld_i32: - tcg_out_r(s, *args++); - tcg_out_r(s, *args++); - if (TARGET_LONG_BITS > TCG_TARGET_REG_BITS) { - tcg_out_r(s, *args++); - } - tcg_out_i(s, *args++); - break; - case INDEX_op_qemu_ld_i64: - tcg_out_r(s, *args++); - if (TCG_TARGET_REG_BITS =3D=3D 32) { - tcg_out_r(s, *args++); - } - tcg_out_r(s, *args++); - if (TARGET_LONG_BITS > TCG_TARGET_REG_BITS) { - tcg_out_r(s, *args++); - } - tcg_out_i(s, *args++); - break; case INDEX_op_qemu_st_i32: tcg_out_r(s, *args++); tcg_out_r(s, *args++); @@ -578,6 +555,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, co= nst TCGArg *args, } tcg_out_i(s, *args++); break; + + case INDEX_op_qemu_ld_i64: case INDEX_op_qemu_st_i64: tcg_out_r(s, *args++); if (TCG_TARGET_REG_BITS =3D=3D 32) { --=20 2.26.2