* [PATCH, i386] Add native detection for VIA C7 and Eden CPUs
@ 2016-06-23 8:26 J. Mayer
2016-06-23 9:59 ` Uros Bizjak
0 siblings, 1 reply; 2+ messages in thread
From: J. Mayer @ 2016-06-23 8:26 UTC (permalink / raw)
To: gcc-patches; +Cc: Uros Bizjak
The following patch adds native detection for C7, Eden "Esther" and
Eden "Nehemiah" VIA CPUs.
Please CC me to any comment / review / change request.
---
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 14b8030..55afd8b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-06-21  Jocelyn Mayer  <l_indien@magic.fr>
+
+Â Â Â Â Â Â Â * config/i386/driver-i386.c (host_detect_local_cpu): Set
+Â Â Â Â Â Â Â PROCESSOR_PENTIUMPRO for signature_CENTAUR_ebx family >= 9.
+Â Â Â Â Â Â Â <case PROCESSOR_PENTIMUMPRO>: Pass c7 or nehemiah for
+Â Â Â Â Â Â Â signature_CENTAUR_ebx.
+
 2016-06-21  Jakub Jelinek  <jakub@redhat.com>
Â
        PR tree-optimization/71588
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-
i386.c
index 9f44ee8..22a8f28 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -653,10 +653,7 @@ const char *host_detect_local_cpu (int argc, const
char **argv)
        case 6:
          if (has_longmode)
            processor = PROCESSOR_K8;
-Â Â Â Â Â Â Â Â Â else if (model > 9)
-           /* Use the default detection procedure.  */
-Â Â Â Â Â Â Â Â Â Â Â ;
-Â Â Â Â Â Â Â Â Â else if (model == 9)
+Â Â Â Â Â Â Â Â Â else if (model >= 9)
            processor = PROCESSOR_PENTIUMPRO;
          else if (model >= 6)
            processor = PROCESSOR_I486;
@@ -818,15 +815,27 @@ const char *host_detect_local_cpu (int argc,
const char **argv)
                   as all the CPUs below are 32-bit only.  */
                cpu = "x86-64";
              else if (has_sse3)
-               /* It is Core Duo.  */
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cpu = "pentium-m";
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â {
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (vendor == signature_CENTAUR_ebx)
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /* C7 / Eden "Esther" */
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cpu = "c7";
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â else
+                   /* It is Core Duo.  */
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cpu = "pentium-m";
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }
              else if (has_sse2)
                /* It is Pentium M.  */
                cpu = "pentium-m";
              else if (has_sse)
                {
                  if (vendor == signature_CENTAUR_ebx)
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cpu = "c3-2";
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â {
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (model >= 9)
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /* Eden "Nehemiah" */
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cpu = "nehemiah";
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â else
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cpu = "c3-2";
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }
                  else
                    /* It is Pentium III.  */
                    cpu = "pentium3";
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH, i386] Add native detection for VIA C7 and Eden CPUs
2016-06-23 8:26 [PATCH, i386] Add native detection for VIA C7 and Eden CPUs J. Mayer
@ 2016-06-23 9:59 ` Uros Bizjak
0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2016-06-23 9:59 UTC (permalink / raw)
To: J. Mayer; +Cc: gcc-patches
On Thu, Jun 23, 2016 at 10:26 AM, J. Mayer <l_indien@magic.fr> wrote:
> The following patch adds native detection for C7, Eden "Esther" and
> Eden "Nehemiah" VIA CPUs.
>
> Please CC me to any comment / review / change request.
>
> ---
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 14b8030..55afd8b 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,10 @@
> +2016-06-21 Jocelyn Mayer <l_indien@magic.fr>
> +
> + * config/i386/driver-i386.c (host_detect_local_cpu): Set
> + PROCESSOR_PENTIUMPRO for signature_CENTAUR_ebx family >= 9.
> + <case PROCESSOR_PENTIMUMPRO>: Pass c7 or nehemiah for
> + signature_CENTAUR_ebx.
The patch is OK for mainline.
Thanks,
Uros.
> 2016-06-21 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/71588
> diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-
> i386.c
> index 9f44ee8..22a8f28 100644
> --- a/gcc/config/i386/driver-i386.c
> +++ b/gcc/config/i386/driver-i386.c
> @@ -653,10 +653,7 @@ const char *host_detect_local_cpu (int argc, const
> char **argv)
> case 6:
> if (has_longmode)
> processor = PROCESSOR_K8;
> - else if (model > 9)
> - /* Use the default detection procedure. */
> - ;
> - else if (model == 9)
> + else if (model >= 9)
> processor = PROCESSOR_PENTIUMPRO;
> else if (model >= 6)
> processor = PROCESSOR_I486;
> @@ -818,15 +815,27 @@ const char *host_detect_local_cpu (int argc,
> const char **argv)
> as all the CPUs below are 32-bit only. */
> cpu = "x86-64";
> else if (has_sse3)
> - /* It is Core Duo. */
> - cpu = "pentium-m";
> + {
> + if (vendor == signature_CENTAUR_ebx)
> + /* C7 / Eden "Esther" */
> + cpu = "c7";
> + else
> + /* It is Core Duo. */
> + cpu = "pentium-m";
> + }
> else if (has_sse2)
> /* It is Pentium M. */
> cpu = "pentium-m";
> else if (has_sse)
> {
> if (vendor == signature_CENTAUR_ebx)
> - cpu = "c3-2";
> + {
> + if (model >= 9)
> + /* Eden "Nehemiah" */
> + cpu = "nehemiah";
> + else
> + cpu = "c3-2";
> + }
> else
> /* It is Pentium III. */
> cpu = "pentium3";
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-23 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-23 8:26 [PATCH, i386] Add native detection for VIA C7 and Eden CPUs J. Mayer
2016-06-23 9:59 ` Uros Bizjak
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).