public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU
@ 2014-06-20  7:15 jakub at gcc dot gnu.org
  2014-06-20  9:37 ` [Bug target/61570] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-06-20  7:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

            Bug ID: 61570
           Summary: -march=native CPU you selected does not support x86-64
                    instruction under QEMU
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org

As can be seen in:
https://fedorahosted.org/rel-eng/ticket/5924
under some (weird?) QEMU configuration -march=native doesn't work (pr57275.c
FAILed during regtest).

For /proc/cpuinfo:
processor       : 0
vendor_id       : GenuineIntel 
cpu family      : 6 
model           : 13 
model name      : QEMU Virtual CPU version (cpu64-rhel6) 
stepping        : 3 
microcode       : 0x1 
cpu MHz         : 1999.999 
cache size      : 4096 KB 
physical id     : 0 
siblings        : 1 
core id         : 0 
cpu cores       : 1 
apicid          : 0 
initial apicid  : 0 
fpu             : yes 
fpu_exception   : yes 
cpuid level     : 4 
wp              : yes 
flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl pni cx16 
hypervisor lahf_lm 
bogomips        : 3999.99 
clflush size    : 64 
cache_alignment : 64 
address sizes   : 46 bits physical, 48 bits virtual 
power management: 

-march=native gives:
-march=pentium-m -mmmx -mno-3dnow -msse -msse2 -msse3 -mno-ssse3 -mno-sse4a
-mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mno-popcnt -mno-abm
-mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx
-mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd
-mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave
-mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf
-mno-prefetchwt1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param
l2-cache-size=4096 -mtune=generic

Would it be possible to use -march=x86-64 instead of all the non-PTA_64BIT CPUs
if the driver is 64-bit (__LP64__/_LP64/x86_64 is defined)?  Or what is a way
to detect if a CPU supports the 64-bit ISA?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
@ 2014-06-20  9:37 ` jakub at gcc dot gnu.org
  2014-06-20 10:13 ` mikpelinux at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-06-20  9:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Sure, but for this model AFAIK we go through the default: case of PENTIUMPRO
anyway, where we only test the flags, so even if it used some completely
unknown family number, it would still behave the same.
So, can't we before:
              else if (has_sse3)
                /* It is Core Duo.  */
                cpu = "pentium-m";
              else if (has_sse2)
                /* It is Pentium M.  */
                cpu = "pentium-m";
just add
              else if (has_longmode)
                /* Some unknown 64-bit CPU, perhaps emulator?  */
                cpu = "x86-64";
?
Otherwise, QEMU, if it doesn't want to support SSSE3 and SSE3, and doesn't want
to support 3dNOW either would need to identify itself as something other than
Intel and AMD.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
  2014-06-20  9:37 ` [Bug target/61570] " jakub at gcc dot gnu.org
@ 2014-06-20 10:13 ` mikpelinux at gmail dot com
  2014-06-23 16:29 ` hjl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mikpelinux at gmail dot com @ 2014-06-20 10:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

Mikael Pettersson <mikpelinux at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpelinux at gmail dot com

--- Comment #3 from Mikael Pettersson <mikpelinux at gmail dot com> ---
(In reply to Jakub Jelinek from comment #2)
> Sure, but for this model AFAIK we go through the default: case of PENTIUMPRO
> anyway, where we only test the flags, so even if it used some completely
> unknown family number, it would still behave the same.
> So, can't we before:
>               else if (has_sse3)
>                 /* It is Core Duo.  */
>                 cpu = "pentium-m";
>               else if (has_sse2)
>                 /* It is Pentium M.  */
>                 cpu = "pentium-m";
> just add
>               else if (has_longmode)
>                 /* Some unknown 64-bit CPU, perhaps emulator?  */
>                 cpu = "x86-64";
> ?

That looks reasonable.

> Otherwise, QEMU, if it doesn't want to support SSSE3 and SSE3, and doesn't
> want to support 3dNOW either would need to identify itself as something
> other than Intel and AMD.

I don't recall if the 1st gen 64-bit Netburst had SSE3/SSSE3 or not, but if it
didn't then emulating that should be close enough to generic x86_64.  Otherwise
I'd prefer qemu to choose a unique vendor, unique family, or some high unused
model (e.g. all-bits-one).


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
  2014-06-20  9:37 ` [Bug target/61570] " jakub at gcc dot gnu.org
  2014-06-20 10:13 ` mikpelinux at gmail dot com
@ 2014-06-23 16:29 ` hjl at gcc dot gnu.org
  2014-06-24 14:46 ` hjl at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl at gcc dot gnu.org @ 2014-06-23 16:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Mon Jun 23 16:28:36 2014
New Revision: 211901

URL: https://gcc.gnu.org/viewcvs?rev=211901&root=gcc&view=rev
Log:
Assume x86-64 if a 32-bit processor supports SSE2 and 64-bit

    PR target/61570
    * config/i386/driver-i386.c (host_detect_local_cpu): Set arch
    to x86-64 if a 32-bit processor supports SSE2 and 64-bit.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/driver-i386.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-06-23 16:29 ` hjl at gcc dot gnu.org
@ 2014-06-24 14:46 ` hjl at gcc dot gnu.org
  2014-06-24 14:58 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl at gcc dot gnu.org @ 2014-06-24 14:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

--- Comment #5 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Tue Jun 24 14:46:18 2014
New Revision: 211943

URL: https://gcc.gnu.org/viewcvs?rev=211943&root=gcc&view=rev
Log:
Revert the last change on driver-i386.c

    PR target/61570
    * config/i386/driver-i386.c (host_detect_local_cpu): Revert
    the last change.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/driver-i386.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-06-24 14:46 ` hjl at gcc dot gnu.org
@ 2014-06-24 14:58 ` jakub at gcc dot gnu.org
  2014-06-24 15:07 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-06-24 14:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Jun 24 14:58:19 2014
New Revision: 211945

URL: https://gcc.gnu.org/viewcvs?rev=211945&root=gcc&view=rev
Log:
    PR target/61570
    * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
    model family 6 CPU with has_longmode never use a CPU without
    64-bit support.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/driver-i386.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-06-24 14:58 ` jakub at gcc dot gnu.org
@ 2014-06-24 15:07 ` jakub at gcc dot gnu.org
  2014-06-24 15:14 ` jakub at gcc dot gnu.org
  2014-11-15 16:45 ` fxcoudert at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-06-24 15:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Jun 24 15:06:40 2014
New Revision: 211947

URL: https://gcc.gnu.org/viewcvs?rev=211947&root=gcc&view=rev
Log:
    PR target/61570
    * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
    model family 6 CPU with has_longmode never use a CPU without
    64-bit support.

Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/config/i386/driver-i386.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-06-24 15:07 ` jakub at gcc dot gnu.org
@ 2014-06-24 15:14 ` jakub at gcc dot gnu.org
  2014-11-15 16:45 ` fxcoudert at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-06-24 15:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Jun 24 15:13:32 2014
New Revision: 211948

URL: https://gcc.gnu.org/viewcvs?rev=211948&root=gcc&view=rev
Log:
    PR target/61570
    * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
    model family 6 CPU with has_longmode never use a CPU without
    64-bit support.

Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/i386/driver-i386.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/61570] -march=native CPU you selected does not support x86-64 instruction under QEMU
  2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-06-24 15:14 ` jakub at gcc dot gnu.org
@ 2014-11-15 16:45 ` fxcoudert at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-15 16:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61570

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |fxcoudert at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.8.4

--- Comment #9 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
I think this one should have been closed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-15 16:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20  7:15 [Bug target/61570] New: -march=native CPU you selected does not support x86-64 instruction under QEMU jakub at gcc dot gnu.org
2014-06-20  9:37 ` [Bug target/61570] " jakub at gcc dot gnu.org
2014-06-20 10:13 ` mikpelinux at gmail dot com
2014-06-23 16:29 ` hjl at gcc dot gnu.org
2014-06-24 14:46 ` hjl at gcc dot gnu.org
2014-06-24 14:58 ` jakub at gcc dot gnu.org
2014-06-24 15:07 ` jakub at gcc dot gnu.org
2014-06-24 15:14 ` jakub at gcc dot gnu.org
2014-11-15 16:45 ` fxcoudert at gcc dot gnu.org

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).