From patchwork Sat Mar 6 21:36:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 394573 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp553932jai; Sat, 6 Mar 2021 13:49:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgnzf4aeFnM9F4HlTTvuv26lYtFO+jpPiLLOqH/m48PAqd9T4MtA/OloWVeCEtaKYpQR6M X-Received: by 2002:a05:6e02:12e9:: with SMTP id l9mr14055800iln.201.1615067373844; Sat, 06 Mar 2021 13:49:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615067373; cv=none; d=google.com; s=arc-20160816; b=q+/J+mbIdMoO7tKisG4LrRDdejjdfCtBbaziHGMxvi5y+hODOWwJVkHtFJeJEaYRSe ALoFBvq4HL/+nk5p/JqjPn2hznZFjghUjbpKwezr7aFdIVkR8qVOO2NlQQRMxKEBKb0X yt/W3Vv0RymGz/twXegf3o0tf/6aa+Zlm6yCq/dbYHwOzxNC0T8xyRDaD18pijfXb5vZ Y/6mUr+O1eG4uMjzeg9jOHsahW+5xN7If/VyuWEgxJDo1rAKGip+7j2rQOzx8mfg5DkH 4FGcLZIWpGsX+8t9BA/ODdFVgpwflTvsVKqtL9HhvQgb6tiBSd0qkNcapnGSGDyIs3S4 1l7w== 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=uBa0mYVDt9xRDsum9kHj5ruNUWIAR4QdH8Qq5PqaSbM=; b=wAiSjHeRd1/o9QtyLvQ4buitJ0isJ1BG2WjtkXaema7Jfv3XP4nFdoYTTWLAhtdQwp jb4jYfzISwll0VnJlEMIsoBIaWT6a1uxfC2+NzjArH9ai7lqfJNUDz1jpuQ3h4bEn+47 HvGd3IgotRSSB1vAjYXycLfrn18EcvIaG7RuOfNO+BwbUFPll2HIG6PcOHD4+HW9rEsv z282kDQ2D7UAZRbdfXLQEUsOMqWhnQFG4OYgQHGIUOtb3UgVM+Qvrrke2hSHmrvYsO2P GD0BetKqiVeqbiOxSY1SA6coIk3/Iv+JoXxJuPUYu7mczDwnc6uQULF0YJmzUbDdRlO+ HMQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XgW9PmFS; 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 z8si6903903ilq.142.2021.03.06.13.49.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Mar 2021 13:49:33 -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=XgW9PmFS; 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]:36092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIenl-0000GF-9m for patch@linaro.org; Sat, 06 Mar 2021 16:49:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIebH-0007Aq-VF for qemu-devel@nongnu.org; Sat, 06 Mar 2021 16:36:39 -0500 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:45989) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIebG-0002zF-7c for qemu-devel@nongnu.org; Sat, 06 Mar 2021 16:36:39 -0500 Received: by mail-pg1-x535.google.com with SMTP id p21so3808097pgl.12 for ; Sat, 06 Mar 2021 13:36:37 -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=uBa0mYVDt9xRDsum9kHj5ruNUWIAR4QdH8Qq5PqaSbM=; b=XgW9PmFSG6KjwkoL61uGSY8Xwq1kYRJ7jNSBCl4vRe56kbecJ5rjcu6QMPWoTmMvpH Lx5YL0FYbkBmML/qGmyNIJV/K1XUrhHj76YDgDicAAkrYz9qDRCypbnU5WwT78zVvN9B jWFTjjY2kZ0/uwERA2cWKt21TuXWC8zJ0dJ3/2unM6oOLD6pk0NMDfyYJtLRA4zwp1Vk /pfKHDfTdhuAqY2tYT4nIL1EVOiq90dKMBJ41vqCIpSaPcgQ5jKQq81/ejDAEzqzfTsk hN/EMRLKVa6dmwr7z4yri/Hrs045pZFmtpbiPZOgOwG44z9+3spJK9ouc5wkPSOsQKO4 6Bbw== 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=uBa0mYVDt9xRDsum9kHj5ruNUWIAR4QdH8Qq5PqaSbM=; b=pj9ydDJwBFT7O80f2hNTGxbGaqFhN0+zJO28ZFDW2gtjg7qH/Airu4jKRMZuAfinbR AqEx3NMGNpkBzf1jXL7WioMUW/Xkv+idgdpHRBWPmiUJlbS+qtJa0QrWmf+RZBF5JS+V eQ90AoxqzI5oGPT9PbeLdi55MCoeatPHLraHFPVT2AHeb26aj3tAZ4G0/Hms5fosc3of ooQkfiirEENgGrWObm76vYn9jYsWnC9bfAnRm5So4uI1JMAOgmHzUAbR5kZDEZypYL2E +9Lq6uwlJaNkNMfD33bdcVI1Fm7vuyE23EXH59LyMZj8j8uTKLVAsnr5ZcXPi31J6Yrb pt9g== X-Gm-Message-State: AOAM533+wzeIdgTFLUrqiukQcQbiCvST+gPmmefgo+n+AdoiUctDz5lt YCSYfW+JsdDeAkka6RbISIiHk25PargzQg== X-Received: by 2002:a62:8103:0:b029:1ef:26e4:494f with SMTP id t3-20020a6281030000b02901ef26e4494fmr12325791pfd.41.1615066596938; Sat, 06 Mar 2021 13:36:36 -0800 (PST) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id r30sm6365616pgu.86.2021.03.06.13.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Mar 2021 13:36:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 21/27] tcg/tci: Merge bswap operations Date: Sat, 6 Mar 2021 13:36:07 -0800 Message-Id: <20210306213613.85168-22-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::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.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" This includes bswap16 and bswap32. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) -- 2.25.1 diff --git a/tcg/tci.c b/tcg/tci.c index 73f639d23a..66f2962d6e 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -635,15 +635,15 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, tci_write_reg(regs, t0, (uint16_t)t1); break; #endif -#if TCG_TARGET_HAS_bswap16_i32 - case INDEX_op_bswap16_i32: +#if TCG_TARGET_HAS_bswap16_i32 || TCG_TARGET_HAS_bswap16_i64 + CASE_32_64(bswap16) t0 = *tb_ptr++; t1 = tci_read_r(regs, &tb_ptr); tci_write_reg(regs, t0, bswap16(t1)); break; #endif -#if TCG_TARGET_HAS_bswap32_i32 - case INDEX_op_bswap32_i32: +#if TCG_TARGET_HAS_bswap32_i32 || TCG_TARGET_HAS_bswap32_i64 + CASE_32_64(bswap32) t0 = *tb_ptr++; t1 = tci_read_r(regs, &tb_ptr); tci_write_reg(regs, t0, bswap32(t1)); @@ -795,20 +795,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, t1 = tci_read_r(regs, &tb_ptr); tci_write_reg(regs, t0, (uint32_t)t1); break; -#if TCG_TARGET_HAS_bswap16_i64 - case INDEX_op_bswap16_i64: - t0 = *tb_ptr++; - t1 = tci_read_r(regs, &tb_ptr); - tci_write_reg(regs, t0, bswap16(t1)); - break; -#endif -#if TCG_TARGET_HAS_bswap32_i64 - case INDEX_op_bswap32_i64: - t0 = *tb_ptr++; - t1 = tci_read_r(regs, &tb_ptr); - tci_write_reg(regs, t0, bswap32(t1)); - break; -#endif #if TCG_TARGET_HAS_bswap64_i64 case INDEX_op_bswap64_i64: t0 = *tb_ptr++;