[Liboil-commit] 3 commits - liboil/liboilcpu-arm.c liboil/liboilcpu-x86.c liboil/liboilcpu.c liboil/liboilfunction.c
David Schleef
ds at kemper.freedesktop.org
Thu Feb 26 11:49:05 PST 2009
liboil/liboilcpu-arm.c | 5 +----
liboil/liboilcpu-x86.c | 6 ++----
liboil/liboilcpu.c | 1 +
liboil/liboilfunction.c | 11 +++++++++++
4 files changed, 15 insertions(+), 8 deletions(-)
New commits:
commit 77af7ee8900013d47c1568737625e156faf2f463
Author: David Schleef <ds at schleef.org>
Date: Thu Feb 26 11:48:05 2009 -0800
Fix double free on failed arm_init
Fixes: #17482. Patch from Stefan Kost <ensonic at hora-obscura.de>
diff --git a/liboil/liboilcpu-arm.c b/liboil/liboilcpu-arm.c
index 583bf64..b985cc1 100644
--- a/liboil/liboilcpu-arm.c
+++ b/liboil/liboilcpu-arm.c
@@ -67,10 +67,7 @@ oil_cpu_arm_getflags_cpuinfo (char *cpuinfo)
char **f;
cpuinfo_flags = get_cpuinfo_line(cpuinfo, "Features");
- if (cpuinfo_flags == NULL) {
- free (cpuinfo);
- return;
- }
+ if (cpuinfo_flags == NULL) return;
flags = strsplit(cpuinfo_flags);
for (f = flags; *f; f++) {
diff --git a/liboil/liboilcpu.c b/liboil/liboilcpu.c
index 8fc88ae..155acf9 100644
--- a/liboil/liboilcpu.c
+++ b/liboil/liboilcpu.c
@@ -103,6 +103,7 @@ _oil_cpu_init (void)
{
const char *envvar;
+ OIL_INFO ("checking architecture");
oil_cpu_detect_arch();
envvar = getenv ("OIL_CPU_FLAGS");
commit 2234088a4a2da1b2f7a779c58c868eebb45a0bee
Author: David Schleef <ds at schleef.org>
Date: Thu Feb 26 11:42:54 2009 -0800
Add SSE detection support for OpenBSD
Fixes: #20002. Patch from Brad Smith <brad at comstyle.com>
diff --git a/liboil/liboilcpu-x86.c b/liboil/liboilcpu-x86.c
index ae7261f..e7a1978 100644
--- a/liboil/liboilcpu-x86.c
+++ b/liboil/liboilcpu-x86.c
@@ -328,10 +328,8 @@ oil_cpu_detect_kernel_support (void)
* unmasked SSE FPU exception bug. Other than that, if /proc/cpuinfo
* reported SSE, then it's safe.
*/
-#elif defined(__sun)
- /* Solaris is OK */
-#elif defined(__NetBSD__)
- /* NetBSD is OK */
+#elif defined(__sun) || defined(__NetBSD__) || defined(__OpenBSD__)
+ /* Solaris/NetBSD/OpenBSD are OK */
#else
OIL_WARNING("Operating system is not known to support SSE. "
commit 95f40f35f732135bb68e51459827298f7feda283
Author: Stefan Kost <ensonic at users.sf.net>
Date: Wed Feb 4 08:50:13 2009 +0000
init: shortcut benchmarking, if there is only one runable implementation.
diff --git a/liboil/liboilfunction.c b/liboil/liboilfunction.c
index fa1870c..f2eb440 100644
--- a/liboil/liboilfunction.c
+++ b/liboil/liboilfunction.c
@@ -367,6 +367,17 @@ oil_class_optimize (OilFunctionClass * klass)
OIL_ERROR ("class %s has no implmentations", klass->name);
return;
}
+
+ if (klass->first_impl->next == NULL) {
+ if (!oil_impl_is_runnable (klass->first_impl)) {
+ OIL_ERROR ("class %s has no runable implmentations", klass->name);
+ return;
+ }
+ OIL_DEBUG ("class %s has only one implementation %s", klass->name, klass->first_impl->name);
+ klass->chosen_impl = klass->first_impl;
+ klass->func = klass->first_impl->func;
+ return;
+ }
test = oil_test_new (klass);
if (test == NULL) {
More information about the Liboil-commit
mailing list