From patchwork Wed Aug 21 17:29:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Bobek X-Patchwork-Id: 11107863 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9AEB81395 for ; Wed, 21 Aug 2019 18:23:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72F7B21655 for ; Wed, 21 Aug 2019 18:23:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cjar5h6v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72F7B21655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0VGb-0006zJ-5f for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Aug 2019 14:23:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41308) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0URi-0001f6-MD for qemu-devel@nongnu.org; Wed, 21 Aug 2019 13:30:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0URg-00089Q-MR for qemu-devel@nongnu.org; Wed, 21 Aug 2019 13:30:54 -0400 Received: from mail-yw1-xc41.google.com ([2607:f8b0:4864:20::c41]:39004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0URe-00085R-MV for qemu-devel@nongnu.org; Wed, 21 Aug 2019 13:30:52 -0400 Received: by mail-yw1-xc41.google.com with SMTP id x74so1237736ywx.6 for ; Wed, 21 Aug 2019 10:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uOPaFPjPDvChBnik70h2TWTBMB5d+sd6THHXJhiI/U4=; b=cjar5h6v8W2TJNu49XScOdgEKNZ0XIKwHU7gpACm51uJDWHQVA3/5Ds/VUyGNnqk20 kufrViJrrQXsAVubroK0cbcGize9hn1QQAl3pEoKUpEXRp0BI0CbGdvI30ltmHumIcow thZ3meLVGDbQu0AfSVwIiVzw3YphuYqHoMvjaIWpfEtZKNVBrPI/Wlb57/8lSTTp9qVs KOrnAjh6Lw0e/6lQDia2UHet3dt6fgaPMA5sTHfG96q3WsrB4mpRAOBzfO0MFcZn0EZn WNThQR3UbJK9wnAmBehOerQGgyfxmEmdnexoxLX9JPWz1G/XiXbYsvfH59PrrfR/vM3k m/jQ== 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=uOPaFPjPDvChBnik70h2TWTBMB5d+sd6THHXJhiI/U4=; b=sroI6GznGOLsPyBMyZDZU3nLTg6ygMsNZTGH4D6fPHomLMDydRTUyXltx627wZQhXK 3OhbaTkzHPCxPQAedS+3XqE8hv5EexZpBMS8BDSk/cZ4SZNezq6X/YVIz7oXgdqAoKM9 VtbZNgG6mRThB/6vlCIHxHjMXt82sPutqPZobsi1g+6RQxS0YB1DqTOOVt14uc2Ezl+d 5tpDJOq/5lvV7THk05AJ6o4IYkAYxaEL5m7yuY0gF2xJH4iLG+VRwHQ2pSeHRUwrJTMr Z7lpzBGRpTtrkQu8GRt+KWhqigcNZyyF9NjN5blniG6T5Uk7kI+Z3RNQzBM1c1uk/FLp Bieg== X-Gm-Message-State: APjAAAWxwKPhzv1Dxjwj6wU4czWF9XLN2SVtvSdTEoRo9d/ROD2QlDbc h0JmIYNKOEruxCsR3Ptc41NYUw+t X-Google-Smtp-Source: APXvYqzKH6aJXucIywZAY3hcMXNTph6JUTPBHZIIqaOrtuAB6sSCjeonHms5MiiIHcJinrcxCbQ1Ig== X-Received: by 2002:a81:2d83:: with SMTP id t125mr25778407ywt.421.1566408647734; Wed, 21 Aug 2019 10:30:47 -0700 (PDT) Received: from localhost.localdomain ([2601:c0:c67f:e390::3]) by smtp.gmail.com with ESMTPSA id l71sm2826167ywl.39.2019.08.21.10.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 10:30:47 -0700 (PDT) From: Jan Bobek To: qemu-devel@nongnu.org Date: Wed, 21 Aug 2019 13:29:25 -0400 Message-Id: <20190821172951.15333-50-jan.bobek@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190821172951.15333-1-jan.bobek@gmail.com> References: <20190821172951.15333-1-jan.bobek@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::c41 Subject: [Qemu-devel] [RFC PATCH v4 49/75] target/i386: introduce SSSE3 code generators 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: Jan Bobek , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Introduce code generators required by SSSE3 instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 25d3b969b1..f43e9b1ba4 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -5876,6 +5876,12 @@ DEF_GEN_INSN3_HELPER_EPP(addps, addps, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(addpd, addpd, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(addss, addss, Vd, Vd, Wd) DEF_GEN_INSN3_HELPER_EPP(addsd, addsd, Vq, Vq, Wq) +DEF_GEN_INSN3_HELPER_EPP(phaddw, phaddw_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(phaddw, phaddw_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(phaddd, phaddd_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(phaddd, phaddd_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(phaddsw, phaddsw_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(phaddsw, phaddsw_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(haddps, haddps, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(haddpd, haddpd, Vdq, Vdq, Wdq) @@ -5899,6 +5905,12 @@ DEF_GEN_INSN3_HELPER_EPP(subps, subps, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(subpd, subpd, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(subss, subss, Vd, Vd, Wd) DEF_GEN_INSN3_HELPER_EPP(subsd, subsd, Vq, Vq, Wq) +DEF_GEN_INSN3_HELPER_EPP(phsubw, phsubw_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(phsubw, phsubw_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(phsubd, phsubd_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(phsubd, phsubd_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(phsubsw, phsubsw_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(phsubsw, phsubsw_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(hsubps, hsubps, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(hsubpd, hsubpd, Vdq, Vdq, Wdq) @@ -5913,12 +5925,16 @@ DEF_GEN_INSN3_HELPER_EPP(pmulhuw, pmulhuw_mmx, Pq, Pq, Qq) DEF_GEN_INSN3_HELPER_EPP(pmulhuw, pmulhuw_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(pmuludq, pmuludq_mmx, Pq, Pq, Qq) DEF_GEN_INSN3_HELPER_EPP(pmuludq, pmuludq_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(pmulhrsw, pmulhrsw_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(pmulhrsw, pmulhrsw_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(mulps, mulps, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(mulpd, mulpd, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(mulss, mulss, Vd, Vd, Wd) DEF_GEN_INSN3_HELPER_EPP(mulsd, mulsd, Vq, Vq, Wq) DEF_GEN_INSN3_HELPER_EPP(pmaddwd, pmaddwd_mmx, Pq, Pq, Qq) DEF_GEN_INSN3_HELPER_EPP(pmaddwd, pmaddwd_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(pmaddubsw, pmaddubsw_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(pmaddubsw, pmaddubsw_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(divps, divps, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(divpd, divpd, Vdq, Vdq, Wdq) @@ -5956,6 +5972,18 @@ DEF_GEN_INSN3_HELPER_EPP(pavgw, pavgw_mmx, Pq, Pq, Qq) DEF_GEN_INSN3_HELPER_EPP(pavgw, pavgw_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(psadbw, psadbw_mmx, Pq, Pq, Qq) DEF_GEN_INSN3_HELPER_EPP(psadbw, psadbw_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN2_HELPER_EPP(pabsb, pabsb_mmx, Pq, Qq) +DEF_GEN_INSN2_HELPER_EPP(pabsb, pabsb_xmm, Vdq, Wdq) +DEF_GEN_INSN2_HELPER_EPP(pabsw, pabsw_mmx, Pq, Qq) +DEF_GEN_INSN2_HELPER_EPP(pabsw, pabsw_xmm, Vdq, Wdq) +DEF_GEN_INSN2_HELPER_EPP(pabsd, pabsd_mmx, Pq, Qq) +DEF_GEN_INSN2_HELPER_EPP(pabsd, pabsd_xmm, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(psignb, psignb_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(psignb, psignb_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(psignw, psignw_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(psignw, psignw_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(psignd, psignd_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(psignd, psignd_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_GVEC(pcmpeqb, Pq, Pq, Qq, cmp, MM_OPRSZ, MM_MAXSZ, MO_8, TCG_COND_EQ) DEF_GEN_INSN3_GVEC(pcmpeqb, Vdq, Vdq, Wdq, cmp, XMM_OPRSZ, XMM_MAXSZ, MO_8, TCG_COND_EQ) @@ -6216,6 +6244,9 @@ DEF_GEN_PSHIFT_IMM_XMM(psraw, Udq, Udq) DEF_GEN_PSHIFT_IMM_MM(psrad, Nq, Nq) DEF_GEN_PSHIFT_IMM_XMM(psrad, Udq, Udq) +DEF_GEN_INSN4_HELPER_EPPI(palignr, palignr_mmx, Pq, Pq, Qq, Ib) +DEF_GEN_INSN4_HELPER_EPPI(palignr, palignr_xmm, Vdq, Vdq, Wdq, Ib) + DEF_GEN_INSN3_HELPER_EPP(packsswb, packsswb_mmx, Pq, Pq, Qq) DEF_GEN_INSN3_HELPER_EPP(packsswb, packsswb_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(packssdw, packssdw_mmx, Pq, Pq, Qq) @@ -6242,6 +6273,8 @@ DEF_GEN_INSN3_HELPER_EPP(unpcklpd, punpcklqdq_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(unpckhps, punpckhdq_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_EPP(unpckhpd, punpckhqdq_xmm, Vdq, Vdq, Wdq) +DEF_GEN_INSN3_HELPER_EPP(pshufb, pshufb_mmx, Pq, Pq, Qq) +DEF_GEN_INSN3_HELPER_EPP(pshufb, pshufb_xmm, Vdq, Vdq, Wdq) DEF_GEN_INSN3_HELPER_PPI(pshufw, pshufw_mmx, Pq, Qq, Ib) DEF_GEN_INSN3_HELPER_PPI(pshuflw, pshuflw_xmm, Vdq, Wdq, Ib) DEF_GEN_INSN3_HELPER_PPI(pshufhw, pshufhw_xmm, Vdq, Wdq, Ib)