From patchwork Wed Mar 28 13:31:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 892219 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40B82c625Mz9s0b for ; Thu, 29 Mar 2018 00:32:55 +1100 (AEDT) Received: from localhost ([::1]:39327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1BC7-0001np-4x for incoming@patchwork.ozlabs.org; Wed, 28 Mar 2018 09:32:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1BBZ-0001nL-Dw for qemu-devel@nongnu.org; Wed, 28 Mar 2018 09:32:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1BBW-00084g-9D for qemu-devel@nongnu.org; Wed, 28 Mar 2018 09:32:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47842 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f1BBW-00084E-5c for qemu-devel@nongnu.org; Wed, 28 Mar 2018 09:32:14 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 638D3412C304; Wed, 28 Mar 2018 13:32:09 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-71.brq.redhat.com [10.40.204.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3D082026DFD; Wed, 28 Mar 2018 13:32:03 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 28 Mar 2018 15:31:52 +0200 Message-Id: <20180328133152.24623-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Mar 2018 13:32:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Mar 2018 13:32:09 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lvivier@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] tcg: fix 16-byte vector operations detection 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: Laurent Vivier , Peter Maydell , Miroslav Rezanina , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" configure tries to detect if the compiler supports 16-byte vector operations. As stated in the comment of the detection program, there is a problem with the system compiler on GCC on Centos 7. This program doesn't actually detect the problem with GCC on RHEL7 on PPC64LE (Red Hat 4.8.5-28). This patch updates the test to look more like it is in QEMU helpers, and now detects the problem. The error reported is: CC ppc64-softmmu/accel/tcg/tcg-runtime-gvec.o ..//accel/tcg/tcg-runtime-gvec.c: In function ‘helper_gvec_shl8i’: ../accel/tcg/tcg-runtime-gvec.c:558:26: internal compiler error: in emit_move_insn, at expr.c:3495 *(vec8 *)(d + i) = *(vec8 *)(a + i) << shift; ^ Fixes: db43267 "tcg: Add generic vector expanders" Signed-off-by: Laurent Vivier Reviewed-by: Miroslav Rezanina --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 4d0e92c96c..a2301dd0dc 100755 --- a/configure +++ b/configure @@ -5054,6 +5054,14 @@ static S2 c2; static S4 c4; static S8 c8; static int i; +void helper(void *d, void *a, int shift, int i); +void helper(void *d, void *a, int shift, int i) +{ + *(U1 *)(d + i) = *(U1 *)(a + i) << shift; + *(U2 *)(d + i) = *(U2 *)(a + i) << shift; + *(U4 *)(d + i) = *(U4 *)(a + i) << shift; + *(U8 *)(d + i) = *(U8 *)(a + i) << shift; +} int main(void) { a1 += b1; a2 += b2; a4 += b4; a8 += b8;