Date: Wed, 23 Oct 2013 20:23:00 +0200 From: Tijl Coosemans <tijl@coosemans.org> To: Torbjorn Granlund <tg@gmplib.org> Cc: bapt@FreeBSD.org, freebsd-questions@freebsd.org Subject: Re: MULX on haswell triggers ILLOP Message-ID: <20131023202300.7d316d29@kalimero.tijl.coosemans.org> In-Reply-To: <867gd3lw89.fsf@shell.gmplib.org> References: <86wql4onvy.fsf@shell.gmplib.org> <867gd3lw89.fsf@shell.gmplib.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 Oct 2013 19:42:46 +0200 Torbjorn Granlund wrote: > Torbjorn Granlund <tg@gmplib.org> writes: > > I have an Intel Haswell system which runs Xen/NetBSD with Debian 7.2, > NetBSD 6.1.2 and FreeBSD 9.2 guests. > > The FreeBSD guest casts an ILLOP when fed with the new MULX instruction. > This is a plain integer register based instruction which should require > zero kernel support. > > MULX is part of the BMI2 extensions. > > The instruction works fine in the other guest systems. > > What is going on? How can FreeBSD reject this instruction? > > I have not tried to run FreeBSD on the bare metal, so I cannot tell if > BMI2 works as expected there. > > It turns out to be another strike of an FreeBSD m4 eval bug. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=166994 > > Unfortunately, this means that GMP will not work on Haswell CPUs running > FreeBSD, where we assemble unsupported instructions using m4 macros. > That is a workaround for FreeBSD's seriously outdated binutils. Of > course, we could implement a workaround for the m4 bug, but that > workaround would be more complex than a bugfix for m4. > > My hopes that FreeBSD will fix this bug are not high, given that it has > been known for 1.5 years. A comment on that PR says that it has been fixed in http://svnweb.freebsd.org/base?view=revision&revision=228063 I don't know if it's feasible to merge this to stable/9. Committer CCed.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131023202300.7d316d29>