From nobody Sat Feb 7 06:55:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505824484955893.8284524569424; Tue, 19 Sep 2017 05:34:44 -0700 (PDT) Received: from localhost ([::1]:42580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duHjg-0007Rl-1S for importer@patchew.org; Tue, 19 Sep 2017 08:34:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duHex-0003fA-7S for qemu-devel@nongnu.org; Tue, 19 Sep 2017 08:29:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duHew-0005Bs-8q for qemu-devel@nongnu.org; Tue, 19 Sep 2017 08:29:51 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:35295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duHew-0005B2-2U for qemu-devel@nongnu.org; Tue, 19 Sep 2017 08:29:50 -0400 Received: by mail-wr0-x242.google.com with SMTP id n64so2146678wrb.2 for ; Tue, 19 Sep 2017 05:29:49 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-246-117.clienti.tiscali.it. [78.12.246.117]) by smtp.gmail.com with ESMTPSA id k18sm1292878wmd.22.2017.09.19.05.29.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Sep 2017 05:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=CSvZlGIZzsdXL+E94qqYXst7666XE5KC9OTW+O7jOmU=; b=p3N+vx3HklpmCb58jotQGs2OJ+GrdkefErzbXBu/vbr9htT9pWQ7+iGu53jDSa/kQd hIIMQVeh+Qi993r1HhPkbe3lbTtrYSUP8sYic5Y/byS0t6mLp9azAs0TuI562MmvQJYf VBGfuVRcukXfTy7I3ufdChDiXom34M0t4Jc0gF2LFU99OLD6cvVWFZPTaqwmlCaXRMib c8Ovrekd3DQ6Z5gw/EuVpUn6RBDmBiQr3ZEkGyMOSBFpW2Wr2ZTzQoxKQC5U5zW/+Y1b 6QLmNhR6DmIJxm/mjWzNw6TS+TiUIBsXj9UFdBKXD8vIfeqgJMmuAnyLqD8DSLl9QESu TKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=CSvZlGIZzsdXL+E94qqYXst7666XE5KC9OTW+O7jOmU=; b=g864a+TttHa+OU9G127ll2oCyB5WdQwGFF+Zs+2nceqCTYSvTLmDPeZQ8ZhBkIGGXK jqAC+sKa6iLgHHUG/oeERpXOuRLNIb+1jCQsPNHkARfecF/4G+FakEKWiHgdsNN9PIMM e1cQHeVN7LHuGMyynWhOSMbODsYNAC52fOXRjdc6miPmcHwkkTgs6jqhfPKwLBor81fX GR01ZAr319/rm2XHN1kc/Xg1qBxSbHa8Fywav3EzvDsjDHLKADIZL/NJD7oOL6f5RKp9 8/uoR2RSbM1+lO8tcVVSz8toIYBfho92Qz9Pdw8aF8wU1gSllN3XSF9cA8gjq73b8MmZ wDkg== X-Gm-Message-State: AHPjjUga0oyiYUEdLPP4/h1hDUFx0XLVg3Bz3024V4g9yFQ8J8E7AlSM Me9PtuAMDkT2bEwZQ6/L06oFKlOv X-Google-Smtp-Source: AOwi7QCMfUm/+sZQ42VDpL8MJu4JyROpo01LHNeoCvFxXUfheV0jNLNnIc7W9IP+sUpWOOgGBh/raA== X-Received: by 10.223.135.66 with SMTP id 2mr1281098wrz.208.1505824188688; Tue, 19 Sep 2017 05:29:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 19 Sep 2017 14:28:54 +0200 Message-Id: <1505824179-21541-6-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505824179-21541-1-git-send-email-pbonzini@redhat.com> References: <1505824179-21541-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PULL 05/50] target/i386: fix phminposuw in-place operation 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: Joseph Myers Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Joseph Myers The SSE4.1 phminposuw instruction finds the minimum 16-bit element in the source vector, putting the value of that element in the low 16 bits of the destination vector, the index of that element in the next three bits and zeroing the rest of the destination. The helper for this operation fills the destination from high to low, meaning that when the source and destination are the same register, the minimum source element can be overwritten before it is copied to the destination. This patch fixes it to fill the destination from low to high instead, so the minimum source element is always copied first. This fixes one gcc test failure in my GCC 6-based testing (and so concludes the present sequence of patches, as I don't have any further gcc test failures left in that testing that I attribute to QEMU bugs). Signed-off-by: Joseph Myers Message-Id: Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 9f1b351..ed05989 100644 --- a/target/i386/ops_sse.h +++ b/target/i386/ops_sse.h @@ -1710,10 +1710,10 @@ void glue(helper_phminposuw, SUFFIX)(CPUX86State *e= nv, Reg *d, Reg *s) idx =3D 7; } =20 - d->Q(1) =3D 0; - d->L(1) =3D 0; - d->W(1) =3D idx; d->W(0) =3D s->W(idx); + d->W(1) =3D idx; + d->L(1) =3D 0; + d->Q(1) =3D 0; } =20 void glue(helper_roundps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, --=20 1.8.3.1