From: Jan Beulich Date: Mon, 23 Oct 2023 08:33:25 +0000 (+0200) Subject: x86: don't record full i386_cpu_flags in struct i386_tc_frag_data X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f314ead9de928b75ba34405931c0d702e7b746c;p=binutils-gdb.git x86: don't record full i386_cpu_flags in struct i386_tc_frag_data We only use a single bit of this ever growing structure. --- diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index c59dee46df7..393fddfe26e 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -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; diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index a697c487387..a3d463d961f 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -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; \