From patchwork Thu Mar 11 14:39:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 397537 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp407908jai; Thu, 11 Mar 2021 07:23:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiU/dm80tvoZjozcYWh7kfcK3Te5qxd1hvYL/+kbchKjor/nDXDQT1NFr/GK6MTAQ0PXFX X-Received: by 2002:a9d:6482:: with SMTP id g2mr7159650otl.340.1615476182966; Thu, 11 Mar 2021 07:23:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615476182; cv=none; d=google.com; s=arc-20160816; b=bfu/rAVF3Z7sKFHkYU1QNKkp7nS0HbctNGRoyYyyRpQaAto2TGj3BfbByKNhbhV9FI IVoHeW59P37kJXJtwqzHLHUXjB9gSwPqCpaJmT+HlXvQ6vL4bks+Ldjz6VZLyUhKvOMQ 1A5svV/KtGwG5D+j0SjP1bbn5N8vBO0I/wrn4fREJz1X1BjxApYUMFf1JcrbUSXwk+Ou b8QTiTfX7taMYbV5kRz7nco97awr4SRYudELAObb8eibWviWoqsFmACninGErgKqWKNn rjRXYwADAlJVwWa1URHDP5yxRCoD4jmaN5z8BJsNUTYd6Zdmj5mYq1u8Z9gJoNmPxsDH q5Mg== 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=8UhCzfaKYlwmE690TaVTdGnsli7nQ9Ath2fy3ZA2wa8=; b=fwyMF4/LENReXrprHKLku1yBSSpaj1xbVXXM80++lt6zjoMeaLJ5kMUmNOGJpxar1c IAwpJLq2xVrbgySYSThTt/6tsu20TxViUyxCR3IZ3apO15Bezk2grylKEvgF/zAR/D65 hCwNbhg2abYp6nj7tV7gcmwcugNXmfGoBmtbJX2KdGkW1FyaRZ+vMAVOt176z3MToWxN EtQKEPLWSYoLOddga+BSimXH4j3u2vgTLkCRs6jPx+ThvAoapb9hvvURHikiw0aBpFir 5dgY8Nu99PWEeLTKWCMf/ypChVlPRmZsFOeOZBe6eC88A4eOhaU/aMUSAytdkehZwgG9 pNvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=C4i9ohrv; 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=fail (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 w4si2639263ote.152.2021.03.11.07.23.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Mar 2021 07:23:02 -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=fail header.i=@linaro.org header.s=google header.b=C4i9ohrv; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKN9S-0004h2-BE for patch@linaro.org; Thu, 11 Mar 2021 10:23:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKMVU-0004Ka-Cb for qemu-devel@nongnu.org; Thu, 11 Mar 2021 09:41:44 -0500 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:38721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKMVO-0006vN-PX for qemu-devel@nongnu.org; Thu, 11 Mar 2021 09:41:44 -0500 Received: by mail-qv1-xf35.google.com with SMTP id t5so2640652qvs.5 for ; Thu, 11 Mar 2021 06:41:36 -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=8UhCzfaKYlwmE690TaVTdGnsli7nQ9Ath2fy3ZA2wa8=; b=C4i9ohrvUTTzKS8W6UgMQ82QlAlHpUjB9v6VR47Gwy90LH42pGi2kqpB/+lHr7Z/0Y wx887VxNlH5FpEzWTJuGjbl+hMw+lZGDgl74uCxLbFHBjlDjRMb4ZWw4ZiL6vUGDpR9s pD9Gj28lPQXSRXkBk++acPO1ootVjL0N0zXQT3vCawoHLLWhY1YI9Ms/CSnsTCXSrVQz fSmFE9ppoXY8tJRK+wygcvoO3IaKbU/z7wmPkdx34324zFu+mArjsZM5xKYrQUHMCA9f +lM/TKGF70pSBig0JPgNhe5W4CGLntBz7XLb7V/xrGFntSGlvm8ZrK6h1CcIVaTYtKyX 7Z7w== 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=8UhCzfaKYlwmE690TaVTdGnsli7nQ9Ath2fy3ZA2wa8=; b=AnZtdgnlwqQMu8yDEUZJAKXB/u+MfX+vmZ2gDH6pl86RqsWXL0tX/5dTXbQ9FexN7K V66e45HlHYwcK7oJNinXR3BrWJ+2JH0wSWJFXJYomz2wjaZW7uJJn32bIcX2+hfbDgMw 2saMqCyc77bEldoIjfeDj9FslYzQOzPC/JkmYmY8rH19Z+LCEQ+6tV9syVF4DQa1vi6b mF57/bNz4SuD+cFewjicu/JkWa7B96eOHD6XRwBVlft751+sMzKcDBeH+1XNmYcoN9Ie eWQzzc82bwXo5l2ScPK+cJmOihTFsHVa8DRi+l9tFWBWprOeZj2da4NOK/N+3jlMhOlI meSw== X-Gm-Message-State: AOAM532znzYJfLb/+LPpxQ/kllF0fA6gsWDrLZTNZr3EnfMzpYuh7VpT exWBdNuuZoxmLPNZ1OPDjEbMxea///EiHbVF X-Received: by 2002:a05:6214:f6d:: with SMTP id iy13mr8063150qvb.24.1615473696022; Thu, 11 Mar 2021 06:41:36 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id g14sm1962421qkm.98.2021.03.11.06.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 06:41:35 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 49/57] tcg/tci: Implement andc, orc, eqv, nand, nor Date: Thu, 11 Mar 2021 08:39:50 -0600 Message-Id: <20210311143958.562625-50-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210311143958.562625-1-richard.henderson@linaro.org> References: <20210311143958.562625-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f35; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf35.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: sw@weilnetz.de, alex.bennee@linaro.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These were already present in tcg-target.c.inc, but not in the interpreter. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 20 ++++++++++---------- tcg/tci.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 10 deletions(-) -- 2.25.1 diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h index f53773a555..5945272a43 100644 --- a/tcg/tci/tcg-target.h +++ b/tcg/tci/tcg-target.h @@ -67,20 +67,20 @@ #define TCG_TARGET_HAS_ext16s_i32 1 #define TCG_TARGET_HAS_ext8u_i32 1 #define TCG_TARGET_HAS_ext16u_i32 1 -#define TCG_TARGET_HAS_andc_i32 0 +#define TCG_TARGET_HAS_andc_i32 1 #define TCG_TARGET_HAS_deposit_i32 1 #define TCG_TARGET_HAS_extract_i32 0 #define TCG_TARGET_HAS_sextract_i32 0 #define TCG_TARGET_HAS_extract2_i32 0 -#define TCG_TARGET_HAS_eqv_i32 0 -#define TCG_TARGET_HAS_nand_i32 0 -#define TCG_TARGET_HAS_nor_i32 0 +#define TCG_TARGET_HAS_eqv_i32 1 +#define TCG_TARGET_HAS_nand_i32 1 +#define TCG_TARGET_HAS_nor_i32 1 #define TCG_TARGET_HAS_clz_i32 0 #define TCG_TARGET_HAS_ctz_i32 0 #define TCG_TARGET_HAS_ctpop_i32 0 #define TCG_TARGET_HAS_neg_i32 1 #define TCG_TARGET_HAS_not_i32 1 -#define TCG_TARGET_HAS_orc_i32 0 +#define TCG_TARGET_HAS_orc_i32 1 #define TCG_TARGET_HAS_rot_i32 1 #define TCG_TARGET_HAS_movcond_i32 1 #define TCG_TARGET_HAS_muls2_i32 0 @@ -108,16 +108,16 @@ #define TCG_TARGET_HAS_ext8u_i64 1 #define TCG_TARGET_HAS_ext16u_i64 1 #define TCG_TARGET_HAS_ext32u_i64 1 -#define TCG_TARGET_HAS_andc_i64 0 -#define TCG_TARGET_HAS_eqv_i64 0 -#define TCG_TARGET_HAS_nand_i64 0 -#define TCG_TARGET_HAS_nor_i64 0 +#define TCG_TARGET_HAS_andc_i64 1 +#define TCG_TARGET_HAS_eqv_i64 1 +#define TCG_TARGET_HAS_nand_i64 1 +#define TCG_TARGET_HAS_nor_i64 1 #define TCG_TARGET_HAS_clz_i64 0 #define TCG_TARGET_HAS_ctz_i64 0 #define TCG_TARGET_HAS_ctpop_i64 0 #define TCG_TARGET_HAS_neg_i64 1 #define TCG_TARGET_HAS_not_i64 1 -#define TCG_TARGET_HAS_orc_i64 0 +#define TCG_TARGET_HAS_orc_i64 1 #define TCG_TARGET_HAS_rot_i64 1 #define TCG_TARGET_HAS_movcond_i64 1 #define TCG_TARGET_HAS_muls2_i64 0 diff --git a/tcg/tci.c b/tcg/tci.c index 2391dd4d3b..02fad3370d 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -530,6 +530,36 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, tci_args_rrr(insn, &r0, &r1, &r2); regs[r0] = regs[r1] ^ regs[r2]; break; +#if TCG_TARGET_HAS_andc_i32 || TCG_TARGET_HAS_andc_i64 + CASE_32_64(andc) + tci_args_rrr(insn, &r0, &r1, &r2); + regs[r0] = regs[r1] & ~regs[r2]; + break; +#endif +#if TCG_TARGET_HAS_orc_i32 || TCG_TARGET_HAS_orc_i64 + CASE_32_64(orc) + tci_args_rrr(insn, &r0, &r1, &r2); + regs[r0] = regs[r1] | ~regs[r2]; + break; +#endif +#if TCG_TARGET_HAS_eqv_i32 || TCG_TARGET_HAS_eqv_i64 + CASE_32_64(eqv) + tci_args_rrr(insn, &r0, &r1, &r2); + regs[r0] = ~(regs[r1] ^ regs[r2]); + break; +#endif +#if TCG_TARGET_HAS_nand_i32 || TCG_TARGET_HAS_nand_i64 + CASE_32_64(nand) + tci_args_rrr(insn, &r0, &r1, &r2); + regs[r0] = ~(regs[r1] & regs[r2]); + break; +#endif +#if TCG_TARGET_HAS_nor_i32 || TCG_TARGET_HAS_nor_i64 + CASE_32_64(nor) + tci_args_rrr(insn, &r0, &r1, &r2); + regs[r0] = ~(regs[r1] | regs[r2]); + break; +#endif /* Arithmetic operations (32 bit). */ @@ -1120,6 +1150,16 @@ int print_insn_tci(bfd_vma addr, disassemble_info *info) case INDEX_op_or_i64: case INDEX_op_xor_i32: case INDEX_op_xor_i64: + case INDEX_op_andc_i32: + case INDEX_op_andc_i64: + case INDEX_op_orc_i32: + case INDEX_op_orc_i64: + case INDEX_op_eqv_i32: + case INDEX_op_eqv_i64: + case INDEX_op_nand_i32: + case INDEX_op_nand_i64: + case INDEX_op_nor_i32: + case INDEX_op_nor_i64: case INDEX_op_div_i32: case INDEX_op_div_i64: case INDEX_op_rem_i32: