[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/47248: Using -march=native on Intel I5 causes illegal instructions
The following reply was made to PR kern/47248; it has been noted by GNATS.
From: David Laight <david%l8s.co.uk@localhost>
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
Subject: Re: kern/47248: Using -march=native on Intel I5 causes illegal
Date: Sun, 30 Dec 2012 16:42:40 +0000
On Mon, Nov 26, 2012 at 10:10:00AM +0000, jaapb%NetBSD.org@localhost wrote:
> >Synopsis: Using -march=native on Intel I5 causes illegal instructions
The gcc code that converts -march=native into a list of -mxxx options
(-mcx16 -msahf -maes -mpclmul -mpopcnt -mavx on my i7) is only checking
that the cpu supports the extra instructions, not that the OS also has
The Intel docs vol 1 secton 13.5 tell you to check the OXSAVE bit
as well as the AVX one (otherwise it is likely to be an old OS).
The doc also says to check that the XCR0 bits indicate that AVX
can actually be used - but I suspect the kernel may want to 'lazy-set'
Checking OXSAVE is easy, fixed in rev 1.2 of gcc's driver_i386.c
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |