FS#24407 - gcc -march=native sometimes generates unsupported instructions

Attached to Project: Arch Linux
Opened by Nathanael Schaeffer (john_schaf) - Monday, 23 May 2011, 20:42 GMT
Last edited by Allan McRae (Allan) - Sunday, 05 June 2011, 09:49 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

With gcc (GCC) 4.6.0 20110513 (prerelease)
I compile on my laptop :
----
Intel(R) Pentium(R) CPU U5400 @ 1.20GHz
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl e
st tm2 ssse3 cx16 xtpr pdcm popcnt lahf_lm arat dts
----

then "gcc -march=native" generates unsuported instructions like PINSRD (which
is part of SSE4.1 according to wikipedia, not supported by this CPU)
I guess -mtune=native uncorrectly detects this CPU in version 4.6.0
Version 4.5.x did work correctly.

WORKAROUND: use -march=core2

See also bug reported upstream : http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49128
and the proposed patch : http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01667.html
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 05 June 2011, 09:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  gcc-4.6.0-6 in [testing]

Loading...