From patchwork Mon Feb 11 17:01:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 158012 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2849180jaa; Mon, 11 Feb 2019 09:16:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IZrzDMCyDD4O1WU1If7m4lQRTW2fiUP8DQRTCNyERhTAzBxCYzSBrxKD0Rz64aPzETUg3pG X-Received: by 2002:a81:3d08:: with SMTP id k8mr29713787ywa.239.1549905397896; Mon, 11 Feb 2019 09:16:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549905397; cv=none; d=google.com; s=arc-20160816; b=KmFl7Ehp9H/lrU8/5Sh9/utV88OZmj8W6uQSHoqwGxHOdQqGL2N1/YA1mmB/1RVz7M rE4pbsAeJtOvenpIeJZOA8Hub0pDm36dGiQQmdqy9WG7OQwhgN+vnm3wmqCKT0ICy2Rx D3+2KSxV5dTz8bLhQSdv8SB518LgCUr0yFcoez++1XYzE75Eci71oVtkjzJxg3VXKiOc EdI3mt4Y6a4pwyrtJC/xWk6opoCt4wiaJXkEUivrMaurcl00MtG0zW6tE8lFOacOuuT5 wIVgUHV88X7K6f61XeuR9E435MoT4CTftWM8DmWTdamzHY3sumZbodoPP3LOlDUd3wni TuCQ== 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=UhwCvkt8Bl/HDe7Eys1vVLVXwpHbZDN/ciN+pZN8GKE=; b=fQrZm8btfmRXsYGyiWiBbRyVtXYfVlg74zFTJz6I6/0LFMWr/V/AIXUkl/uuPYxPlo 3oto1rsV/Zc8dXMC4hdB3vIcggfCGL+Em7A0cUQFC/131prGBKVey6VVY+c8AkUy2Zhm FW5E4hJvYoYwhcrY5otz83ijKcCWdWRn8DRkS331wPMudcDli2/CvFHSK5PVVh0ZDDP+ MTVdPvWwwfVVz9NO9tbdRacPj2yt/fqCmO9HCl2kAiNkqpJ8pZxsyPMV0A7hsK2lA9YQ kNABLYRDbOLGn2DaAGjDZYtKpv17Kva7P8q15jVfuhdsZVLFetckA/QnTBuNnKlpW9V6 w7mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KnAWXrrj; 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 f76si2565999ywb.305.2019.02.11.09.16.37 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 11 Feb 2019 09:16:37 -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=KnAWXrrj; 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]:53385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtFC9-00041e-9q for patch@linaro.org; Mon, 11 Feb 2019 12:16:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtF9A-00024i-QM for qemu-devel@nongnu.org; Mon, 11 Feb 2019 12:13:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtExm-0000v3-1l for qemu-devel@nongnu.org; Mon, 11 Feb 2019 12:01:47 -0500 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:41656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtExl-0000tC-JA for qemu-devel@nongnu.org; Mon, 11 Feb 2019 12:01:45 -0500 Received: by mail-pl1-x644.google.com with SMTP id k15so5567335pls.8 for ; Mon, 11 Feb 2019 09:01:43 -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; bh=UhwCvkt8Bl/HDe7Eys1vVLVXwpHbZDN/ciN+pZN8GKE=; b=KnAWXrrjuZJZYqqFMupgZuMgjgKy1HYMUfWmraYVkvlW4GoGkNjIBk+dsMNNrCaFFS oLTcpqs2XSTk8O4DWu5lprlX8yxyIC29bnDb4oy3Cpbh87ghIy4QSSLDZBT30zPecQv2 2IuBVEgacQmOlMpUKELexqilwhGhEINfshSzJRkX/tOJvRgNQVdGmR5DcbJhWWZmzBx2 PXFM8X+raHh8DROHhtyJvxkEamOcPoRmUP1bAP7q7qSKO2lVb7hj65PXarnyc8eSWCaP g4T9jEk1E8kHcfx3PHKLILjopBCXoCGlQ9+mIZb3Wzm02Y3YElJOOozgBUhVhjo6MJGV nG+A== 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=UhwCvkt8Bl/HDe7Eys1vVLVXwpHbZDN/ciN+pZN8GKE=; b=sBhe8OcJdXAYrjeAdsw7sXyBRt3LbFmcOQl+bBn+M1lrKUTHJlbTtmWIfE+MJyNUFm gTera2HNF1Qlk98eG4DgmhhocH3zU3tevg0YW4TGEKpkYMixQN8IzoD160TcWjc8WZhz d6StMTZpYLYbmq7PrRehWEKtKZmeKg0TAvl7Zy4IpgZOZ1Y7NcWrAMSfOya3quo3NcPE 0bv5Bwl6uPapVFfRZ5+y92N9C/5Vh0c4zOVKjdLoKQ/DeRTEDs65HNVip32jWUc1GfTG jvB9UJ3mjsCXcY936rg6Rl8Vi/ZzrDT+yOAZMCYEY/H2WR+nOHtX/vkPWjeVY25Kov7p NQGA== X-Gm-Message-State: AHQUAua3rkgA5/YjtCrjd/3mDUPLOBlsZvBUktYh3gvlzXmzmnP4elE6 89I/CqNOw1IifiB8sJnxbbuzHyg2eG0= X-Received: by 2002:a17:902:b701:: with SMTP id d1mr36560024pls.124.1549904501835; Mon, 11 Feb 2019 09:01:41 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id b24sm15712567pfe.136.2019.02.11.09.01.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 09:01:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 11 Feb 2019 09:01:34 -0800 Message-Id: <20190211170136.18680-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190211170136.18680-1-richard.henderson@linaro.org> References: <20190211170136.18680-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::644 Subject: [Qemu-devel] [PULL 2/4] tcg/i386: fix unsigned vector saturating arithmetic 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, Mark Cave-Ayland Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland Due to a cut/paste error in the original implementation, the unsigned vector saturating arithmetic was erroneously being calculated as signed vector saturating arithmetic. Fixes: 8ffafbcec2 ("tcg/i386: Implement vector saturating arithmetic") Signed-off-by: Mark Cave-Ayland Message-Id: <20190207224258.426-1-mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.2 diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index 4d84aea3a9..e0670e5098 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -2615,7 +2615,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, OPC_PADDSB, OPC_PADDSW, OPC_UD2, OPC_UD2 }; static int const usadd_insn[4] = { - OPC_PADDSB, OPC_PADDSW, OPC_UD2, OPC_UD2 + OPC_PADDUB, OPC_PADDUW, OPC_UD2, OPC_UD2 }; static int const sub_insn[4] = { OPC_PSUBB, OPC_PSUBW, OPC_PSUBD, OPC_PSUBQ @@ -2624,7 +2624,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, OPC_PSUBSB, OPC_PSUBSW, OPC_UD2, OPC_UD2 }; static int const ussub_insn[4] = { - OPC_PSUBSB, OPC_PSUBSW, OPC_UD2, OPC_UD2 + OPC_PSUBUB, OPC_PSUBUW, OPC_UD2, OPC_UD2 }; static int const mul_insn[4] = { OPC_UD2, OPC_PMULLW, OPC_PMULLD, OPC_UD2