* Error compiling with clang
@ 2012-05-07 20:13 Truls Becken
2012-05-07 21:02 ` Rich Felker
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Truls Becken @ 2012-05-07 20:13 UTC (permalink / raw)
To: musl
Hi,
Compiling musl 0.9.0 with clang 3.0 gives me the following:
src/math/i386/llrint.s:5:2: error: invalid instruction mnemonic 'fistpq'
Changing fistpq back to fistpl in the 3 llrint files makes it compile.
Is this a bug in clang? How should it be resolved?
-Truls
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error compiling with clang
2012-05-07 20:13 Error compiling with clang Truls Becken
@ 2012-05-07 21:02 ` Rich Felker
2012-05-07 21:12 ` Szabolcs Nagy
2012-05-07 21:05 ` Szabolcs Nagy
2012-05-07 21:10 ` nwmcsween
2 siblings, 1 reply; 8+ messages in thread
From: Rich Felker @ 2012-05-07 21:02 UTC (permalink / raw)
To: musl
On Mon, May 07, 2012 at 10:13:06PM +0200, Truls Becken wrote:
> Hi,
>
> Compiling musl 0.9.0 with clang 3.0 gives me the following:
>
> src/math/i386/llrint.s:5:2: error: invalid instruction mnemonic 'fistpq'
>
> Changing fistpq back to fistpl in the 3 llrint files makes it compile.
> Is this a bug in clang? How should it be resolved?
fistpl writes a 32-bit integer. This function needs a 64-bit integer
result. I'm pretty sure clang is just wrong here, but if there's an
alternate mnemonic for fistpq that works on clang and gcc/gas I'd be
happy to change it.
In the mean time, you can just remove that .s file so the C code gets
used.
Rich
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error compiling with clang
2012-05-07 20:13 Error compiling with clang Truls Becken
2012-05-07 21:02 ` Rich Felker
@ 2012-05-07 21:05 ` Szabolcs Nagy
2012-05-07 21:10 ` nwmcsween
2 siblings, 0 replies; 8+ messages in thread
From: Szabolcs Nagy @ 2012-05-07 21:05 UTC (permalink / raw)
To: musl
* Truls Becken <truls.becken@gmail.com> [2012-05-07 22:13:06 +0200]:
> Compiling musl 0.9.0 with clang 3.0 gives me the following:
>
> src/math/i386/llrint.s:5:2: error: invalid instruction mnemonic 'fistpq'
>
> Changing fistpq back to fistpl in the 3 llrint files makes it compile.
> Is this a bug in clang? How should it be resolved?
>
in llrint you need the 64 bit int store instruction not the 32 bit one
it's either a bug in your as or clang
(although these instruction mnemonics are not documented)
here gnu as recognizes fistpq
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error compiling with clang
2012-05-07 20:13 Error compiling with clang Truls Becken
2012-05-07 21:02 ` Rich Felker
2012-05-07 21:05 ` Szabolcs Nagy
@ 2012-05-07 21:10 ` nwmcsween
2012-05-07 21:18 ` Szabolcs Nagy
2 siblings, 1 reply; 8+ messages in thread
From: nwmcsween @ 2012-05-07 21:10 UTC (permalink / raw)
To: musl
This is a bug with clang it wasn't implemented until recently, use svn
Sent from my iPhone
On May 7, 2012, at 1:13 PM, Truls Becken <truls.becken@gmail.com> wrote:
> Hi,
>
> Compiling musl 0.9.0 with clang 3.0 gives me the following:
>
> src/math/i386/llrint.s:5:2: error: invalid instruction mnemonic 'fistpq'
>
> Changing fistpq back to fistpl in the 3 llrint files makes it compile.
> Is this a bug in clang? How should it be resolved?
>
> -Truls
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error compiling with clang
2012-05-07 21:02 ` Rich Felker
@ 2012-05-07 21:12 ` Szabolcs Nagy
0 siblings, 0 replies; 8+ messages in thread
From: Szabolcs Nagy @ 2012-05-07 21:12 UTC (permalink / raw)
To: musl
* Rich Felker <dalias@aerifal.cx> [2012-05-07 17:02:51 -0400]:
> alternate mnemonic for fistpq that works on clang and gcc/gas I'd be
> happy to change it.
>
it seems clang recognizes fistpll instead of fistpq
(which works on gas as well)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error compiling with clang
2012-05-07 21:10 ` nwmcsween
@ 2012-05-07 21:18 ` Szabolcs Nagy
2012-05-07 21:24 ` Rich Felker
0 siblings, 1 reply; 8+ messages in thread
From: Szabolcs Nagy @ 2012-05-07 21:18 UTC (permalink / raw)
To: musl
* nwmcsween@gmail.com <nwmcsween@gmail.com> [2012-05-07 14:10:27 -0700]:
> This is a bug with clang it wasn't implemented until recently, use svn
>
true, but the ll version works in earlier clangs as well
maybe it's better to use that one if every as recognizes it
http://llvm.org/viewvc/llvm-project?view=rev&revision=151543
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error compiling with clang
2012-05-07 21:18 ` Szabolcs Nagy
@ 2012-05-07 21:24 ` Rich Felker
2012-05-08 6:49 ` Truls Becken
0 siblings, 1 reply; 8+ messages in thread
From: Rich Felker @ 2012-05-07 21:24 UTC (permalink / raw)
To: musl
On Mon, May 07, 2012 at 11:18:51PM +0200, Szabolcs Nagy wrote:
> * nwmcsween@gmail.com <nwmcsween@gmail.com> [2012-05-07 14:10:27 -0700]:
> > This is a bug with clang it wasn't implemented until recently, use svn
> >
> true, but the ll version works in earlier clangs as well
> maybe it's better to use that one if every as recognizes it
Indeed, I'll change it.
Rich
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error compiling with clang
2012-05-07 21:24 ` Rich Felker
@ 2012-05-08 6:49 ` Truls Becken
0 siblings, 0 replies; 8+ messages in thread
From: Truls Becken @ 2012-05-08 6:49 UTC (permalink / raw)
To: musl
On 2012-05-07, at 23:05, Szabolcs Nagy wrote:
> it's either a bug in your as or clang
I realized after sending the question that the issue would not be
with clang per se, but rather llvm-as.
On 2012-05-07, at 23:24, Rich Felker wrote:
> On Mon, May 07, 2012 at 11:18:51PM +0200, Szabolcs Nagy wrote:
>
>> the ll version works in earlier clangs as well
>> maybe it's better to use that one if every as recognizes it
>
> Indeed, I'll change it.
Thanks to everyone participating for resolving this. Supporting
clang 3.0, as opposed to a future point version, is a good thing.
I can now easily patch musl myself until the next release.
-Truls
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-05-08 6:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 20:13 Error compiling with clang Truls Becken
2012-05-07 21:02 ` Rich Felker
2012-05-07 21:12 ` Szabolcs Nagy
2012-05-07 21:05 ` Szabolcs Nagy
2012-05-07 21:10 ` nwmcsween
2012-05-07 21:18 ` Szabolcs Nagy
2012-05-07 21:24 ` Rich Felker
2012-05-08 6:49 ` Truls Becken
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).