From patchwork Fri Jul 15 11:07:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 9231699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2BA2860574 for ; Fri, 15 Jul 2016 11:07:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D7DF28325 for ; Fri, 15 Jul 2016 11:07:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 121FD2832C; Fri, 15 Jul 2016 11:07:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3CE528325 for ; Fri, 15 Jul 2016 11:07:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1AA56E065; Fri, 15 Jul 2016 11:07:51 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id D6D086E065 for ; Fri, 15 Jul 2016 11:07:49 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 15 Jul 2016 04:07:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,368,1464678000"; d="scan'208"; a="1007395925" Received: from tjacobix-mobl3.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.30.24]) by fmsmga001.fm.intel.com with ESMTP; 15 Jul 2016 04:07:45 -0700 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Fri, 15 Jul 2016 12:07:42 +0100 Message-Id: <1468580862-2309-1-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <20160714174826.GB5578@nuc-i3427.alporthouse.com> References: <20160714174826.GB5578@nuc-i3427.alporthouse.com> Subject: [Intel-gfx] [PATCH i-g-t] tests: Fix compilation when some gcc configurations X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Depending how the gcc was compiled it may be necessary to enable SSE4 instructions explicitly. Otherwise: CC gem_gtt_speed.o In file included from gem_gtt_speed.c:54:0: /usr/lib/gcc/x86_64-linux-gnu/4.8/include/smmintrin.h:31:3: error: #error "SSE4.1 instruction set not enabled" # error "SSE4.1 instruction set not enabled" ^ v2: Use a pragma directive (Chris) Cc: Chris Wilson Signed-off-by: Damien Lespiau --- tests/gem_exec_flush.c | 1 + tests/gem_gtt_speed.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c index c81a977..b43d511 100644 --- a/tests/gem_exec_flush.c +++ b/tests/gem_exec_flush.c @@ -41,6 +41,7 @@ IGT_TEST_DESCRIPTION("Basic check of flushing after batches"); #define MOVNT 512 #if defined(__x86_64__) +#pragma GCC target ("sse4.1") #include __attribute__((noinline)) __attribute__((target("sse4.1"))) diff --git a/tests/gem_gtt_speed.c b/tests/gem_gtt_speed.c index 94b3de3..ed8cfda 100644 --- a/tests/gem_gtt_speed.c +++ b/tests/gem_gtt_speed.c @@ -51,6 +51,7 @@ static double elapsed(const struct timeval *start, } #if defined(__x86_64__) +#pragma GCC target ("sse4.1") #include __attribute__((noinline)) __attribute__((target("sse4.1")))