Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309644 Details for
Bug 451831
altivec detection breaks
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
pixman-0.11.4-altivec.patch (text/plain), 1.48 KB, created by
David Woodhouse
on 2008-06-17 17:43:19 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
David Woodhouse
Created:
2008-06-17 17:43:19 UTC
Size:
1.48 KB
patch
obsolete
>--- pixman-0.11.4/pixman/pixman-pict.c~ 2008-06-09 06:56:34.000000000 +0100 >+++ pixman-0.11.4/pixman/pixman-pict.c 2008-06-17 18:38:34.000000000 +0100 >@@ -1920,7 +1920,59 @@ pixman_bool_t pixman_have_vmx (void) { > return have_vmx; > } > >-#else >+#elif defined (__linux__) >+#include <sys/types.h> >+#include <sys/stat.h> >+#include <fcntl.h> >+#include <unistd.h> >+#include <stdio.h> >+#include <linux/auxvec.h> >+#include <asm/cputable.h> >+ >+pixman_bool_t pixman_have_vmx (void) >+{ >+ if (!initialized) { >+ char fname[64]; >+ unsigned long buf[64]; >+ ssize_t count = 0; >+ pid_t pid; >+ int fd, i; >+ >+ pid = getpid(); >+ snprintf(fname, sizeof(fname)-1, "/proc/%d/auxv", pid); >+ >+ fd = open(fname, O_RDONLY); >+ if (fd >= 0) { >+ for (i = 0; i <= (count / sizeof(unsigned long)); i += 2) { >+ /* Read more if buf is empty... */ >+ if (i == (count / sizeof(unsigned long))) { >+ count = read(fd, buf, sizeof(buf)); >+ if (count <= 0) >+ break; >+ i = 0; >+ } >+ >+ if (buf[i] == AT_HWCAP) { >+ have_vmx = !!(buf[i+1] & PPC_FEATURE_HAS_ALTIVEC); >+ initialized = 1; >+ break; >+ } else if (buf[i] == AT_NULL) { >+ break; >+ } >+ } >+ close(fd); >+ } >+ } >+ if (!initialized) { >+ /* Something went wrong. Assume 'no' rather than playing >+ fragile tricks with catching SIGILL. */ >+ have_vmx = FALSE; >+ initialized = 1; >+ } >+ >+ return have_vmx; >+} >+#else /* !__APPLE__ && !__linux__ */ > #include <signal.h> > > static void vmx_test(int sig, siginfo_t *si, void *unused) {
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 451831
: 309644