Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 334012 Details for
Bug 448570
x11-drivers/xf86-video-intel-2.20.13[sna] fails to compile on IA64
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-sna-Rewrite-__fls-without-x86-assembly.patch (text/plain), 1.01 KB, created by
Matt Turner
on 2013-01-02 02:15:48 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Matt Turner
Created:
2013-01-02 02:15:48 UTC
Size:
1.01 KB
patch
obsolete
>From 6887f43300d09e5573da90cfd43082b3d0c696e3 Mon Sep 17 00:00:00 2001 >From: Matt Turner <mattst88@gmail.com> >Date: Tue, 1 Jan 2013 18:16:39 -0800 >Subject: [PATCH] sna: Rewrite __fls without x86 assembly > >Prevented SNA from compiling on ia64. > >Fixes https://bugs.gentoo.org/show_bug.cgi?id=448570 >--- > src/sna/kgem.c | 17 +++++++++++++---- > 1 files changed, 13 insertions(+), 4 deletions(-) > >diff --git a/src/sna/kgem.c b/src/sna/kgem.c >index f4c2b1c..09b887d 100644 >--- a/src/sna/kgem.c >+++ b/src/sna/kgem.c >@@ -516,10 +516,19 @@ static void gem_close(int fd, uint32_t handle) > > constant inline static unsigned long __fls(unsigned long word) > { >- asm("bsr %1,%0" >- : "=r" (word) >- : "rm" (word)); >- return word; >+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) >+ return word == 0 ? 0 : 32 - __builtin_clz(word); >+#else >+ unsigned int v = 1; >+ >+ if (word == 0) >+ return 0; >+ >+ while (word >>= 1) >+ v++; >+ >+ return v; >+#endif > } > > constant inline static int cache_bucket(int num_pages) >-- >1.7.8.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 448570
:
333332
| 334012