From patchwork Fri Apr 26 17:24:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 162956 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1009179jan; Fri, 26 Apr 2019 10:30:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+oGX6Qx18485UWtGvWQj1DMPx99IFaQCOhUYUW3nRPtfhn++nvGKL0Dmkwp4LjguASiAI X-Received: by 2002:adf:c002:: with SMTP id z2mr32399737wre.177.1556299848683; Fri, 26 Apr 2019 10:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556299848; cv=none; d=google.com; s=arc-20160816; b=vzR8QWf1kkNie9hL80sYbYkxdR4c98GlKf9mg9B/d5Y5674JZS77xcDMp8qC9+Wd0R NUFxxQuID1cvzPcUM1wQw/+yCXxKcN9bfe/7mxiTLfXQVks5Cq8nsfD9qHsN71jXXnXS 4yd4zi7QNxpQDcMi6d1yOF+rQWqUzrlJC/lmsAdKyPA9YBJrCbrkIxrdMp/ZtjdmHLbp lTJogYTmEKg77JwPGhIPbI8+PbEyCEVCrZ8vQ4fCJcAy8uAiKkTsgBhQhhQBaf986eEt B6BBzv1ugrNHCTRpIv8lfjhOjDgYlmWURXJ+Dx6ioaLjgtdRlvFRsFBsve1HRTdLprrb 72Lw== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=fs+VAJvIUlV2gQG99NKmKU7MN80ounXs6KwGIvA+I7I=; b=Uzr+f81W+5kz9j0TXrhHwl3JeYoG6ZiGSVQmpjfuwutf9xxgODM7jFONm+qTnXF93p w+VHQJW61jr9NOIFA1p37tMCH+pi2ft2Ooe11yq+nut/Skxgf62N6JOCZzn9qwjwVEGZ nBEVCxWtONhw3sX1hf6sMygf9g4Qq4wsTo0Y32uKE19t1WTGNb4ruxjoPm6tNJabFLHs 7JkBc88y0090cCrL3D7YgX7GKka5S5+5M0zxyH/W2x/OwedB0oxXNl8yi9YnCCApk3lX y+iFroLQSQjTkSvNOwymtaKAb5mkUOHWeb7Hb4/e5bqEGGDp8FgDsz0XSc0xgrNsNJBA 9k+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=U8gt93oO; 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 y6si15557642wrm.353.2019.04.26.10.30.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 26 Apr 2019 10:30:48 -0700 (PDT) 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=U8gt93oO; 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 ([127.0.0.1]:49995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hK4gR-0005Fu-Hf for patch@linaro.org; Fri, 26 Apr 2019 13:30:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hK4aO-0008R4-96 for qemu-devel@nongnu.org; Fri, 26 Apr 2019 13:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hK4aN-0006Ll-7Q for qemu-devel@nongnu.org; Fri, 26 Apr 2019 13:24:32 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:45495) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hK4aN-0006KW-1s for qemu-devel@nongnu.org; Fri, 26 Apr 2019 13:24:31 -0400 Received: by mail-pg1-x533.google.com with SMTP id y27so1205418pgl.12 for ; Fri, 26 Apr 2019 10:24:30 -0700 (PDT) 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; bh=fs+VAJvIUlV2gQG99NKmKU7MN80ounXs6KwGIvA+I7I=; b=U8gt93oOkgf05Ldlc7W187XUsHmjfwaiPiHczKZ6ujc/igrQYJ/VTHvj0q5i164k46 pVvQRbYJ4ko68TYcb+f0fVnfaQ30gnX/ENcIXVdZv8Qg6oVRNMYpJsZdW6d4jkvzISTV ES53r+sSgsS6KB7yhgBx2+Ao7L7Wz/Ck/FOoktl/Lpw+RLwt2yCnG+SZKq+Uhn2+ypas wpnN7JCub/tA+W9cBBMUapIaUzfrvd1b7n8ByL4Y6xv7JlcgQhcNMtQHY9+18Je9ZiG5 z8ZMktPJ0FfRv1PcTGXjtGm2kkxHW1gJyoizGppst2RpFT7mnZZp45bhP6ErugomaQqV rUag== 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; bh=fs+VAJvIUlV2gQG99NKmKU7MN80ounXs6KwGIvA+I7I=; b=XnKqqJsWaWKK1S2OqFVCmzZagYdWYRI4BCP+aG8oa0PXcroQLYYEKqcb78e/6rgUoo vdhC+YOueaE9vhnGGyeID3RblHyvjBVUJdB89oWInHVNvWW8PHUyy81/rB5ESrBJMTv+ bOXGl7s9SZ2AQEfwpTICUC3+LtqroX1ZJZFBPxY58gcpgT4n3vCsBE7oQP45iFCNANxU 4ufGqKaIVxop8qm1rn/dYASVYfhplZtlAyu0bNr1v8n2zwEPlk5AgTr2kQRE+lUYcYEk UiD6PdZeUimQVV3cbAo2jSn4gce5i7v4goky1TL9JXGTG7DkOKKlK08sfEBkrAGxFxup 0lAQ== X-Gm-Message-State: APjAAAXpWZ913T1sVepRhD6ycwMJctUIGNIZacFQuMVZtfka/cu1Pa+J J0TDj8ZQ1+lzLzWyVaTlBL6dfoYvE3w= X-Received: by 2002:a63:e22:: with SMTP id d34mr39717983pgl.251.1556299469717; Fri, 26 Apr 2019 10:24:29 -0700 (PDT) Received: from localhost.localdomain (97-113-179-147.tukw.qwest.net. [97.113.179.147]) by smtp.gmail.com with ESMTPSA id j5sm7901762pfg.186.2019.04.26.10.24.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 10:24:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 26 Apr 2019 10:24:11 -0700 Message-Id: <20190426172421.27133-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426172421.27133-1-richard.henderson@linaro.org> References: <20190426172421.27133-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::533 Subject: [Qemu-devel] [PULL 05/15] tcg/i386: Support INDEX_op_extract2_{i32, i64} X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 4 ++-- tcg/i386/tcg-target.inc.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index 2c58eaa9ed..241bf19413 100644 --- a/tcg/i386/tcg-target.h +++ b/tcg/i386/tcg-target.h @@ -124,7 +124,7 @@ extern bool have_avx2; #define TCG_TARGET_HAS_deposit_i32 1 #define TCG_TARGET_HAS_extract_i32 1 #define TCG_TARGET_HAS_sextract_i32 1 -#define TCG_TARGET_HAS_extract2_i32 0 +#define TCG_TARGET_HAS_extract2_i32 1 #define TCG_TARGET_HAS_movcond_i32 1 #define TCG_TARGET_HAS_add2_i32 1 #define TCG_TARGET_HAS_sub2_i32 1 @@ -163,7 +163,7 @@ extern bool have_avx2; #define TCG_TARGET_HAS_deposit_i64 1 #define TCG_TARGET_HAS_extract_i64 1 #define TCG_TARGET_HAS_sextract_i64 0 -#define TCG_TARGET_HAS_extract2_i64 0 +#define TCG_TARGET_HAS_extract2_i64 1 #define TCG_TARGET_HAS_movcond_i64 1 #define TCG_TARGET_HAS_add2_i64 1 #define TCG_TARGET_HAS_sub2_i64 1 diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index e0670e5098..1fa833840e 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -452,6 +452,7 @@ static inline int tcg_target_const_match(tcg_target_long val, TCGType type, #define OPC_SHUFPS (0xc6 | P_EXT) #define OPC_SHLX (0xf7 | P_EXT38 | P_DATA16) #define OPC_SHRX (0xf7 | P_EXT38 | P_SIMDF2) +#define OPC_SHRD_Ib (0xac | P_EXT) #define OPC_TESTL (0x85) #define OPC_TZCNT (0xbc | P_EXT | P_SIMDF3) #define OPC_UD2 (0x0b | P_EXT) @@ -2587,6 +2588,12 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, } break; + OP_32_64(extract2): + /* Note that SHRD outputs to the r/m operand. */ + tcg_out_modrm(s, OPC_SHRD_Ib + rexw, a2, a0); + tcg_out8(s, args[3]); + break; + case INDEX_op_mb: tcg_out_mb(s, a0); break; @@ -2845,6 +2852,7 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) static const TCGTargetOpDef r_0 = { .args_ct_str = { "r", "0" } }; static const TCGTargetOpDef r_r_ri = { .args_ct_str = { "r", "r", "ri" } }; static const TCGTargetOpDef r_r_re = { .args_ct_str = { "r", "r", "re" } }; + static const TCGTargetOpDef r_0_r = { .args_ct_str = { "r", "0", "r" } }; static const TCGTargetOpDef r_0_re = { .args_ct_str = { "r", "0", "re" } }; static const TCGTargetOpDef r_0_ci = { .args_ct_str = { "r", "0", "ci" } }; static const TCGTargetOpDef r_L = { .args_ct_str = { "r", "L" } }; @@ -2970,6 +2978,9 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) case INDEX_op_ctpop_i32: case INDEX_op_ctpop_i64: return &r_r; + case INDEX_op_extract2_i32: + case INDEX_op_extract2_i64: + return &r_0_r; case INDEX_op_deposit_i32: case INDEX_op_deposit_i64: