i386: Move i386_seg_prefixes to gas
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 17 Nov 2022 17:04:00 +0000 (09:04 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 17 Nov 2022 17:06:10 +0000 (09:06 -0800)
gas/

* config/tc-i386.c (i386_seg_prefixes): New. Moved from opcodes.

opcodes/

* i386-opc.c (i386_seg_prefixes): Removed.
* i386-opc.h (i386_seg_prefixes): Likewise.

gas/config/tc-i386.c
opcodes/i386-opc.c
opcodes/i386-opc.h

index 5bc3a56e4b2f8352f0014a554069e17675fafc9a..f54e7fddee0d58dbcdda184639ea6909b565d175 100644 (file)
@@ -464,6 +464,16 @@ static const struct RC_name RC_NamesTable[] =
   {  saeonly,  STRING_COMMA_LEN ("sae") },
 };
 
+/* To be indexed by segment register number.  */
+static const unsigned char i386_seg_prefixes[] = {
+  ES_PREFIX_OPCODE,
+  CS_PREFIX_OPCODE,
+  SS_PREFIX_OPCODE,
+  DS_PREFIX_OPCODE,
+  FS_PREFIX_OPCODE,
+  GS_PREFIX_OPCODE
+};
+
 /* List of chars besides those in app.c:symbol_chars that can start an
    operand.  Used to prevent the scrubber eating vital white-space.  */
 const char extra_symbol_chars[] = "*%-([{}"
index 66566bd54b6509e45c8df5ba6166f445d2f45db4..729c22932b1d4a410e3b699db0e3ce75afd5f48c 100644 (file)
 #include "libiberty.h"
 #include "i386-opc.h"
 #include "i386-tbl.h"
-
-/* To be indexed by segment register number.  */
-const unsigned char i386_seg_prefixes[] = {
-  ES_PREFIX_OPCODE,
-  CS_PREFIX_OPCODE,
-  SS_PREFIX_OPCODE,
-  DS_PREFIX_OPCODE,
-  FS_PREFIX_OPCODE,
-  GS_PREFIX_OPCODE
-};
index 168729fec622eccccd0e197a21f3e6af0945dbcf..459268f3656322d184a11082a49f6f2bb3bd275e 100644 (file)
@@ -1014,4 +1014,3 @@ reg_entry;
 
 extern const reg_entry i386_regtab[];
 extern const unsigned int i386_regtab_size;
-extern const unsigned char i386_seg_prefixes[6];