public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] x86: introduce fake processor type to mark sub-arch entries in cpu_arch[]
@ 2022-07-05  6:41 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2022-07-05  6:41 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c368d2a8023052c011b5029471de4f42605c1ed3

commit c368d2a8023052c011b5029471de4f42605c1ed3
Author: Jan Beulich <jbeulich@suse.com>
Date:   Tue Jul 5 08:40:39 2022 +0200

    x86: introduce fake processor type to mark sub-arch entries in cpu_arch[]
    
    This is in preparation of dropping the leading . from the strings.
    
    While there also move PROCESSOR_GENERIC{32,64} from the middle of AMD
    entries to near the top.

Diff:
---
 gas/config/tc-i386.c | 6 +++++-
 gas/config/tc-i386.h | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 0a471d19e30..e2b618fe302 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -934,7 +934,7 @@ const relax_typeS md_relax_table[] =
 #define ARCH(n, t, f, s) \
   { STRING_COMMA_LEN (#n), s, PROCESSOR_ ## t, CPU_ ## f ## _FLAGS }
 #define SUBARCH(n, e, s) \
-  { STRING_COMMA_LEN ("." #n), s, PROCESSOR_UNKNOWN, CPU_ ## e ## _FLAGS }
+  { STRING_COMMA_LEN ("." #n), s, PROCESSOR_NONE, CPU_ ## e ## _FLAGS }
 
 static const arch_entry cpu_arch[] =
 {
@@ -1471,6 +1471,8 @@ i386_generate_nops (fragS *fragP, char *where, offsetT count, int limit)
 	    case PROCESSOR_GENERIC32:
 	      patt = f32_patt;
 	      break;
+	    case PROCESSOR_NONE:
+	      abort ();
 	    }
 	}
       else
@@ -1516,6 +1518,8 @@ i386_generate_nops (fragS *fragP, char *where, offsetT count, int limit)
 	    case PROCESSOR_GENERIC64:
 	      patt = alt_patt;
 	      break;
+	    case PROCESSOR_NONE:
+	      abort ();
 	    }
 	}
 
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 817539ea560..5d6fc752474 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -228,6 +228,8 @@ extern long i386_generic_table_relax_frag (segT, fragS *, long);
 enum processor_type
 {
   PROCESSOR_UNKNOWN,
+  PROCESSOR_GENERIC32,
+  PROCESSOR_GENERIC64,
   PROCESSOR_I386,
   PROCESSOR_I486,
   PROCESSOR_PENTIUM,
@@ -241,12 +243,12 @@ enum processor_type
   PROCESSOR_K6,
   PROCESSOR_ATHLON,
   PROCESSOR_K8,
-  PROCESSOR_GENERIC32,
-  PROCESSOR_GENERIC64,
   PROCESSOR_AMDFAM10,
   PROCESSOR_BD,
   PROCESSOR_ZNVER,
-  PROCESSOR_BT
+  PROCESSOR_BT,
+  /* Keep this last.  */
+  PROCESSOR_NONE
 };
 
 extern enum processor_type cpu_arch_tune;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-05  6:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05  6:41 [binutils-gdb] x86: introduce fake processor type to mark sub-arch entries in cpu_arch[] Jan Beulich

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