From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/806 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Error compiling with clang Date: Mon, 7 May 2012 17:02:51 -0400 Message-ID: <20120507210251.GZ14673@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1336424347 28316 80.91.229.3 (7 May 2012 20:59:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 May 2012 20:59:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-807-gllmg-musl=m.gmane.org@lists.openwall.com Mon May 07 22:59:07 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SRV1P-00007l-4w for gllmg-musl@plane.gmane.org; Mon, 07 May 2012 22:59:07 +0200 Original-Received: (qmail 20368 invoked by uid 550); 7 May 2012 20:59:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20358 invoked from network); 7 May 2012 20:59:06 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:806 Archived-At: 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