public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native
@ 2010-05-09 4:47 dirtyepic at gentoo dot org
2010-05-09 4:48 ` [Bug target/44046] " dirtyepic at gentoo dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: dirtyepic at gentoo dot org @ 2010-05-09 4:47 UTC (permalink / raw)
To: gcc-bugs
We have a user that is getting illegal instruction errors while building
xulrunner.
/var/tmp/portage/net-libs/xulrunner-1.9.2.3-r1/work/mozilla-1.9.2/dist/bin/xpidl
-m typelib -w -I. -I../../dist/idl -e _xpidlgen/nsIConsoleListener.xpt -d
.deps/nsIConsoleListener.pp nsIConsoleListener.idl
make[4]: *** [_xpidlgen/nsIConsoleListener.xpt] Illegal instruction
It turns out that using -march=native with his Core i5 processor results in
-march=atom being used, specifically:
gcc version 4.5.0 (Gentoo 4.5.0 p1.0)
COLLECT_GCC_OPTIONS= '-v' '-o' 'test'
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.0/cc1 -quiet -v test.c
-D_FORTIFY_SOURCE=2 -march=atom -mcx16 -msahf -maes -mpclmul -mpopcnt -msse4.2
--param l1-cache-size=32 --param l1-cache-line-size=64 --param
l2-cache-size=3072 -mtune=core2 -quiet -dumpbase test.c -auxbase test -version
-o /tmp/ccmAagyo.s
I believe the issue is that this processor doesn't support mmovbe, which
-march=atom enables (the error doesn't occur w/ -march=atom -mno-movbe). Am I
right in guessing that it should instead be using -march=core2 + a bunch of -m
flags?
I will attach his /proc/cpuinfo. Let me know what other info you need.
http://bugs.gentoo.org/317513
--
Summary: Intel Core i5 M520 CPU detected as atom with -
march=native
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dirtyepic at gentoo dot org
GCC build triplet: x86_64-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
@ 2010-05-09 4:48 ` dirtyepic at gentoo dot org
2010-05-09 7:26 ` ubizjak at gmail dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dirtyepic at gentoo dot org @ 2010-05-09 4:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dirtyepic at gentoo dot org 2010-05-09 04:48 -------
Created an attachment (id=20610)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20610&action=view)
/proc/cpuinfo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
2010-05-09 4:48 ` [Bug target/44046] " dirtyepic at gentoo dot org
@ 2010-05-09 7:26 ` ubizjak at gmail dot com
2010-05-09 14:43 ` hjl dot tools at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2010-05-09 7:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ubizjak at gmail dot com 2010-05-09 07:25 -------
>From config/driver-i386.c
[...]
case PROCESSOR_PENTIUMPRO:
if (model == 28)
cpu = "atom";
else if (model >= 28 && l2sizekb < 2048)
/* Assume it's a small core if there's less than 2MB cache */
cpu = "atom";
else if (has_longmode)
cpu = "core2";
And from cpuid:
cpu family : 6
model : 37
cache size : 3072 KB
driver detects --param l2-cache-size=3072 and -march=atom ... WTF ?
Can you please step through the driver with debugger and determine _exact_
values of model and l2sizekb in the above source? It is around line 540 in
gcc/config/i386/driver-i386.c.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
2010-05-09 4:48 ` [Bug target/44046] " dirtyepic at gentoo dot org
2010-05-09 7:26 ` ubizjak at gmail dot com
@ 2010-05-09 14:43 ` hjl dot tools at gmail dot com
2010-05-09 14:50 ` hjl at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-09 14:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjl dot tools at gmail dot com 2010-05-09 14:43 -------
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00606.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2010-
| |05/msg00606.html
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-05-09 14:43:11
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (2 preceding siblings ...)
2010-05-09 14:43 ` hjl dot tools at gmail dot com
@ 2010-05-09 14:50 ` hjl at gcc dot gnu dot org
2010-05-09 14:53 ` hjl at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl at gcc dot gnu dot org @ 2010-05-09 14:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hjl at gcc dot gnu dot org 2010-05-09 14:50 -------
Subject: Bug 44046
Author: hjl
Date: Sun May 9 14:49:53 2010
New Revision: 159202
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159202
Log:
Properly detect Atom, Core 2 and Core i7.
2010-05-09 H.J. Lu <hongjiu.lu@intel.com>
PR target/44046
* config/i386/driver-i386.c (host_detect_local_cpu): Properly
detect Atom, Core 2 and Core i7.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/driver-i386.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (3 preceding siblings ...)
2010-05-09 14:50 ` hjl at gcc dot gnu dot org
@ 2010-05-09 14:53 ` hjl at gcc dot gnu dot org
2010-05-09 15:43 ` hjl dot tools at gmail dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl at gcc dot gnu dot org @ 2010-05-09 14:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjl at gcc dot gnu dot org 2010-05-09 14:53 -------
Subject: Bug 44046
Author: hjl
Date: Sun May 9 14:53:00 2010
New Revision: 159203
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159203
Log:
Properly detect Atom, Core 2 and Core i7.
2010-05-09 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
2010-05-09 H.J. Lu <hongjiu.lu@intel.com>
PR target/44046
* config/i386/driver-i386.c (host_detect_local_cpu): Properly
detect Atom, Core 2 and Core i7.
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/config/i386/driver-i386.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (4 preceding siblings ...)
2010-05-09 14:53 ` hjl at gcc dot gnu dot org
@ 2010-05-09 15:43 ` hjl dot tools at gmail dot com
2010-05-09 18:39 ` dirtyepic at gentoo dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-09 15:43 UTC (permalink / raw)
To: gcc-bugs
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.5.1 4.6.0
Target Milestone|--- |4.4.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (5 preceding siblings ...)
2010-05-09 15:43 ` hjl dot tools at gmail dot com
@ 2010-05-09 18:39 ` dirtyepic at gentoo dot org
2010-05-09 18:44 ` dirtyepic at gentoo dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dirtyepic at gentoo dot org @ 2010-05-09 18:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dirtyepic at gentoo dot org 2010-05-09 18:39 -------
Created an attachment (id=20614)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20614&action=view)
gcc45-PR44046-core2.patch
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (6 preceding siblings ...)
2010-05-09 18:39 ` dirtyepic at gentoo dot org
@ 2010-05-09 18:44 ` dirtyepic at gentoo dot org
2010-05-10 3:53 ` hjl dot tools at gmail dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dirtyepic at gentoo dot org @ 2010-05-09 18:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dirtyepic at gentoo dot org 2010-05-09 18:44 -------
sorry, wrong bugzilla. ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (7 preceding siblings ...)
2010-05-09 18:44 ` dirtyepic at gentoo dot org
@ 2010-05-10 3:53 ` hjl dot tools at gmail dot com
2010-08-11 18:44 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-10 3:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl dot tools at gmail dot com 2010-05-10 03:52 -------
Fixed. No need to change gcc 4.4.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|4.4.6 |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (8 preceding siblings ...)
2010-05-10 3:53 ` hjl dot tools at gmail dot com
@ 2010-08-11 18:44 ` jakub at gcc dot gnu dot org
2010-08-11 19:12 ` hjl dot tools at gmail dot com
2010-08-11 20:31 ` hjl dot tools at gmail dot com
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-08-11 18:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2010-08-11 18:44 -------
Apparently some KVM versions claim to be GenuineIntel family 6 model 6 with lm,
but not ssse3, see
https://bugzilla.redhat.com/show_bug.cgi?id=620562
Perhaps the has_longmode -> core2 test should be restored...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (9 preceding siblings ...)
2010-08-11 18:44 ` jakub at gcc dot gnu dot org
@ 2010-08-11 19:12 ` hjl dot tools at gmail dot com
2010-08-11 20:31 ` hjl dot tools at gmail dot com
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-11 19:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from hjl dot tools at gmail dot com 2010-08-11 19:12 -------
(In reply to comment #9)
> Apparently some KVM versions claim to be GenuineIntel family 6 model 6 with lm,
> but not ssse3, see
> https://bugzilla.redhat.com/show_bug.cgi?id=620562
> Perhaps the has_longmode -> core2 test should be restored...
>
There are no such processors from Intel. If you look at SSE3 and LM, it
sounds like Nocona. But it also has family 6 and model 6. It looks like
Pentium-M. If we pass -march=core2, it will generate SSSE3, which isn't
supported. The bug is in KVM. It should never make up fake Intel processors.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44046] Intel Core i5 M520 CPU detected as atom with -march=native
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
` (10 preceding siblings ...)
2010-08-11 19:12 ` hjl dot tools at gmail dot com
@ 2010-08-11 20:31 ` hjl dot tools at gmail dot com
11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-11 20:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from hjl dot tools at gmail dot com 2010-08-11 20:31 -------
Maybe we can improve the unknown processor support:
1. For 32bit, use i686 + -mSSEx.
2. For 64bit, use x86_64 + -mSSEx.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44046
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-08-11 20:31 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-09 4:47 [Bug target/44046] New: Intel Core i5 M520 CPU detected as atom with -march=native dirtyepic at gentoo dot org
2010-05-09 4:48 ` [Bug target/44046] " dirtyepic at gentoo dot org
2010-05-09 7:26 ` ubizjak at gmail dot com
2010-05-09 14:43 ` hjl dot tools at gmail dot com
2010-05-09 14:50 ` hjl at gcc dot gnu dot org
2010-05-09 14:53 ` hjl at gcc dot gnu dot org
2010-05-09 15:43 ` hjl dot tools at gmail dot com
2010-05-09 18:39 ` dirtyepic at gentoo dot org
2010-05-09 18:44 ` dirtyepic at gentoo dot org
2010-05-10 3:53 ` hjl dot tools at gmail dot com
2010-08-11 18:44 ` jakub at gcc dot gnu dot org
2010-08-11 19:12 ` hjl dot tools at gmail dot com
2010-08-11 20:31 ` hjl dot tools at gmail dot com
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 read-only IMAP folder(s) and NNTP newsgroup(s).