<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:dl9pf@gmx.de" title="Jan-Simon Möller <dl9pf@gmx.de>"> <span class="fn">Jan-Simon Möller</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - SSE register return with SSE disabled"
href="http://llvm.org/bugs/show_bug.cgi?id=19389">bug 19389</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - SSE register return with SSE disabled"
href="http://llvm.org/bugs/show_bug.cgi?id=19389#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - SSE register return with SSE disabled"
href="http://llvm.org/bugs/show_bug.cgi?id=19389">bug 19389</a>
from <span class="vcard"><a class="email" href="mailto:dl9pf@gmx.de" title="Jan-Simon Möller <dl9pf@gmx.de>"> <span class="fn">Jan-Simon Möller</span></a>
</span></b>
<pre>Closing as a kernel issue. Keeping the used patch here for reference:
From: Mark Charlebois <<a href="mailto:charlebm@gmail.com">charlebm@gmail.com</a>>
Date: Tue, 15 Apr 2014 17:36:37 +0100
Subject: [PATCH] mbcache: LLVMLinux: mbcache.patch
The call to __builtin_log2 presumes there is a
double log2(double x) function defined in the kernel.
The call to hash_log is a call to hash_64 which is
defined in include/linux/hash.h
static __always_inline u64 hash_64(u64 val, unsigned int bits)
That means that __builtin_log2(NR_BG_LOCKS) is converting
NR_BG_LOCKS to a double and returning a double and then that
is converted to an unsigned int.
Using ilog2 is much more appropriate and efficient.
Another side effect of using __builtin_log2 is that is uses
__aeabi_* functions for ARM that require linking with libgcc.a.
Author: Mark Charlebois <<a href="mailto:charlebm@gmail.com">charlebm@gmail.com</a>>
Signed-off-by: Mark Charlebois <<a href="mailto:charlebm@gmail.com">charlebm@gmail.com</a>>
diff --git a/fs/mbcache.c b/fs/mbcache.c
index bf166e3..2c0752b 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
@@ -93,7 +93,7 @@
#define MB_CACHE_WRITER ((unsigned short)~0U >> 1)
-#define MB_CACHE_ENTRY_LOCK_BITS __builtin_log2(NR_BG_LOCKS)
+#define MB_CACHE_ENTRY_LOCK_BITS ilog2(NR_BG_LOCKS)
#define MB_CACHE_ENTRY_LOCK_INDEX(ce) \
(hash_long((unsigned long)ce, MB_CACHE_ENTRY_LOCK_BITS))</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>