From patchwork Sat Mar 6 21:35:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 394559 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp550560jai; Sat, 6 Mar 2021 13:40:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHdq4ok0bfSb1odwZgssNqqqPIGcGNYsOj3AEnhKM9rbI+KFWD/ucSj44C9fa5L3R685rY X-Received: by 2002:a05:6638:102f:: with SMTP id n15mr16453897jan.28.1615066831318; Sat, 06 Mar 2021 13:40:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615066831; cv=none; d=google.com; s=arc-20160816; b=b4PPpXW9Ar3o9cFi9meGZNDd5iY9USsgf2+HVHUVFHZLbPDu4lrK6RsXXA5jowmX8V Jd/2zjyUzoCvYNdMCVEfseBKXpfiGjKzduJjhDxVIRhjMh5AfdMJn93gdpNuGlhLA5SD VARijND4UI/tbxGjbPYY8BdPLY0p6jGJmmcGooGfr/tjKA93sMpo+L1UArEAeQt0z7Iv uG0ef7NuVW3pso5Afgtr3Y+8R/mmrBxcFMGsFMRNsWITgfSeYhVRt4ZFmLCZuqGWDASF qI7UOgSh9Sv4WB6m9BEXmWz68BjJ9Xx2AHZ6mXVGBGWrskKTh2mYki+oN8uAQ1zSNm6g nW5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=Y3W2C4gQqJ3gt54X13AfM/Luzq4svOq0hI3JMg2PfDU=; b=tIeiA9rqDlvke3ykItZAhul70ELjKS1UHTTErB64yrcdcBb4VP+DLQd6Vba4jVkV4x 8xZ/J2X7BqKUB0TWOunjF+ZlIlmr9HTO9FlEE/+Sv8Nf1o09DFdi5npkj7TjycoHkghs bw3Uahd3zC0U2A2dtaPsBeys+c/yGqcaoYnOxAGsVLBjG8AQFyivsMViN3+T09nxvMNU EulW95jkeyZ76pTqViyd+DI76ojJOoHgUnO5NeKSgD/Nbu8p1zINP2xLrV0eFjx/kXQH koQ5ISQnza88oZ7PhnFLwYqYBhxhuP54kXSR01PjKhuVd4+ZEO7YFKGySoGAPGXtqs3f MvBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QAw15lxD; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z9si5926921ior.7.2021.03.06.13.40.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Mar 2021 13:40:31 -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=QAw15lxD; 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 Received: from localhost ([::1]:35612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIef0-0005Oc-PT for patch@linaro.org; Sat, 06 Mar 2021 16:40:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIebD-0006zS-7K for qemu-devel@nongnu.org; Sat, 06 Mar 2021 16:36:35 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:53305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIeb3-0002xJ-GF for qemu-devel@nongnu.org; Sat, 06 Mar 2021 16:36:34 -0500 Received: by mail-pj1-x102d.google.com with SMTP id kx1so1071894pjb.3 for ; Sat, 06 Mar 2021 13:36:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y3W2C4gQqJ3gt54X13AfM/Luzq4svOq0hI3JMg2PfDU=; b=QAw15lxDhRBK0U0IRHVt5xlMrJn0Wigh+CbvSu9twgAwXLgBxBQZcsqbevXYhoINMx jjfSirTfO06LBCLBtHfP8k28WRE15dqFh8c2jmT3An0g3tzP9rpi7DPljHFRsT6jTX9h C5rDSLqqP0BxXCO7Rb27ee5dIZmQ3d1rDG+ZWdJBKhh+ah1ku6VYIVR5Q/6tDJFVvdQ5 BDc7s2GJHHe9MQN0a9hKwPmb72NkKlATGPacLxS9ugYs+tKQQgF0ALWOeY6qE41m4eXu UWmrqbDddx19TCVY2z+JGGneBVGyO4PaIpzzfXwFc7iRTomTfpqNrvnM+WnzDmfM6vjm uwHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y3W2C4gQqJ3gt54X13AfM/Luzq4svOq0hI3JMg2PfDU=; b=PN3I1dBEHira6/vsbbnyYxo3TvXk+17YxNKXNYnyZOd4tDftOD8G65B7oJ82wcBDR3 88DKhObZOerteXolBhOnxoyEj6keRR7FSGzLIa6CnMsou6V54m4jJGRsnBO0RA7iywOz jju8Hm5A1eOh65/rb5fTdF++eZhrMXb4Z3VanUpwm79Y1EjoThe5HDniJZvuUCq4gwbW WZ7WJrc2lDLVdDLTQo7tblipTfEhw00EvjHJIBkOTAUjDb2aaB7HV07rciPv6ut0rBVJ +c+BTokzxn4X6UOu/d7ccUP4VZtFVtNLXgSaOLXlRKzkXf3gjDM+3I9R91/6B2NoEQj8 fk+A== X-Gm-Message-State: AOAM533Srw4Y9cvR/fCyyxzXv2YU7kHhoVZROa0wwDA0Mbbpe275fyv6 F9wnC6mb3W4IOvsLsnKuEUHfdTHQ6NR3Iw== X-Received: by 2002:a17:902:6a88:b029:e3:cd8a:3a92 with SMTP id n8-20020a1709026a88b02900e3cd8a3a92mr14159870plk.22.1615066583753; Sat, 06 Mar 2021 13:36:23 -0800 (PST) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id r30sm6365616pgu.86.2021.03.06.13.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Mar 2021 13:36:23 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 08/27] tcg/tci: Merge identical cases in generation (exchange opcodes) Date: Sat, 6 Mar 2021 13:35:54 -0800 Message-Id: <20210306213613.85168-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210306213613.85168-1-richard.henderson@linaro.org> References: <20210306213613.85168-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Message-Id: <20210217202036.1724901-5-richard.henderson@linaro.org> [PMD: Split patch as 2/5] Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210218232840.1760806-3-f4bug@amsat.org> Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) -- 2.25.1 diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index ea42775cb0..1896efd100 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 == 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;