From patchwork Thu Feb 21 03:23:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Turner X-Patchwork-Id: 10823111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EF2917E4 for ; Thu, 21 Feb 2019 03:24:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BD4A2E340 for ; Thu, 21 Feb 2019 03:24:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 000B22FF76; Thu, 21 Feb 2019 03:24:05 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A9D792E340 for ; Thu, 21 Feb 2019 03:24:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E56789289; Thu, 21 Feb 2019 03:24:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by gabe.freedesktop.org (Postfix) with ESMTPS id D00A489289 for ; Thu, 21 Feb 2019 03:24:03 +0000 (UTC) Received: by mail-pl1-x62c.google.com with SMTP id c4so8359459pls.11 for ; Wed, 20 Feb 2019 19:24:03 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=8nELWafhHhKQ+8lWvtPz3ojSOsMKjXC+0QF2Y/mX8Og=; b=VUMVCEW7I1Bg4M0g27anKt94sbiMMOX3/LJV+Lq9aP3S3yEI+HjLKkrY3A+LW2sV4H YRjX0uLjUN4dHGSboC4T10kalLGhdy+NJgRxjAV4/1yVvlcO+7Faj5q0VR3kDGf+iK6L uBr+LjsJ4lHeJl/Eg1nEwF5qxhseNZ2GXW+7QnbtxIXN/99iHIFAWkaJD9yftWgzFHOp wAZukfwE+MUvD49L8GWwt3WQzDZReeaISmGpw4jPNOC56UqhR1tb17HaATR+2DQZHl03 G3bIYu7Zz+mi3CA1uyMT8r5JcibLVcxATUvr5X08WL95jZaKCjAmVvt2hAIMo8UocFu2 vVnQ== X-Gm-Message-State: AHQUAuaJR0tYLJLUZEgRo71kz3Lb9u98einoMmon+JT0xlAg5+MVB+62 fZkBRLrmZ5txTn1l5riTP8c= X-Google-Smtp-Source: AHgI3IYLkT7nXlmvT/eawP64+0eqNrxLsNZmNlNrR/o27Ztb6p80c+s3OZ1hguHvuLvZbfAjXwaQ5w== X-Received: by 2002:a17:902:243:: with SMTP id 61mr38755828plc.249.1550719443219; Wed, 20 Feb 2019 19:24:03 -0800 (PST) Received: from localhost (jfdmzpr04-ext.jf.intel.com. [134.134.139.73]) by smtp.gmail.com with ESMTPSA id v15sm24992329pfa.75.2019.02.20.19.24.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 19:24:02 -0800 (PST) From: Matt Turner To: Chris Wilson Date: Wed, 20 Feb 2019 19:23:51 -0800 Message-Id: <20190221032351.26711-1-mattst88@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8nELWafhHhKQ+8lWvtPz3ojSOsMKjXC+0QF2Y/mX8Og=; b=WDvwiFn8/qFryZaOl2J34MteibdKYytPlQbsiSKSbvAvb98VxmD9oTx8KuBGIFZlye 6DYvBKUmGMV47Dv1HiKx36LJPrZdbxS8h/VTrnmei6B9a6UQVLkN+x4ECc1nXdTakK3u Ok0qpECVFtEwPs0h5O59vwFyTK1sUA1l6CZbO258QKWpY/Y8wQY30kWS0Ym+rFBjBgHQ HmifENoAPEArI2FC4s58PEt2/XN/MKnR5K0uvWAejIZcE6MGtG5t2k8XCj+gPU5VIyVM EXVD+FevKm2y7zG8SkTkwbl3AHir98XbxZBYgBc3DxNs0El3K4seI2H1YM+oYz9h57+4 S1pg== Subject: [Intel-gfx] [PATCH xf86-video-intel] Fix build on i686 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Adam Jackson Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Adam Jackson Presumably this only matters for i686 because amd64 implies sse2, but: BUILDSTDERR: In file included from gen4_vertex.c:34: BUILDSTDERR: gen4_vertex.c: In function 'emit_vertex': BUILDSTDERR: sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch BUILDSTDERR: static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y) BUILDSTDERR: ^~~~~~~~~~~~~~ BUILDSTDERR: gen4_vertex.c:308:25: note: called from here BUILDSTDERR: #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */ BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX' BUILDSTDERR: OUT_VERTEX(dstX, dstY); BUILDSTDERR: ^~~~~~~~~~ The bug here appears to be that emit_vertex() is declared 'sse2' but vertex_emit_2s is merely always_inline. gcc8 decides that since you said always_inline you need to have explicitly cloned it for every permutation of targets. Merely saying inline seems to do the job of cloning vertex_emit_2s as much as necessary. So to reiterate: if you say always-inline, it won't, but if you just say maybe inline, it will. Thanks gcc, that's helpful. Bug: https://bugs.gentoo.org/655206 --- src/sna/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/compiler.h b/src/sna/compiler.h index 0f3775ec..c4056913 100644 --- a/src/sna/compiler.h +++ b/src/sna/compiler.h @@ -32,7 +32,7 @@ #define likely(expr) (__builtin_expect (!!(expr), 1)) #define unlikely(expr) (__builtin_expect (!!(expr), 0)) #define noinline __attribute__((noinline)) -#define force_inline inline __attribute__((always_inline)) +#define force_inline inline #define fastcall __attribute__((regparm(3))) #define must_check __attribute__((warn_unused_result)) #define constant __attribute__((const))