x86: don't record full i386_cpu_flags in struct i386_tc_frag_data
authorJan Beulich <jbeulich@suse.com>
Mon, 23 Oct 2023 08:33:25 +0000 (10:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 23 Oct 2023 08:33:25 +0000 (10:33 +0200)
We only use a single bit of this ever growing structure.

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

index c59dee46df79e60b2728168a3c77395382f3f764..393fddfe26e7ccadbd68fdfea77356357ace2111 100644 (file)
@@ -1470,7 +1470,7 @@ i386_generate_nops (fragS *fragP, char *where, offsetT count, int limit)
            case PROCESSOR_UNKNOWN:
              /* We use cpu_arch_isa_flags to check if we SHOULD
                 optimize with nops.  */
-             if (fragP->tc_frag_data.isa_flags.bitfield.cpunop)
+             if (fragP->tc_frag_data.isanop)
                patt = alt_patt;
              break;
 
@@ -1516,7 +1516,7 @@ i386_generate_nops (fragS *fragP, char *where, offsetT count, int limit)
            default:
              /* We use cpu_arch_isa_flags to check if we CAN optimize
                 with nops.  */
-             if (fragP->tc_frag_data.isa_flags.bitfield.cpunop)
+             if (fragP->tc_frag_data.isanop)
                patt = alt_patt;
              break;
 
index a697c48738782545b9580d516f26d8cd3f8a789c..a3d463d961fb9c961a73cc0788d12bb93bf3b99d 100644 (file)
@@ -284,7 +284,6 @@ struct i386_tc_frag_data
     } u;
   addressT padding_address;
   enum processor_type isa;
-  i386_cpu_flags isa_flags;
   enum processor_type tune;
   enum i386_flag_code code;
   unsigned int max_bytes;
@@ -298,6 +297,7 @@ struct i386_tc_frag_data
   unsigned int classified : 1;
   unsigned int branch_type : 3;
   unsigned int cpunop : 1;
+  unsigned int isanop : 1;
 };
 
 /* We need to emit the right NOP pattern in .align frags.  This is
@@ -311,9 +311,9 @@ struct i386_tc_frag_data
      (FRAGP)->tc_frag_data.u.padding_fragP = NULL;             \
      (FRAGP)->tc_frag_data.padding_address = 0;                        \
      (FRAGP)->tc_frag_data.isa = cpu_arch_isa;                 \
-     (FRAGP)->tc_frag_data.isa_flags = cpu_arch_isa_flags;     \
      (FRAGP)->tc_frag_data.tune = cpu_arch_tune;               \
      (FRAGP)->tc_frag_data.cpunop = cpu_arch_flags.bitfield.cpunop; \
+     (FRAGP)->tc_frag_data.isanop = cpu_arch_isa_flags.bitfield.cpunop; \
      (FRAGP)->tc_frag_data.code = i386_flag_code;              \
      (FRAGP)->tc_frag_data.max_bytes = (MAX_BYTES);            \
      (FRAGP)->tc_frag_data.length = 0;                         \