public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Subject: [PATCH 5/7] x86: introduce fake processor type to mark sub-arch entries in cpu_arch[]
Date: Thu, 30 Jun 2022 14:54:56 +0200	[thread overview]
Message-ID: <698f66c4-93f1-0627-1958-4ef83c7d0326@suse.com> (raw)
In-Reply-To: <01f502ff-5b51-86d3-ed54-646df7d22037@suse.com>

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.

--- 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 *
 	    case PROCESSOR_GENERIC32:
 	      patt = f32_patt;
 	      break;
+	    case PROCESSOR_NONE:
+	      abort ();
 	    }
 	}
       else
@@ -1516,6 +1518,8 @@ i386_generate_nops (fragS *fragP, char *
 	    case PROCESSOR_GENERIC64:
 	      patt = alt_patt;
 	      break;
+	    case PROCESSOR_NONE:
+	      abort ();
 	    }
 	}
 
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -228,6 +228,8 @@ extern long i386_generic_table_relax_fra
 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;


  parent reply	other threads:[~2022-06-30 12:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 12:52 [PATCH] gas/x86: .arch / -march= enhancements Jan Beulich
2022-06-30 12:53 ` [PATCH 1/7] x86: don't leak sub-architecture accumulated strings Jan Beulich
2022-06-30 22:54   ` H.J. Lu
2022-07-01 10:18     ` Jan Beulich
2022-07-01 19:44       ` H.J. Lu
2022-06-30 12:53 ` [PATCH 2/7] x86: de-duplicate sub-architecture strings accumulation Jan Beulich
2022-06-30 22:55   ` H.J. Lu
2022-06-30 12:53 ` [PATCH 3/7] x86: permit "default" with .arch Jan Beulich
2022-06-30 22:58   ` H.J. Lu
2022-06-30 12:54 ` [PATCH 4/7] x86: macro-ize cpu_arch[] entries Jan Beulich
2022-06-30 23:00   ` H.J. Lu
2022-06-30 12:54 ` Jan Beulich [this message]
2022-06-30 23:03   ` [PATCH 5/7] x86: introduce fake processor type to mark sub-arch entries in cpu_arch[] H.J. Lu
2022-06-30 12:55 ` [PATCH 6/7] x86: generalize disabling of sub-architectures Jan Beulich
2022-06-30 23:11   ` H.J. Lu
2022-06-30 12:55 ` [PATCH 7/7] x86: introduce a state stack for .arch Jan Beulich
2022-06-30 23:15   ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=698f66c4-93f1-0627-1958-4ef83c7d0326@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).