public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100758] New: __builtin_cpu_supports does not (always) detect "sse2"
@ 2021-05-25 18:37 gcc at eckner dot net
  2021-05-26  7:57 ` [Bug target/100758] " marxin at gcc dot gnu.org
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: gcc at eckner dot net @ 2021-05-25 18:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100758
           Summary: __builtin_cpu_supports does not (always) detect "sse2"
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at eckner dot net
  Target Milestone: ---
              Host: i686
            Target: i686

Created attachment 50868
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50868&action=edit
test.c: probe for sse2

I use the attached snippet to detect, whether the cpu supports sse2. This works
most of the time, but fails to detect sse2 on two machines, which actually
support sse2 (according to /proc/cpuinfo).

The affected machines run archlinux32. /proc/cpuinfo shows:

processor       : 0
vendor_id       : CentaurHauls
cpu family      : 6
model           : 15
model name      : VIA Nano U3400@800MHz
stepping        : 10
cpu MHz         : 798.016
cache size      : 2048 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat clflush acpi mmx fxsr sse sse2 ss tm syscall nx lm constant_tsc
arch_perfmon rep_good cpuid pni monitor vmx est tm2 ssse3 cx16 xtpr sse4_1
popcnt rng rng_en ace ace_en ace2 phe phe_en pmm pmm_en lahf_lm tpr_shadow vnmi
vpid ida
vmx flags       : vnmi tsc_offset vtpr
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds
swapgs itlb_multihit
bogomips        : 1596.53
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

and
processor       : 0
vendor_id       : CentaurHauls
cpu family      : 6
model           : 13
model name      : VIA C7-D Processor 1800MHz
stepping        : 0
cpu MHz         : 1596.326
cache size      : 128 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge cmov pat
clflush acpi mmx fxsr sse sse2 tm nx cpuid pni est tm2 xtpr rng rng_en ace
ace_en ace2 ace2_en phe phe_en pmm pmm_en
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds
swapgs itlb_multihit
bogomips        : 3193.67
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 32 bits virtual
power management:

respectively. On these machines, the output is "sse2: 0" instead of some value
unequal 0.

Regards,
Erich

P.S.: I hope, I reported this in the correct category. Please let me know, if I
did not.

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

end of thread, other threads:[~2023-05-03 15:21 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 18:37 [Bug c/100758] New: __builtin_cpu_supports does not (always) detect "sse2" gcc at eckner dot net
2021-05-26  7:57 ` [Bug target/100758] " marxin at gcc dot gnu.org
2021-05-26  9:12 ` gcc at eckner dot net
2021-05-26  9:23 ` marxin at gcc dot gnu.org
2021-05-26  9:46 ` gcc at eckner dot net
2021-05-26  9:54 ` rguenth at gcc dot gnu.org
2021-05-26 10:09 ` marxin at gcc dot gnu.org
2021-05-26 10:13 ` gcc at eckner dot net
2021-06-01 13:26 ` marxin at gcc dot gnu.org
2023-01-27 20:48 ` iam at valdikss dot org.ru
2023-02-01 14:03 ` marxin at gcc dot gnu.org
2023-02-01 14:23 ` iam at valdikss dot org.ru
2023-02-01 14:32 ` marxin at gcc dot gnu.org
2023-02-09 10:50 ` cvs-commit at gcc dot gnu.org
2023-02-09 11:40 ` jakub at gcc dot gnu.org
2023-02-09 11:47 ` marxin at gcc dot gnu.org
2023-02-09 12:22 ` jakub at gcc dot gnu.org
2023-02-09 16:22 ` gcc at eckner dot net
2023-02-09 16:37 ` jakub at gcc dot gnu.org
2023-02-09 16:45 ` cvs-commit at gcc dot gnu.org
2023-02-09 20:37 ` gcc at eckner dot net
2023-02-09 21:35 ` iam at valdikss dot org.ru
2023-02-10  8:27 ` marxin at gcc dot gnu.org
2023-02-10  9:45 ` jakub at gcc dot gnu.org
2023-02-20  9:50 ` Mayshao-oc at zhaoxin dot com
2023-03-19  5:29 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:14 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:21 ` cvs-commit 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).