Compare commits

...

1 Commits
c10s ... c8

Author SHA1 Message Date
424e9289e3 Import from CS git 2024-11-05 09:37:03 +00:00
54 changed files with 121967 additions and 138 deletions

View File

@ -0,0 +1 @@
0e008260a958bbd10182ee3384672ae0a310eece SOURCES/binutils-2.41.tar.xz

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/binutils-2.41.tar.xz

View File

@ -1,3 +0,0 @@
# Package Not Available
This package is not available on CentOS Stream 10.
It may be available on another branch.

View File

@ -0,0 +1,38 @@
# Generate OUTPUT_FORMAT line for .so files from the system linker output.
# Imported from glibc/Makerules.
/ld.*[ ]-E[BL]/b f
/collect.*[ ]-E[BL]/b f
/OUTPUT_FORMAT[^)]*$/{N
s/\n[ ]*/ /
}
t o
: o
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
t q
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
t s
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
t q
d
: s
s/"//g
G
s/\n//
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
q
: q
s/"//g
p
q
: f
s/^.*[ ]-E\([BL]\)[ ].*$/,\1/
t h
s/^.*[ ]-E\([BL]\)$/,\1/
t h
d
: h
h

View File

@ -0,0 +1,11 @@
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.27/bfd/elfnn-aarch64.c
--- binutils.orig/bfd/elfnn-aarch64.c 2017-02-21 10:45:19.311956006 +0000
+++ binutils-2.27/bfd/elfnn-aarch64.c 2017-02-21 11:55:07.517922655 +0000
@@ -4947,6 +4947,7 @@ elfNN_aarch64_final_link_relocate (reloc
it here if it is defined in a non-shared object. */
if (h != NULL
&& h->type == STT_GNU_IFUNC
+ && (input_section->flags & SEC_ALLOC)
&& h->def_regular)
{
asection *plt;

View File

@ -0,0 +1,38 @@
diff -rup binutils.orig/bfd/bpf-reloc.def binutils-2.41/bfd/bpf-reloc.def
--- binutils.orig/bfd/bpf-reloc.def 2023-10-30 10:41:59.114273359 +0000
+++ binutils-2.41/bfd/bpf-reloc.def 2023-10-30 11:09:41.316109162 +0000
@@ -72,3 +72,20 @@
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true) /* pcrel_offset */
+
+ /* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM.
+ We provide an entry here so that tools like strip can safely handle BPF
+ binaries generated by other tools. */
+ BPF_HOWTO (R_BPF_64_NODYLD32, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bpf_elf_generic_reloc, /* special_function */
+ "R_BPF_64_NODYLD32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false) /* pcrel_offset */
diff -rup binutils.orig/include/elf/bpf.h binutils-2.41/include/elf/bpf.h
--- binutils.orig/include/elf/bpf.h 2023-10-30 10:41:59.332273599 +0000
+++ binutils-2.41/include/elf/bpf.h 2023-10-30 10:59:44.475368448 +0000
@@ -30,8 +30,8 @@ START_RELOC_NUMBERS (elf_bpf_reloc_type)
RELOC_NUMBER (R_BPF_64_64, 1)
RELOC_NUMBER (R_BPF_64_ABS64, 2)
RELOC_NUMBER (R_BPF_64_ABS32, 3)
-/* R_BPF_64_NODYLD32 is not used by GNU tools.
- * It is kept in this file to remind that the value is already taken. */
+/* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM.
+ It is kept in this file to remind that the value is already taken. */
RELOC_NUMBER (R_BPF_64_NODYLD32, 4)
RELOC_NUMBER (R_BPF_64_32, 10)
END_RELOC_NUMBERS (R_BPF_max)

View File

@ -0,0 +1,662 @@
diff -rup binutils.orig/bfd/bfd-in2.h binutils-2.41/bfd/bfd-in2.h
--- binutils.orig/bfd/bfd-in2.h 2024-04-05 10:34:23.956241281 +0100
+++ binutils-2.41/bfd/bfd-in2.h 2024-04-05 10:59:44.555106927 +0100
@@ -3840,6 +3840,12 @@ instruction. */
BFD_RELOC_X86_64_CODE_4_GOTPCRELX,
BFD_RELOC_X86_64_CODE_4_GOTTPOFF,
BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC,
+ BFD_RELOC_X86_64_CODE_5_GOTPCRELX,
+ BFD_RELOC_X86_64_CODE_5_GOTTPOFF,
+ BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC,
+ BFD_RELOC_X86_64_CODE_6_GOTPCRELX,
+ BFD_RELOC_X86_64_CODE_6_GOTTPOFF,
+ BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC,
/* ns32k relocations */
BFD_RELOC_NS32K_IMM_8,
diff -rup binutils.orig/bfd/elf64-x86-64.c binutils-2.41/bfd/elf64-x86-64.c
--- binutils.orig/bfd/elf64-x86-64.c 2024-04-05 10:34:23.956241281 +0100
+++ binutils-2.41/bfd/elf64-x86-64.c 2024-04-05 10:59:44.557106930 +0100
@@ -179,12 +179,30 @@ static reloc_howto_type x86_64_elf_howto
HOWTO(R_X86_64_CODE_4_GOTPC32_TLSDESC, 0, 4, 32, true, 0,
complain_overflow_bitfield, bfd_elf_generic_reloc,
"R_X86_64_CODE_4_GOTPC32_TLSDESC", false, 0, 0xffffffff, true),
+ HOWTO(R_X86_64_CODE_5_GOTPCRELX, 0, 4, 32, true, 0,
+ complain_overflow_signed, bfd_elf_generic_reloc,
+ "R_X86_64_CODE_5_GOTPCRELX", false, 0, 0xffffffff, true),
+ HOWTO(R_X86_64_CODE_5_GOTTPOFF, 0, 4, 32, true, 0,
+ complain_overflow_signed, bfd_elf_generic_reloc,
+ "R_X86_64_CODE_5_GOTTPOFF", false, 0, 0xffffffff, true),
+ HOWTO(R_X86_64_CODE_5_GOTPC32_TLSDESC, 0, 4, 32, true, 0,
+ complain_overflow_bitfield, bfd_elf_generic_reloc,
+ "R_X86_64_CODE_5_GOTPC32_TLSDESC", false, 0, 0xffffffff, true),
+ HOWTO(R_X86_64_CODE_6_GOTPCRELX, 0, 4, 32, true, 0,
+ complain_overflow_signed, bfd_elf_generic_reloc,
+ "R_X86_64_CODE_6_GOTPCRELX", false, 0, 0xffffffff, true),
+ HOWTO(R_X86_64_CODE_6_GOTTPOFF, 0, 4, 32, true, 0,
+ complain_overflow_signed, bfd_elf_generic_reloc,
+ "R_X86_64_CODE_6_GOTTPOFF", false, 0, 0xffffffff, true),
+ HOWTO(R_X86_64_CODE_6_GOTPC32_TLSDESC, 0, 4, 32, true, 0,
+ complain_overflow_bitfield, bfd_elf_generic_reloc,
+ "R_X86_64_CODE_6_GOTPC32_TLSDESC", false, 0, 0xffffffff, true),
/* We have a gap in the reloc numbers here.
R_X86_64_standard counts the number up to this point, and
R_X86_64_vt_offset is the value to subtract from a reloc type of
R_X86_64_GNU_VT* to form an index into this table. */
-#define R_X86_64_standard (R_X86_64_CODE_4_GOTPC32_TLSDESC + 1)
+#define R_X86_64_standard (R_X86_64_CODE_6_GOTPC32_TLSDESC + 1)
#define R_X86_64_vt_offset (R_X86_64_GNU_VTINHERIT - R_X86_64_standard)
/* GNU extension to record C++ vtable hierarchy. */
@@ -256,6 +274,12 @@ static const struct elf_reloc_map x86_64
{ BFD_RELOC_X86_64_CODE_4_GOTPCRELX, R_X86_64_CODE_4_GOTPCRELX, },
{ BFD_RELOC_X86_64_CODE_4_GOTTPOFF, R_X86_64_CODE_4_GOTTPOFF, },
{ BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC, R_X86_64_CODE_4_GOTPC32_TLSDESC, },
+ { BFD_RELOC_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTPCRELX, },
+ { BFD_RELOC_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTTPOFF, },
+ { BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_5_GOTPC32_TLSDESC, },
+ { BFD_RELOC_X86_64_CODE_6_GOTPCRELX, R_X86_64_CODE_6_GOTPCRELX, },
+ { BFD_RELOC_X86_64_CODE_6_GOTTPOFF, R_X86_64_CODE_6_GOTTPOFF, },
+ { BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPC32_TLSDESC, },
{ BFD_RELOC_VTABLE_INHERIT, R_X86_64_GNU_VTINHERIT, },
{ BFD_RELOC_VTABLE_ENTRY, R_X86_64_GNU_VTENTRY, },
};
@@ -1283,6 +1307,23 @@ elf_x86_64_check_tls_transition (bfd *ab
goto check_gottpoff;
+ case R_X86_64_CODE_6_GOTTPOFF:
+ /* Check transition from IE access model:
+ add %reg1, foo@gottpoff(%rip), %reg2
+ where reg1/reg2 are one of r16 to r31. */
+
+ if (offset < 6
+ || (offset + 4) > sec->size
+ || contents[offset - 6] != 0x62)
+ return false;
+
+ val = bfd_get_8 (abfd, contents + offset - 2);
+ if (val != 0x01 && val != 0x03)
+ return false;
+
+ val = bfd_get_8 (abfd, contents + offset - 1);
+ return (val & 0xc7) == 5;
+
case R_X86_64_GOTTPOFF:
/* Check transition from IE access model:
mov foo@gottpoff(%rip), %reg
@@ -1417,6 +1458,7 @@ elf_x86_64_tls_transition (struct bfd_li
case R_X86_64_GOTTPOFF:
case R_X86_64_CODE_4_GOTPC32_TLSDESC:
case R_X86_64_CODE_4_GOTTPOFF:
+ case R_X86_64_CODE_6_GOTTPOFF:
if (bfd_link_executable (info))
{
if (h == NULL)
@@ -1464,6 +1506,8 @@ elf_x86_64_tls_transition (struct bfd_li
/* Return TRUE if there is no transition. */
if (from_type == to_type
|| (from_type == R_X86_64_CODE_4_GOTTPOFF
+ && to_type == R_X86_64_GOTTPOFF)
+ || (from_type == R_X86_64_CODE_6_GOTTPOFF
&& to_type == R_X86_64_GOTTPOFF))
return true;
@@ -2177,6 +2221,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
case R_X86_64_GOTTPOFF:
case R_X86_64_CODE_4_GOTTPOFF:
+ case R_X86_64_CODE_6_GOTTPOFF:
if (!bfd_link_executable (info))
info->flags |= DF_STATIC_TLS;
/* Fall through */
@@ -2214,6 +2259,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
break;
case R_X86_64_GOTTPOFF:
case R_X86_64_CODE_4_GOTTPOFF:
+ case R_X86_64_CODE_6_GOTTPOFF:
tls_type = GOT_TLS_IE;
break;
case R_X86_64_GOTPC32_TLSDESC:
@@ -2503,6 +2549,26 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
}
break;
+ case R_X86_64_CODE_5_GOTPCRELX:
+ case R_X86_64_CODE_5_GOTTPOFF:
+ case R_X86_64_CODE_5_GOTPC32_TLSDESC:
+ case R_X86_64_CODE_6_GOTPCRELX:
+ case R_X86_64_CODE_6_GOTPC32_TLSDESC:
+ {
+ /* These relocations are added only for completeness and
+ aren't be used. */
+ if (h)
+ name = h->root.root.string;
+ else
+ name = bfd_elf_sym_name (abfd, symtab_hdr, isym,
+ NULL);
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%pB: unsupported relocation %s against symbol `%s'"),
+ abfd, x86_64_elf_howto_table[r_type].name, name);
+ }
+ break;
+
/* This relocation describes the C++ object vtable hierarchy.
Reconstruct it for later use during GC. */
case R_X86_64_GNU_VTINHERIT:
@@ -3570,6 +3636,7 @@ elf_x86_64_relocate_section (bfd *output
case R_X86_64_TLSDESC_CALL:
case R_X86_64_GOTTPOFF:
case R_X86_64_CODE_4_GOTTPOFF:
+ case R_X86_64_CODE_6_GOTTPOFF:
tls_type = GOT_UNKNOWN;
if (h == NULL && local_got_offsets)
tls_type = elf_x86_local_got_tls_type (input_bfd) [r_symndx];
@@ -3915,6 +3982,50 @@ elf_x86_64_relocate_section (bfd *output
contents + roff - 2);
bfd_put_8 (output_bfd, 0xc0 | reg,
contents + roff - 1);
+ bfd_put_32 (output_bfd,
+ elf_x86_64_tpoff (info, relocation),
+ contents + roff);
+ continue;
+ }
+ else if (r_type == R_X86_64_CODE_6_GOTTPOFF)
+ {
+ /* IE->LE transition:
+ Originally it is
+ add %reg1, foo@gottpoff(%rip), %reg2
+ or
+ add foo@gottpoff(%rip), %reg1, %reg2
+ We change it into:
+ add $foo@tpoff, %reg1, %reg2
+ */
+ unsigned int reg, byte1;
+ unsigned int updated_byte1;
+
+ if (roff < 6)
+ goto corrupt_input;
+
+ /* Move the R bits to the B bits in EVEX payload
+ byte 1. */
+ byte1 = bfd_get_8 (input_bfd, contents + roff - 5);
+ updated_byte1 = byte1;
+
+ /* Set the R bits since they is inverted. */
+ updated_byte1 |= 1 << 7 | 1 << 4;
+
+ /* Update the B bits from the R bits. */
+ if ((byte1 & (1 << 7)) == 0)
+ updated_byte1 &= ~(1 << 5);
+ if ((byte1 & (1 << 4)) == 0)
+ updated_byte1 |= 1 << 3;
+
+ reg = bfd_get_8 (input_bfd, contents + roff - 1);
+ reg >>= 3;
+
+ bfd_put_8 (output_bfd, updated_byte1,
+ contents + roff - 5);
+ bfd_put_8 (output_bfd, 0x81,
+ contents + roff - 2);
+ bfd_put_8 (output_bfd, 0xc0 | reg,
+ contents + roff - 1);
bfd_put_32 (output_bfd,
elf_x86_64_tpoff (info, relocation),
contents + roff);
diff -rup binutils.orig/bfd/libbfd.h binutils-2.41/bfd/libbfd.h
--- binutils.orig/bfd/libbfd.h 2024-04-05 10:34:23.956241281 +0100
+++ binutils-2.41/bfd/libbfd.h 2024-04-05 10:59:44.559106933 +0100
@@ -1470,6 +1470,12 @@ static const char *const bfd_reloc_code_
"BFD_RELOC_X86_64_CODE_4_GOTPCRELX",
"BFD_RELOC_X86_64_CODE_4_GOTTPOFF",
"BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC",
+ "BFD_RELOC_X86_64_CODE_5_GOTPCRELX",
+ "BFD_RELOC_X86_64_CODE_5_GOTTPOFF",
+ "BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC",
+ "BFD_RELOC_X86_64_CODE_6_GOTPCRELX",
+ "BFD_RELOC_X86_64_CODE_6_GOTTPOFF",
+ "BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC",
"BFD_RELOC_NS32K_IMM_8",
"BFD_RELOC_NS32K_IMM_16",
"BFD_RELOC_NS32K_IMM_32",
diff -rup binutils.orig/bfd/reloc.c binutils-2.41/bfd/reloc.c
--- binutils.orig/bfd/reloc.c 2024-04-05 10:34:23.956241281 +0100
+++ binutils-2.41/bfd/reloc.c 2024-04-05 10:59:44.561106936 +0100
@@ -2487,6 +2487,18 @@ ENUMX
BFD_RELOC_X86_64_CODE_4_GOTTPOFF
ENUMX
BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC
+ENUMX
+ BFD_RELOC_X86_64_CODE_5_GOTPCRELX
+ENUMX
+ BFD_RELOC_X86_64_CODE_5_GOTTPOFF
+ENUMX
+ BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC
+ENUMX
+ BFD_RELOC_X86_64_CODE_6_GOTPCRELX
+ENUMX
+ BFD_RELOC_X86_64_CODE_6_GOTTPOFF
+ENUMX
+ BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC
ENUMDOC
x86-64/elf relocations
diff -rup binutils.orig/elfcpp/x86_64.h binutils-2.41/elfcpp/x86_64.h
--- binutils.orig/elfcpp/x86_64.h 2024-04-05 10:34:23.969241295 +0100
+++ binutils-2.41/elfcpp/x86_64.h 2024-04-05 10:59:44.561106936 +0100
@@ -110,6 +110,30 @@ enum
// descriptor in GOT if the
// instruction starts at 4 bytes
// before the relocation offset.
+ R_X86_64_CODE_5_GOTPCRELX = 46, // 32 bit signed PC relative offset to
+ // GOT if the instruction starts at 5
+ // bytes before the relocation offset,
+ // relaxable.
+ R_X86_64_CODE_5_GOTTPOFF = 47, // 32 bit signed PC relative offset to
+ // GOT entry for IE symbol if the
+ // instruction starts at 5 bytes before
+ // the relocation offset.
+ R_X86_64_CODE_5_GOTPC32_TLSDESC = 48, // 32-bit PC relative to TLS
+ // descriptor in GOT if the
+ // instruction starts at 5 bytes
+ // before the relocation offset.
+ R_X86_64_CODE_6_GOTPCRELX = 49, // 32 bit signed PC relative offset to
+ // GOT if the instruction starts at 6
+ // bytes before the relocation offset,
+ // relaxable.
+ R_X86_64_CODE_6_GOTTPOFF = 50, // 32 bit signed PC relative offset to
+ // GOT entry for IE symbol if the
+ // instruction starts at 6 bytes before
+ // the relocation offset.
+ R_X86_64_CODE_6_GOTPC32_TLSDESC = 51, // 32-bit PC relative to TLS
+ // descriptor in GOT if the
+ // instruction starts at 6 bytes
+ // before the relocation offset.
// GNU vtable garbage collection extensions.
R_X86_64_GNU_VTINHERIT = 250,
R_X86_64_GNU_VTENTRY = 251
diff -rup binutils.orig/gas/config/tc-i386.c binutils-2.41/gas/config/tc-i386.c
--- binutils.orig/gas/config/tc-i386.c 2024-04-05 10:34:23.973241300 +0100
+++ binutils-2.41/gas/config/tc-i386.c 2024-04-05 10:59:44.561106936 +0100
@@ -3640,6 +3640,7 @@ tc_i386_fix_adjustable (fixS *fixP)
|| fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF64
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF
|| fixP->fx_r_type == BFD_RELOC_X86_64_CODE_4_GOTTPOFF
+ || fixP->fx_r_type == BFD_RELOC_X86_64_CODE_6_GOTTPOFF
|| fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32
|| fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64
@@ -5671,10 +5672,19 @@ md_assemble (char *line)
for (j = i.imm_operands; j < i.operands; ++j)
switch (i.reloc[j])
{
+ case BFD_RELOC_X86_64_GOTTPOFF:
+ if (i.tm.mnem_off == MN_add
+ && i.tm.opcode_space == SPACE_EVEXMAP4
+ && i.mem_operands == 1
+ && i.base_reg
+ && i.base_reg->reg_num == RegIP
+ && i.tm.operand_types[0].bitfield.class == Reg
+ && i.tm.operand_types[2].bitfield.class == Reg)
+ /* Allow APX: add %reg1, foo@gottpoff(%rip), %reg2. */
+ break;
+ /* Fall through. */
case BFD_RELOC_386_TLS_GOTIE:
case BFD_RELOC_386_TLS_LE_32:
- case BFD_RELOC_X86_64_GOTTPOFF:
- case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
case BFD_RELOC_X86_64_TLSLD:
as_bad (_("TLS relocation cannot be used with `%s'"), insn_name (&i.tm));
return;
@@ -10889,6 +10899,7 @@ output_disp (fragS *insn_start_frag, off
case BFD_RELOC_X86_64_TLSLD:
case BFD_RELOC_X86_64_GOTTPOFF:
case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+ case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
case BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC:
case BFD_RELOC_X86_64_TLSDESC_CALL:
@@ -10905,9 +10916,30 @@ output_disp (fragS *insn_start_frag, off
&& !i.prefix[ADDR_PREFIX])
fixP->fx_signed = 1;
- /* Set fx_tcbit3 for REX2 prefix. */
- if (is_apx_rex2_encoding ())
- fixP->fx_tcbit3 = 1;
+ if (reloc_type == BFD_RELOC_X86_64_GOTTPOFF
+ && i.tm.opcode_space == SPACE_EVEXMAP4)
+ {
+ /* Only "add %reg1, foo@gottpoff(%rip), %reg2" is
+ allowed in md_assemble. Set fx_tcbit2 for EVEX
+ prefix. */
+ fixP->fx_tcbit2 = 1;
+ continue;
+ }
+
+ if (i.base_reg && i.base_reg->reg_num == RegIP)
+ {
+ if (reloc_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC)
+ {
+ /* Set fx_tcbit for REX2 prefix. */
+ if (is_apx_rex2_encoding ())
+ fixP->fx_tcbit = 1;
+ continue;
+ }
+ }
+ /* In 64-bit, i386_validate_fix updates only (%rip)
+ relocations. */
+ else if (object_64bit)
+ continue;
/* Check for "call/jmp *mem", "mov mem, %reg",
"test %reg, mem" and "binop mem, %reg" where binop
@@ -10932,10 +10964,22 @@ output_disp (fragS *insn_start_frag, off
{
if (object_64bit)
{
- fixP->fx_tcbit = i.rex != 0;
- if (i.base_reg
- && (i.base_reg->reg_num == RegIP))
- fixP->fx_tcbit2 = 1;
+ if (reloc_type == BFD_RELOC_X86_64_GOTTPOFF)
+ {
+ /* Set fx_tcbit for REX2 prefix. */
+ if (is_apx_rex2_encoding ())
+ fixP->fx_tcbit = 1;
+ }
+ else
+ {
+ /* Set fx_tcbit3 for REX2 prefix. */
+ if (is_apx_rex2_encoding ())
+ fixP->fx_tcbit3 = 1;
+ else if (i.rex)
+ fixP->fx_tcbit2 = 1;
+ else
+ fixP->fx_tcbit = 1;
+ }
}
else
fixP->fx_tcbit2 = 1;
@@ -14405,6 +14449,7 @@ md_apply_fix (fixS *fixP, valueT *valP,
case BFD_RELOC_X86_64_TLSLD:
case BFD_RELOC_X86_64_GOTTPOFF:
case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+ case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
case BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC:
value = 0; /* Fully resolved at runtime. No addend. */
@@ -15980,13 +16025,27 @@ i386_validate_fix (fixS *fixp)
&& (!S_IS_DEFINED (fixp->fx_addsy)
|| S_IS_EXTERNAL (fixp->fx_addsy));
- if (fixp->fx_tcbit3)
+ /* BFD_RELOC_X86_64_GOTTPOFF:
+ 1. fx_tcbit -> BFD_RELOC_X86_64_CODE_4_GOTTPOFF
+ 2. fx_tcbit2 -> BFD_RELOC_X86_64_CODE_6_GOTTPOFF
+ BFD_RELOC_X86_64_GOTPC32_TLSDESC:
+ 1. fx_tcbit -> BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC
+ BFD_RELOC_32_PCREL:
+ 1. fx_tcbit -> BFD_RELOC_X86_64_GOTPCRELX
+ 2. fx_tcbit2 -> BFD_RELOC_X86_64_REX_GOTPCRELX
+ 3. fx_tcbit3 -> BFD_RELOC_X86_64_CODE_4_GOTPCRELX
+ 4. else -> BFD_RELOC_X86_64_GOTPCREL
+ */
+ if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF)
{
- if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF)
+ if (fixp->fx_tcbit)
fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTTPOFF;
- else if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC)
- fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC;
+ else if (fixp->fx_tcbit2)
+ fixp->fx_r_type = BFD_RELOC_X86_64_CODE_6_GOTTPOFF;
}
+ else if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC
+ && fixp->fx_tcbit)
+ fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC;
#endif
if (fixp->fx_subsy)
@@ -15998,15 +16057,12 @@ i386_validate_fix (fixS *fixp)
if (!object_64bit)
abort ();
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (fixp->fx_tcbit2)
- {
- if (fixp->fx_tcbit3)
- fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPCRELX;
- else
- fixp->fx_r_type = (fixp->fx_tcbit
- ? BFD_RELOC_X86_64_REX_GOTPCRELX
- : BFD_RELOC_X86_64_GOTPCRELX);
- }
+ if (fixp->fx_tcbit)
+ fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCRELX;
+ else if (fixp->fx_tcbit2)
+ fixp->fx_r_type = BFD_RELOC_X86_64_REX_GOTPCRELX;
+ else if (fixp->fx_tcbit3)
+ fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPCRELX;
else
#endif
fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL;
@@ -16132,6 +16188,7 @@ tc_gen_reloc (asection *section ATTRIBUT
case BFD_RELOC_X86_64_DTPOFF64:
case BFD_RELOC_X86_64_GOTTPOFF:
case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+ case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
case BFD_RELOC_X86_64_TPOFF32:
case BFD_RELOC_X86_64_TPOFF64:
case BFD_RELOC_X86_64_GOTOFF64:
@@ -16276,6 +16333,7 @@ tc_gen_reloc (asection *section ATTRIBUT
case BFD_RELOC_X86_64_TLSLD:
case BFD_RELOC_X86_64_GOTTPOFF:
case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+ case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
case BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC:
case BFD_RELOC_X86_64_TLSDESC_CALL:
diff -rup binutils.orig/gas/testsuite/gas/i386/x86-64-gottpoff.d binutils-2.41/gas/testsuite/gas/i386/x86-64-gottpoff.d
--- binutils.orig/gas/testsuite/gas/i386/x86-64-gottpoff.d 2024-04-05 10:34:24.078241418 +0100
+++ binutils-2.41/gas/testsuite/gas/i386/x86-64-gottpoff.d 2024-04-05 10:59:44.561106936 +0100
@@ -16,4 +16,8 @@ Disassembly of section .text:
+[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax # 2c <_start\+0x2c> 28: R_X86_64_GOTTPOFF foo-0x4
+[a-f0-9]+: d5 48 03 05 00 00 00 00 add 0x0\(%rip\),%r16 # 34 <_start\+0x34> 30: R_X86_64_CODE_4_GOTTPOFF foo-0x4
+[a-f0-9]+: d5 48 8b 25 00 00 00 00 mov 0x0\(%rip\),%r20 # 3c <_start\+0x3c> 38: R_X86_64_CODE_4_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\),%r16 # 46 <_start\+0x46> 42: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%rax,%r12 # 50 <_start\+0x50> 4c: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\),%r16 # 5a <_start\+0x5a> 56: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%rax,%r12 # 64 <_start\+0x64> 60: R_X86_64_CODE_6_GOTTPOFF foo-0x4
#pass
diff -rup binutils.orig/gas/testsuite/gas/i386/x86-64-gottpoff.s binutils-2.41/gas/testsuite/gas/i386/x86-64-gottpoff.s
--- binutils.orig/gas/testsuite/gas/i386/x86-64-gottpoff.s 2024-04-05 10:34:24.078241418 +0100
+++ binutils-2.41/gas/testsuite/gas/i386/x86-64-gottpoff.s 2024-04-05 10:59:44.561106936 +0100
@@ -13,3 +13,13 @@ _start:
addq r16, QWORD PTR [rip + foo@GOTTPOFF]
movq r20, QWORD PTR [rip + foo@GOTTPOFF]
+
+ .att_syntax prefix
+
+ addq %r8, foo@GOTTPOFF(%rip), %r16
+ addq foo@GOTTPOFF(%rip), %rax, %r12
+
+ .intel_syntax noprefix
+
+ addq r16, QWORD PTR [rip + foo@GOTTPOFF], r8
+ addq r12, rax, QWORD PTR [rip + foo@GOTTPOFF]
diff -rup binutils.orig/gold/x86_64.cc binutils-2.41/gold/x86_64.cc
--- binutils.orig/gold/x86_64.cc 2024-04-05 10:34:24.166241517 +0100
+++ binutils-2.41/gold/x86_64.cc 2024-04-05 10:59:44.563106939 +0100
@@ -2920,6 +2920,11 @@ Target_x86_64<size>::optimize_tls_reloc(
// Another Local-Dynamic reloc.
return tls::TLSOPT_TO_LE;
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
+ if (r_offset <= 6 || *(reloc_view - 6) != 0x62)
+ return tls::TLSOPT_NONE;
+ goto handle_gottpoff;
+
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
if (r_offset <= 4 || *(reloc_view - 4) != 0xd5)
return tls::TLSOPT_NONE;
@@ -2929,6 +2934,7 @@ Target_x86_64<size>::optimize_tls_reloc(
// from the GOT. If we know that we are linking against the
// local symbol, we can switch to Local-Exec, which links the
// thread offset into the instruction.
+handle_gottpoff:
if (is_final)
return tls::TLSOPT_TO_LE;
return tls::TLSOPT_NONE;
@@ -2997,6 +3003,7 @@ Target_x86_64<size>::Scan::get_reference
case elfcpp::R_X86_64_DTPOFF64:
case elfcpp::R_X86_64_GOTTPOFF: // Initial-exec
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
case elfcpp::R_X86_64_TPOFF32: // Local-exec
return Symbol::TLS_REF;
@@ -3362,6 +3369,7 @@ need_got:
// These are initial tls relocs, which are expected when linking
case elfcpp::R_X86_64_CODE_4_GOTPC32_TLSDESC:
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
{
section_size_type stype;
reloc_view = object->section_contents(data_shndx, &stype, true);
@@ -3464,6 +3472,7 @@ need_got:
case elfcpp::R_X86_64_GOTTPOFF: // Initial-exec
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
layout->set_has_static_tls();
if (optimized_type == tls::TLSOPT_NONE)
{
@@ -3902,6 +3911,7 @@ Target_x86_64<size>::Scan::global(Symbol
// These are initial tls relocs, which are expected for global()
case elfcpp::R_X86_64_CODE_4_GOTPC32_TLSDESC:
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
{
section_size_type stype;
reloc_view = object->section_contents(data_shndx, &stype, true);
@@ -3920,7 +3930,8 @@ Target_x86_64<size>::Scan::global(Symbol
// when building an executable.
const bool is_final = (gsym->final_value_is_known() ||
((r_type == elfcpp::R_X86_64_GOTTPOFF ||
- r_type == elfcpp::R_X86_64_CODE_4_GOTTPOFF) &&
+ r_type == elfcpp::R_X86_64_CODE_4_GOTTPOFF||
+ r_type == elfcpp::R_X86_64_CODE_6_GOTTPOFF) &&
gsym->is_undefined() &&
parameters->options().output_is_executable()));
size_t r_offset = reloc.get_r_offset();
@@ -4006,6 +4017,7 @@ Target_x86_64<size>::Scan::global(Symbol
case elfcpp::R_X86_64_GOTTPOFF: // Initial-exec
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
layout->set_has_static_tls();
if (optimized_type == tls::TLSOPT_NONE)
{
@@ -4608,6 +4620,7 @@ Target_x86_64<size>::Relocate::relocate(
case elfcpp::R_X86_64_DTPOFF64:
case elfcpp::R_X86_64_GOTTPOFF: // Initial-exec
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
case elfcpp::R_X86_64_TPOFF32: // Local-exec
this->relocate_tls(relinfo, target, relnum, rela, r_type, gsym, psymval,
view, address, view_size);
@@ -4894,6 +4907,7 @@ Target_x86_64<size>::Relocate::relocate_
case elfcpp::R_X86_64_GOTTPOFF: // Initial-exec
case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+ case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
if (gsym != NULL
&& gsym->is_undefined()
&& parameters->options().output_is_executable())
@@ -5308,11 +5322,19 @@ Target_x86_64<size>::Relocate::tls_ie_to
// movq foo@gottpoff(%rip),%reg ==> movq $YY,%reg
// addq foo@gottpoff(%rip),%reg ==> addq $YY,%reg
+ // addq %reg1,foo@gottpoff(%rip),%reg2 ==> addq $YY,%reg1,%reg2
+ // addq foo@gottpoff(%rip),%reg1,%reg2 ==> addq $YY,%reg1,%reg2
- tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, -3);
+ int off1;
+ if (r_type == elfcpp::R_X86_64_CODE_6_GOTTPOFF)
+ off1 = -5;
+ else
+ off1 = -3;
+
+ tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, off1);
tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, 4);
- unsigned char op1 = view[-3];
+ unsigned char op1 = view[off1];
unsigned char op2 = view[-2];
unsigned char op3 = view[-1];
unsigned char reg = op3 >> 3;
@@ -5350,7 +5372,7 @@ Target_x86_64<size>::Relocate::tls_ie_to
view[-1] = 0x80 | reg | (reg << 3);
}
}
- else
+ else if (r_type == elfcpp::R_X86_64_CODE_4_GOTTPOFF)
{
if (op2 == 0x8b)
op2 = 0xc7;
@@ -5362,6 +5384,23 @@ Target_x86_64<size>::Relocate::tls_ie_to
view[-2] = op2;
view[-1] = 0xc0 | reg;
}
+ else
+ {
+ unsigned char updated_op1 = op1;
+
+ // Set the R bits since they is inverted.
+ updated_op1 |= 1 << 7 | 1 << 4;
+
+ // Update the B bits from the R bits.
+ if ((op1 & (1 << 7)) == 0)
+ updated_op1 &= ~(1 << 5);
+ if ((op1 & (1 << 4)) == 0)
+ updated_op1 |= 1 << 3;
+
+ view[-5] = updated_op1;
+ view[-2] = 0x81;
+ view[-1] = 0xc0 | reg;
+ }
if (tls_segment != NULL)
value -= tls_segment->memsz();
diff -rup binutils.orig/include/elf/x86-64.h binutils-2.41/include/elf/x86-64.h
--- binutils.orig/include/elf/x86-64.h 2024-04-05 10:34:24.174241526 +0100
+++ binutils-2.41/include/elf/x86-64.h 2024-04-05 10:59:44.563106939 +0100
@@ -92,6 +92,26 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_ty
/* 32 bit signed pc relative offset to TLS descriptor in the GOT if
instruction starts at 4 bytes before the relocation offset. */
RELOC_NUMBER (R_X86_64_CODE_4_GOTPC32_TLSDESC, 45)
+ /* Load from 32 bit signed pc relative offset to GOT entry if the
+ instruction starts at 5 bytes before the relocation offset,
+ relaxable. */
+ RELOC_NUMBER (R_X86_64_CODE_5_GOTPCRELX, 46)
+ /* 32 bit signed pc relative offset to TLS descriptor in the GOT if
+ instruction starts at 5 bytes before the relocation offset. */
+ RELOC_NUMBER (R_X86_64_CODE_5_GOTPC32_TLSDESC, 47)
+ /* PC relative offset to IE GOT entry if the instruction starts at
+ 5 bytes before the relocation offset. */
+ RELOC_NUMBER (R_X86_64_CODE_5_GOTTPOFF, 48)
+ /* Load from 32 bit signed pc relative offset to GOT entry if the
+ instruction starts at 6 bytes before the relocation offset,
+ relaxable. */
+ RELOC_NUMBER (R_X86_64_CODE_6_GOTPCRELX, 49)
+ /* PC relative offset to IE GOT entry if the instruction starts at
+ 6 bytes before the relocation offset. */
+ RELOC_NUMBER (R_X86_64_CODE_6_GOTTPOFF, 50)
+ /* 32 bit signed pc relative offset to TLS descriptor in the GOT if
+ instruction starts at 6 bytes before the relocation offset. */
+ RELOC_NUMBER (R_X86_64_CODE_6_GOTPC32_TLSDESC, 51)
RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */
RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */
END_RELOC_NUMBERS (R_X86_64_max)

View File

@ -0,0 +1,871 @@
diff -rupN binutils.orig/opcodes/i386-dis.c binutils-2.41/opcodes/i386-dis.c
--- binutils.orig/opcodes/i386-dis.c 2024-02-12 15:55:21.578572835 +0000
+++ binutils-2.41/opcodes/i386-dis.c 2024-02-12 15:56:38.828623964 +0000
@@ -8824,6 +8824,8 @@ get_valid_dis386 (const struct dis386 *d
break;
case USE_3BYTE_TABLE:
+ if (ins->last_rex2_prefix >= 0)
+ return &err_opcode;
if (!fetch_code (ins->info, ins->codep + 2))
return &err_opcode;
vindex = *ins->codep++;
@@ -9540,8 +9542,6 @@ print_insn (bfd_vma pc, disassemble_info
/* REX2.M in rex2 prefix represents map0 or map1. */
if (ins.last_rex2_prefix < 0 ? *ins.codep == 0x0f : (ins.rex2 & REX2_M))
{
- unsigned char threebyte;
-
if (!ins.rex2)
{
ins.codep++;
@@ -9549,17 +9549,15 @@ print_insn (bfd_vma pc, disassemble_info
goto fetch_error_out;
}
- threebyte = *ins.codep;
- dp = &dis386_twobyte[threebyte];
- ins.need_modrm = twobyte_has_modrm[threebyte];
- ins.codep++;
+ dp = &dis386_twobyte[*ins.codep];
+ ins.need_modrm = twobyte_has_modrm[*ins.codep];
}
else
{
dp = &dis386[*ins.codep];
ins.need_modrm = onebyte_has_modrm[*ins.codep];
- ins.codep++;
}
+ ins.codep++;
/* Save sizeflag for printing the extra ins.prefixes later before updating
it for mnemonic and operand processing. The prefix names depend
diff -rupN binutils.orig/opcodes/i386-opc.tbl binutils-2.41/opcodes/i386-opc.tbl
--- binutils.orig/opcodes/i386-opc.tbl 2024-02-12 15:55:21.578572835 +0000
+++ binutils-2.41/opcodes/i386-opc.tbl 2024-02-12 15:56:28.955616704 +0000
@@ -1586,7 +1586,9 @@ vandnp<sd>, 0x<sd:ppfx>55, AVX, Modrm|Ve
vandp<sd>, 0x<sd:ppfx>54, AVX, Modrm|C|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vblendp<sd>, 0x660c | <sd:opc>, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vblendvp<sd>, 0x664a | <sd:opc>, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vbroadcastf128, 0x661a, AVX, Modrm|Vex=2|Space0F38|VexW=1|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM }
+vbroadcastf128, 0x661a, AVX, Modrm|Vex256|Space0F38|VexW0|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM }
+// vbroadcastf32x4 in disguise (see vround{p,s}{s,d} comment)
+vbroadcastf128, 0x661a, APX_F&AVX512VL, Modrm|EVex256|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM }
vbroadcastsd, 0x6619, AVX, Modrm|Vex256|Space0F38|VexW0|NoSuf, { Qword|Unspecified|BaseIndex, RegYMM }
vbroadcastss, 0x6618, AVX, Modrm|Vex128|Space0F38|VexW0|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM|RegYMM }
vcmp<frel>p<sd>, 0x<sd:ppfx>c2/0x<frel:imm>, AVX, Modrm|<frel:comm>|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1614,7 +1616,9 @@ vdivp<sd>, 0x<sd:ppfx>5e, AVX, Modrm|Vex
vdivs<sd>, 0x<sd:spfx>5e, AVX, Modrm|VexLIG|Space0F|VexVVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vdppd, 0x6641, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vdpps, 0x6640, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vextractf128, 0x6619, AVX, Modrm|Vex=2|Space0F3A|VexW=1|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM }
+vextractf128, 0x6619, AVX, Modrm|Vex256|Space0F3A|VexW0|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM }
+// vextractf32x4 in disguise (see vround{p,s}{s,d} comment)
+vextractf128, 0x6619, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexW0|Disp8MemShift=4|NoSuf, { Imm8, RegYMM, Xmmword|Unspecified|BaseIndex }
vextractps, 0x6617, AVX|AVX512F, Modrm|Vex128|EVex128|Space0F3A|VexWIG|Disp8MemShift=2|NoSuf, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex }
vextractps, 0x6617, x64&(AVX|AVX512F), RegMem|Vex128|EVex128|Space0F3A|VexWIG|NoSuf, { Imm8, RegXMM, Reg64 }
vhaddpd, 0x667c, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1622,6 +1626,8 @@ vhaddps, 0xf27c, AVX, Modrm|Vex|Space0F|
vhsubpd, 0x667d, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vhsubps, 0xf27d, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vinsertf128, 0x6618, AVX, Modrm|Vex256|Space0F3A|VexVVVV|VexW0|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegYMM, RegYMM }
+// vinsertf32x4 in disguise (see vround{p,s}{s,d} comment)
+vinsertf128, 0x6618, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|NoSuf, { Imm8, Xmmword|Unspecified|BaseIndex, RegYMM, RegYMM }
vinsertps, 0x6621, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vlddqu, 0xf2f0, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM }
vldmxcsr, 0xae/2, AVX, Modrm|Vex128|Space0F|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex }
@@ -1792,8 +1798,8 @@ vroundp<sd>, 0x6608 | <sd:opc>, AVX, Mod
vrounds<sd>, 0x660a | <sd:opc>, AVX, Modrm|VexLIG|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8, <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
// These are really clones of VRNDSCALE{P,S}{S,D}, with broadcast, masking, SAE,
// 512-bit operand size, and register sources dropped.
-vroundp<sd>, 0x6608 | <sd:opc>, APX_F, Modrm|Space0F3A|<sd:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM }
-vrounds<sd>, 0x660a | <sd:opc>, APX_F, Modrm|EVexLIG|Space0F3A|VexVVVV|<sd:vexw>|Disp8MemShift|NoSuf, { Imm8, <sd:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
+vroundp<sd>, 0x6608 | <sd:opc>, APX_F&AVX512VL, Modrm|Space0F3A|<sd:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM }
+vrounds<sd>, 0x660a | <sd:opc>, APX_F&AVX512F, Modrm|EVexLIG|Space0F3A|VexVVVV|<sd:vexw>|Disp8MemShift|NoSuf, { Imm8, <sd:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
vrsqrtps, 0x52, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vrsqrtss, 0xf352, AVX, Modrm|Vex=3|Space0F|VexVVVV|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vshufp<sd>, 0x<sd:ppfx>c6, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1828,7 +1834,9 @@ vpmovzxwq, 0x6634, AVX2|AVX512VL, Modrm|
// New AVX2 instructions.
-vbroadcasti128, 0x665A, AVX2, Modrm|Vex=2|Space0F38|VexW=1|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM }
+vbroadcasti128, 0x665A, AVX2, Modrm|Vex256|Space0F38|VexW0|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM }
+// vbroadcasti32x4 in disguise (see vround{p,s}{s,d} comment)
+vbroadcasti128, 0x665a, APX_F&AVX512VL, Modrm|EVex256|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM }
vbroadcastsd, 0x6619, AVX2, Modrm|Vex=2|Space0F38|VexW=1|NoSuf, { RegXMM, RegYMM }
vbroadcastss, 0x6618, AVX2|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
vpblendd, 0x6602, AVX2, Modrm|Vex|Space0F3A|VexVVVV|VexW0|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1840,8 +1848,12 @@ vpermd, 0x6636, AVX2|AVX512F, Modrm|Vex2
vpermpd, 0x6601, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F3A|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegYMM|RegZMM }
vpermps, 0x6616, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F38|VexVVVV|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM }
vpermq, 0x6600, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F3A|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegYMM|RegZMM }
-vextracti128, 0x6639, AVX2, Modrm|Vex=2|Space0F3A|VexW=1|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM }
+vextracti128, 0x6639, AVX2, Modrm|Vex256|Space0F3A|VexW0|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM }
+// vextracti32x4 in disguise (see vround{p,s}{s,d} comment)
+vextracti128, 0x6639, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexW0|Disp8MemShift=4|NoSuf, { Imm8, RegYMM, Xmmword|Unspecified|BaseIndex }
vinserti128, 0x6638, AVX2, Modrm|Vex256|Space0F3A|VexVVVV|VexW0|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegYMM, RegYMM }
+// vinserti32x4 in disguise (see vround{p,s}{s,d} comment)
+vinserti128, 0x6638, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|NoSuf, { Imm8, Xmmword|Unspecified|BaseIndex, RegYMM, RegYMM }
vpmaskmov<dq>, 0x668e, AVX2, Modrm|Vex|Space0F38|VexVVVV|<dq:vexw>|CheckOperandSize|NoSuf, { RegXMM|RegYMM, RegXMM|RegYMM, Xmmword|Ymmword|Unspecified|BaseIndex }
vpmaskmov<dq>, 0x668c, AVX2, Modrm|Vex|Space0F38|VexVVVV|<dq:vexw>|CheckOperandSize|NoSuf, { Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
vpsllv<dq>, 0x6647, AVX2|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F38|VexVVVV|<dq:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|<dq:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
@@ -2115,12 +2127,12 @@ xcryptofb, 0xf30fa7e8, PadLock, NoSuf|Re
xstore, 0xfa7c0, PadLock, NoSuf|RepPrefixOk, {}
// Multy-precision Add Carry, rdseed instructions.
-adcx, 0x6666, ADX&APX_F, C|Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|DstVVVV|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 }
+adcx, 0x6666, ADX&APX_F, C|Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|DstVVVV|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 }
adcx, 0x660f38f6, ADX, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 }
-adcx, 0x6666, ADX&APX_F, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 }
-adox, 0xf366, ADX&APX_F, C|Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|DstVVVV|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 }
+adcx, 0x6666, ADX&APX_F, Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 }
+adox, 0xf366, ADX&APX_F, C|Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|DstVVVV|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 }
adox, 0xf30f38f6, ADX, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 }
-adox, 0xf366, ADX&APX_F, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 }
+adox, 0xf366, ADX&APX_F, Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 }
rdseed, 0xfc7/7, RdSeed, Modrm|NoSuf, { Reg16|Reg32|Reg64 }
// SMAP instructions.
@@ -3098,11 +3110,11 @@ rdsspq, 0xf30f1e/1, SHSTK&x64, Modrm|NoS
saveprevssp, 0xf30f01ea, SHSTK, NoSuf, {}
rstorssp, 0xf30f01/5, SHSTK, Modrm|NoSuf, { Qword|Unspecified|BaseIndex }
wrssd, 0x0f38f6, SHSTK, Modrm|IgnoreSize|NoSuf, { Reg32, Dword|Unspecified|BaseIndex }
-wrssd, 0x66, SHSTK&APX_F, Modrm|IgnoreSize|NoSuf|EVexMap4, { Reg32, Dword|Unspecified|BaseIndex }
+wrssd, 0x66, SHSTK&APX_F, Modrm|NoSuf|EVexMap4, { Reg32, Dword|Unspecified|BaseIndex }
wrssq, 0x0f38f6, SHSTK&x64, Modrm|NoSuf|Size64, { Reg64, Qword|Unspecified|BaseIndex }
wrssq, 0x66, SHSTK&APX_F, Modrm|NoSuf|Size64|EVexMap4, { Reg64, Qword|Unspecified|BaseIndex }
wrussd, 0x660f38f5, SHSTK, Modrm|IgnoreSize|NoSuf, { Reg32, Dword|Unspecified|BaseIndex }
-wrussd, 0x6665, SHSTK&APX_F, Modrm|IgnoreSize|NoSuf|EVexMap4, { Reg32, Dword|Unspecified|BaseIndex }
+wrussd, 0x6665, SHSTK&APX_F, Modrm|NoSuf|EVexMap4, { Reg32, Dword|Unspecified|BaseIndex }
wrussq, 0x660f38f5, SHSTK&x64, Modrm|NoSuf, { Reg64, Qword|Unspecified|BaseIndex }
wrussq, 0x6665, SHSTK&APX_F, Modrm|NoSuf|EVexMap4, { Reg64, Qword|Unspecified|BaseIndex }
setssbsy, 0xf30f01e8, SHSTK, NoSuf, {}
@@ -3152,7 +3164,7 @@ cldemote, 0x0f1c/0, CLDEMOTE, Modrm|Anys
// MOVDIR[I,64B] instructions.
movdiri, 0xf38f9, MOVDIRI, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
-movdiri, 0xf9, MOVDIRI&APX_F, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
+movdiri, 0xf9, MOVDIRI&APX_F, Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
movdir64b, 0x660f38f8, MOVDIR64B, Modrm|AddrPrefixOpReg|NoSuf, { Unspecified|BaseIndex, Reg16|Reg32|Reg64 }
movdir64b, 0x66f8, MOVDIR64B&APX_F, Modrm|AddrPrefixOpReg|NoSuf|EVexMap4, { Unspecified|BaseIndex, Reg32|Reg64 }
@@ -3459,13 +3471,13 @@ wrmsrlist, 0xf30f01c6, MSRLIST, NoSuf, {
// RAO-INT instructions.
aadd, 0xf38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
-aadd, 0xfc, RAO_INT&APX_F, Modrm|IgnoreSize|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
+aadd, 0xfc, RAO_INT&APX_F, Modrm|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
aand, 0x660f38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
-aand, 0x66fc, RAO_INT&APX_F, Modrm|IgnoreSize|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
+aand, 0x66fc, RAO_INT&APX_F, Modrm|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
aor, 0xf20f38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
-aor, 0xf2fc, RAO_INT&APX_F, Modrm|IgnoreSize|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
+aor, 0xf2fc, RAO_INT&APX_F, Modrm|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
axor, 0xf30f38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
-axor, 0xf3fc, RAO_INT&APX_F, Modrm|IgnoreSize|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
+axor, 0xf3fc, RAO_INT&APX_F, Modrm|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex }
// RAO-INT instructions end.
diff -rupN binutils.orig/opcodes/i386-tbl.h binutils-2.41/opcodes/i386-tbl.h
--- binutils.orig/opcodes/i386-tbl.h 2024-02-12 15:55:21.578572835 +0000
+++ binutils-2.41/opcodes/i386-tbl.h 2024-02-12 16:42:52.494835094 +0000
@@ -15372,6 +15372,16 @@ static const insn_template i386_optab[]
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0 } } } },
+ { MN_vbroadcastf128, 0x1a, 2, SPACE_0F38, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0 },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } } } },
{ MN_vbroadcastsd, 0x19, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
@@ -20804,6 +20814,18 @@ static const insn_template i386_optab[]
0, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0 } } } },
+ { MN_vextractf128, 0x19, 3, SPACE_0F3A, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0 },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } } } },
{ MN_vextractps, 0x17, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 3, 1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
@@ -20890,6 +20912,20 @@ static const insn_template i386_optab[]
0, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0 } } } },
+ { MN_vinsertf128, 0x18, 4, SPACE_0F3A, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0 },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } } } },
{ MN_vinsertps, 0x21, 4, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
@@ -25296,7 +25332,7 @@ static const insn_template i386_optab[]
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 } },
@@ -25320,7 +25356,7 @@ static const insn_template i386_optab[]
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 } },
@@ -25346,7 +25382,7 @@ static const insn_template i386_optab[]
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 } },
@@ -25374,7 +25410,7 @@ static const insn_template i386_optab[]
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 2, 1, 0, 0, 4, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 } },
@@ -25884,6 +25920,16 @@ static const insn_template i386_optab[]
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0 } } } },
+ { MN_vbroadcasti128, 0x5a, 2, SPACE_0F38, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0 },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } } } },
{ MN_vpblendd, 0x02, 4, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
@@ -26106,6 +26152,18 @@ static const insn_template i386_optab[]
0, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0 } } } },
+ { MN_vextracti128, 0x39, 3, SPACE_0F3A, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0 },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } } } },
{ MN_vinserti128, 0x38, 4, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
@@ -26120,6 +26178,20 @@ static const insn_template i386_optab[]
0, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0 } } } },
+ { MN_vinserti128, 0x38, 4, SPACE_0F3A, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0 },
+ { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } } } },
{ MN_vpmaskmovd, 0x8e, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
@@ -30933,7 +31005,7 @@ static const insn_template i386_optab[]
{ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 } } } },
{ MN_adcx, 0x66, 3, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 61, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -30955,7 +31027,7 @@ static const insn_template i386_optab[]
{ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0 } } } },
{ MN_adcx, 0x66, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 61, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -30965,7 +31037,7 @@ static const insn_template i386_optab[]
{ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0 } } } },
{ MN_adox, 0x66, 3, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 61, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -30987,7 +31059,7 @@ static const insn_template i386_optab[]
{ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0 } } } },
{ MN_adox, 0x66, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 61, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -37497,7 +37569,7 @@ static const insn_template i386_optab[]
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 1, 0 } } } },
{ MN_wrssd, 0x66, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 105, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -37537,7 +37609,7 @@ static const insn_template i386_optab[]
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 1, 0 } } } },
{ MN_wrussd, 0x65, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 105, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -37697,7 +37769,7 @@ static const insn_template i386_optab[]
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 1, 0 } } } },
{ MN_movdiri, 0xf9, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 120, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -41093,7 +41165,7 @@ static const insn_template i386_optab[]
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 1, 0 } } } },
{ MN_aadd, 0xfc, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 95, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -41113,7 +41185,7 @@ static const insn_template i386_optab[]
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 1, 0 } } } },
{ MN_aand, 0xfc, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 95, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -41133,7 +41205,7 @@ static const insn_template i386_optab[]
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 1, 0 } } } },
{ MN_aor, 0xfc, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 95, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -41153,7 +41225,7 @@ static const insn_template i386_optab[]
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 1, 0 } } } },
{ MN_axor, 0xfc, 2, SPACE_EVEXMAP4, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 },
{ { 95, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
@@ -41398,203 +41470,203 @@ static const i386_op_off_t i386_op_sets[
1540, 1541, 1542, 1544, 1546, 1548, 1550, 1552,
1554, 1556, 1558, 1560, 1562, 1564, 1566, 1568,
1570, 1572, 1574, 1576, 1578, 1579, 1580, 1582,
- 1584, 1586, 1588, 1589, 1590, 1591, 1592, 1593,
- 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610,
- 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626,
- 1628, 1630, 1632, 1634, 1636, 1638, 1640, 1642,
- 1644, 1646, 1648, 1650, 1652, 1654, 1656, 1658,
- 1660, 1662, 1664, 1666, 1668, 1670, 1672, 1674,
- 1676, 1678, 1680, 1682, 1684, 1686, 1688, 1690,
- 1692, 1694, 1696, 1698, 1700, 1702, 1704, 1706,
- 1708, 1710, 1712, 1714, 1716, 1718, 1720, 1722,
- 1724, 1726, 1728, 1730, 1732, 1734, 1736, 1738,
- 1740, 1742, 1744, 1746, 1748, 1750, 1752, 1754,
- 1756, 1758, 1760, 1762, 1764, 1766, 1768, 1770,
- 1772, 1774, 1776, 1778, 1780, 1782, 1784, 1786,
- 1788, 1790, 1792, 1794, 1796, 1798, 1800, 1802,
- 1804, 1806, 1808, 1810, 1812, 1814, 1816, 1818,
- 1820, 1822, 1824, 1826, 1828, 1830, 1832, 1834,
- 1836, 1838, 1840, 1842, 1844, 1846, 1848, 1850,
- 1852, 1854, 1856, 1858, 1860, 1862, 1864, 1866,
- 1868, 1870, 1872, 1874, 1876, 1878, 1880, 1882,
- 1884, 1886, 1888, 1890, 1892, 1894, 1896, 1898,
- 1900, 1902, 1904, 1906, 1908, 1910, 1912, 1914,
- 1916, 1918, 1920, 1922, 1924, 1926, 1928, 1930,
- 1932, 1934, 1936, 1938, 1940, 1942, 1944, 1946,
- 1948, 1950, 1952, 1954, 1956, 1958, 1960, 1962,
- 1964, 1966, 1968, 1970, 1972, 1974, 1976, 1978,
- 1983, 1985, 1990, 1992, 1994, 1999, 2001, 2003,
- 2005, 2010, 2012, 2014, 2016, 2020, 2026, 2028,
- 2033, 2035, 2037, 2039, 2041, 2043, 2045, 2047,
- 2049, 2051, 2052, 2053, 2054, 2056, 2057, 2058,
- 2059, 2060, 2061, 2063, 2064, 2065, 2066, 2068,
- 2070, 2072, 2074, 2076, 2078, 2080, 2082, 2084,
- 2086, 2088, 2090, 2092, 2096, 2097, 2098, 2100,
- 2104, 2108, 2110, 2114, 2118, 2119, 2120, 2122,
- 2124, 2126, 2128, 2133, 2137, 2141, 2143, 2145,
- 2147, 2149, 2150, 2152, 2154, 2156, 2158, 2160,
- 2162, 2164, 2166, 2168, 2170, 2172, 2174, 2176,
- 2178, 2180, 2182, 2184, 2186, 2188, 2190, 2192,
- 2194, 2195, 2196, 2198, 2200, 2201, 2202, 2205,
- 2208, 2211, 2214, 2216, 2218, 2220, 2222, 2224,
- 2226, 2227, 2228, 2229, 2231, 2235, 2237, 2239,
- 2245, 2249, 2250, 2251, 2252, 2253, 2254, 2255,
- 2256, 2260, 2262, 2264, 2268, 2270, 2272, 2274,
- 2276, 2278, 2280, 2282, 2284, 2286, 2288, 2290,
- 2292, 2294, 2296, 2297, 2300, 2303, 2308, 2313,
- 2316, 2319, 2322, 2325, 2330, 2335, 2338, 2341,
- 2343, 2345, 2347, 2349, 2351, 2353, 2355, 2356,
- 2358, 2360, 2362, 2364, 2366, 2367, 2368, 2369,
- 2373, 2377, 2379, 2383, 2387, 2391, 2395, 2399,
- 2401, 2405, 2407, 2409, 2411, 2413, 2415, 2417,
- 2419, 2421, 2422, 2424, 2426, 2428, 2430, 2432,
- 2434, 2436, 2438, 2439, 2440, 2441, 2443, 2445,
- 2447, 2449, 2450, 2451, 2453, 2455, 2457, 2459,
- 2461, 2463, 2464, 2466, 2468, 2470, 2472, 2473,
- 2474, 2476, 2478, 2480, 2482, 2484, 2486, 2488,
- 2490, 2491, 2492, 2493, 2494, 2497, 2500, 2502,
- 2505, 2506, 2507, 2509, 2510, 2512, 2513, 2514,
- 2516, 2518, 2519, 2520, 2521, 2522, 2523, 2526,
- 2531, 2536, 2541, 2546, 2549, 2554, 2559, 2561,
- 2563, 2565, 2567, 2568, 2569, 2571, 2573, 2575,
- 2577, 2579, 2581, 2583, 2584, 2585, 2586, 2587,
- 2588, 2589, 2594, 2599, 2600, 2601, 2602, 2603,
- 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611,
- 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619,
- 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627,
- 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635,
- 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643,
- 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651,
- 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659,
- 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667,
- 2668, 2669, 2670, 2671, 2672, 2673, 2674, 2675,
- 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683,
- 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691,
- 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699,
- 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707,
- 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715,
- 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723,
- 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731,
- 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739,
- 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747,
- 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2755,
- 2756, 2757, 2758, 2759, 2760, 2761, 2762, 2763,
- 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771,
- 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779,
- 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787,
- 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795,
- 2796, 2797, 2798, 2799, 2800, 2802, 2804, 2805,
- 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813,
- 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821,
- 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829,
- 2830, 2831, 2832, 2834, 2836, 2838, 2840, 2841,
- 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849,
- 2850, 2851, 2852, 2853, 2855, 2856, 2857, 2858,
- 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866,
- 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874,
- 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882,
- 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890,
- 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898,
- 2899, 2900, 2902, 2904, 2905, 2906, 2908, 2909,
- 2911, 2913, 2914, 2915, 2917, 2919, 2920, 2921,
- 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929,
- 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937,
- 2940, 2943, 2944, 2945, 2946, 2947, 2948, 2949,
- 2951, 2953, 2955, 2956, 2957, 2959, 2961, 2963,
- 2965, 2969, 2971, 2973, 2974, 2975, 2976, 2977,
- 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985,
- 2986, 2987, 2988, 2989, 2990, 2991, 2994, 2997,
- 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005,
- 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013,
- 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021,
- 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029,
- 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037,
- 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045,
- 3046, 3047, 3048, 3049, 3050, 3051, 3054, 3056,
- 3059, 3062, 3064, 3067, 3070, 3073, 3076, 3077,
- 3080, 3081, 3082, 3083, 3084, 3085, 3089, 3091,
- 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101,
- 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109,
- 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117,
- 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125,
- 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133,
- 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141,
- 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149,
- 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158,
- 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166,
- 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174,
- 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182,
- 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190,
- 3193, 3196, 3199, 3202, 3205, 3208, 3211, 3214,
- 3217, 3220, 3223, 3226, 3229, 3232, 3235, 3236,
- 3237, 3238, 3239, 3241, 3242, 3243, 3244, 3245,
- 3246, 3247, 3248, 3249, 3250, 3251, 3252, 3253,
- 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261,
- 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269,
- 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277,
- 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285,
- 3286, 3287, 3288, 3289, 3290, 3291, 3292, 3293,
- 3294, 3295, 3296, 3297, 3298, 3299, 3300, 3301,
- 3302, 3305, 3308, 3309, 3310, 3311, 3312, 3313,
- 3314, 3315, 3316, 3317, 3318, 3319, 3320, 3321,
- 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329,
- 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337,
- 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345,
- 3346, 3347, 3348, 3349, 3350, 3351, 3352, 3353,
- 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361,
- 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369,
- 3370, 3373, 3376, 3379, 3380, 3381, 3382, 3383,
- 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391,
- 3392, 3393, 3394, 3395, 3398, 3401, 3402, 3403,
- 3406, 3407, 3408, 3409, 3410, 3413, 3416, 3419,
- 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427,
- 3428, 3429, 3431, 3433, 3434, 3435, 3436, 3437,
- 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3445,
- 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453,
- 3454, 3455, 3456, 3457, 3458, 3460, 3462, 3463,
- 3464, 3465, 3466, 3467, 3468, 3469, 3470, 3471,
- 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479,
- 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487,
- 3489, 3491, 3493, 3495, 3496, 3497, 3498, 3499,
- 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507,
- 3508, 3509, 3510, 3512, 3513, 3515, 3518, 3520,
- 3521, 3522, 3524, 3526, 3527, 3528, 3529, 3530,
- 3531, 3532, 3534, 3536, 3538, 3540, 3541, 3542,
- 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3551,
- 3553, 3554, 3556, 3558, 3559, 3564, 3566, 3568,
- 3569, 3570, 3571, 3572, 3573, 3574, 3575, 3577,
- 3579, 3580, 3581, 3582, 3584, 3587, 3590, 3593,
- 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602,
- 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610,
- 3611, 3612, 3613, 3614, 3615, 3617, 3619, 3621,
- 3623, 3625, 3627, 3629, 3631, 3633, 3635, 3636,
- 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644,
- 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652,
- 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660,
- 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668,
- 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676,
- 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684,
- 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692,
- 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3700,
- 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708,
- 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716,
- 3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724,
- 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732,
- 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740,
- 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3750,
- 3751, 3752, 3755, 3756, 3757, 3759, 3760, 3761,
- 3762, 3764, 3765, 3766, 3767, 3769, 3770, 3771,
- 3772, 3775, 3776, 3777, 3778, 3779, 3782, 3785,
- 3788, 3791, 3794, 3795, 3796, 3797, 3798, 3800,
- 3802, 3803, 3804, 3805, 3808, 3811, 3814, 3817,
- 3820, 3821, 3822, 3823, 3825, 3826, 3827, 3828,
- 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837,
- 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3845,
- 3846, 3847, 3848, 3849, 3850, 3851, 3852, 3853,
- 3854, 3855, 3856, 3857, 3858, 3859, 3860, 3861,
- 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869,
- 3871, 3873, 3875, 3877, 3879, 3880, 3881, 3884,
- 3887, 3888, 3889, 3890, 3891
+ 1584, 1586, 1588, 1589, 1590, 1591, 1592, 1594,
+ 1597, 1599, 1601, 1603, 1605, 1607, 1609, 1611,
+ 1613, 1615, 1617, 1619, 1621, 1623, 1625, 1627,
+ 1629, 1631, 1633, 1635, 1637, 1639, 1641, 1643,
+ 1645, 1647, 1649, 1651, 1653, 1655, 1657, 1659,
+ 1661, 1663, 1665, 1667, 1669, 1671, 1673, 1675,
+ 1677, 1679, 1681, 1683, 1685, 1687, 1689, 1691,
+ 1693, 1695, 1697, 1699, 1701, 1703, 1705, 1707,
+ 1709, 1711, 1713, 1715, 1717, 1719, 1721, 1723,
+ 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739,
+ 1741, 1743, 1745, 1747, 1749, 1751, 1753, 1755,
+ 1757, 1759, 1761, 1763, 1765, 1767, 1769, 1771,
+ 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787,
+ 1789, 1791, 1793, 1795, 1797, 1799, 1801, 1803,
+ 1805, 1807, 1809, 1811, 1813, 1815, 1817, 1819,
+ 1821, 1823, 1825, 1827, 1829, 1831, 1833, 1835,
+ 1837, 1839, 1841, 1843, 1845, 1847, 1849, 1851,
+ 1853, 1855, 1857, 1859, 1861, 1863, 1865, 1867,
+ 1869, 1871, 1873, 1875, 1877, 1879, 1881, 1883,
+ 1885, 1887, 1889, 1891, 1893, 1895, 1897, 1899,
+ 1901, 1903, 1905, 1907, 1909, 1911, 1913, 1915,
+ 1917, 1919, 1921, 1923, 1925, 1927, 1929, 1931,
+ 1933, 1935, 1937, 1939, 1941, 1943, 1945, 1947,
+ 1949, 1951, 1953, 1955, 1957, 1959, 1961, 1963,
+ 1965, 1967, 1969, 1971, 1973, 1975, 1977, 1979,
+ 1984, 1986, 1991, 1993, 1995, 2000, 2002, 2004,
+ 2006, 2011, 2013, 2015, 2017, 2021, 2027, 2029,
+ 2034, 2036, 2038, 2040, 2042, 2044, 2046, 2048,
+ 2050, 2052, 2053, 2054, 2056, 2058, 2059, 2060,
+ 2061, 2062, 2064, 2066, 2067, 2068, 2069, 2071,
+ 2073, 2075, 2077, 2079, 2081, 2083, 2085, 2087,
+ 2089, 2091, 2093, 2095, 2099, 2100, 2101, 2103,
+ 2107, 2111, 2113, 2117, 2121, 2122, 2123, 2125,
+ 2127, 2129, 2131, 2136, 2140, 2144, 2146, 2148,
+ 2150, 2152, 2153, 2155, 2157, 2159, 2161, 2163,
+ 2165, 2167, 2169, 2171, 2173, 2175, 2177, 2179,
+ 2181, 2183, 2185, 2187, 2189, 2191, 2193, 2195,
+ 2197, 2198, 2199, 2201, 2203, 2204, 2205, 2208,
+ 2211, 2214, 2217, 2219, 2221, 2223, 2225, 2227,
+ 2229, 2230, 2231, 2232, 2234, 2238, 2240, 2242,
+ 2248, 2252, 2253, 2254, 2255, 2256, 2257, 2258,
+ 2259, 2263, 2265, 2267, 2271, 2273, 2275, 2277,
+ 2279, 2281, 2283, 2285, 2287, 2289, 2291, 2293,
+ 2295, 2297, 2299, 2300, 2303, 2306, 2311, 2316,
+ 2319, 2322, 2325, 2328, 2333, 2338, 2341, 2344,
+ 2346, 2348, 2350, 2352, 2354, 2356, 2358, 2359,
+ 2361, 2363, 2365, 2367, 2369, 2370, 2371, 2372,
+ 2376, 2380, 2382, 2386, 2390, 2394, 2398, 2402,
+ 2404, 2408, 2410, 2412, 2414, 2416, 2418, 2420,
+ 2422, 2424, 2425, 2427, 2429, 2431, 2433, 2435,
+ 2437, 2439, 2441, 2442, 2443, 2444, 2446, 2448,
+ 2450, 2452, 2453, 2454, 2456, 2458, 2460, 2462,
+ 2464, 2466, 2467, 2469, 2471, 2473, 2475, 2476,
+ 2477, 2479, 2481, 2483, 2485, 2487, 2489, 2491,
+ 2493, 2494, 2495, 2497, 2498, 2501, 2504, 2506,
+ 2509, 2510, 2511, 2513, 2514, 2516, 2518, 2520,
+ 2522, 2524, 2525, 2526, 2527, 2528, 2529, 2532,
+ 2537, 2542, 2547, 2552, 2555, 2560, 2565, 2567,
+ 2569, 2571, 2573, 2574, 2575, 2577, 2579, 2581,
+ 2583, 2585, 2587, 2589, 2590, 2591, 2592, 2593,
+ 2594, 2595, 2600, 2605, 2606, 2607, 2608, 2609,
+ 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617,
+ 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625,
+ 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633,
+ 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641,
+ 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649,
+ 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657,
+ 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665,
+ 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673,
+ 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681,
+ 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689,
+ 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697,
+ 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705,
+ 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713,
+ 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721,
+ 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729,
+ 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737,
+ 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745,
+ 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753,
+ 2754, 2755, 2756, 2757, 2758, 2759, 2760, 2761,
+ 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769,
+ 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777,
+ 2778, 2779, 2780, 2781, 2782, 2783, 2784, 2785,
+ 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793,
+ 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801,
+ 2802, 2803, 2804, 2805, 2806, 2808, 2810, 2811,
+ 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819,
+ 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827,
+ 2828, 2829, 2830, 2831, 2832, 2833, 2834, 2835,
+ 2836, 2837, 2838, 2840, 2842, 2844, 2846, 2847,
+ 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855,
+ 2856, 2857, 2858, 2859, 2861, 2862, 2863, 2864,
+ 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872,
+ 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880,
+ 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888,
+ 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896,
+ 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904,
+ 2905, 2906, 2908, 2910, 2911, 2912, 2914, 2915,
+ 2917, 2919, 2920, 2921, 2923, 2925, 2926, 2927,
+ 2928, 2929, 2930, 2931, 2932, 2933, 2934, 2935,
+ 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943,
+ 2946, 2949, 2950, 2951, 2952, 2953, 2954, 2955,
+ 2957, 2959, 2961, 2962, 2963, 2965, 2967, 2969,
+ 2971, 2975, 2977, 2979, 2980, 2981, 2982, 2983,
+ 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991,
+ 2992, 2993, 2994, 2995, 2996, 2997, 3000, 3003,
+ 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011,
+ 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019,
+ 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027,
+ 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035,
+ 3036, 3037, 3038, 3039, 3040, 3041, 3042, 3043,
+ 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051,
+ 3052, 3053, 3054, 3055, 3056, 3057, 3060, 3062,
+ 3065, 3068, 3070, 3073, 3076, 3079, 3082, 3083,
+ 3086, 3087, 3088, 3089, 3090, 3091, 3095, 3097,
+ 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107,
+ 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115,
+ 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123,
+ 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131,
+ 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139,
+ 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147,
+ 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155,
+ 3157, 3158, 3159, 3160, 3161, 3162, 3163, 3164,
+ 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172,
+ 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180,
+ 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188,
+ 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196,
+ 3199, 3202, 3205, 3208, 3211, 3214, 3217, 3220,
+ 3223, 3226, 3229, 3232, 3235, 3238, 3241, 3242,
+ 3243, 3244, 3245, 3247, 3248, 3249, 3250, 3251,
+ 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259,
+ 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267,
+ 3268, 3269, 3270, 3271, 3272, 3273, 3274, 3275,
+ 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283,
+ 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291,
+ 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299,
+ 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307,
+ 3308, 3311, 3314, 3315, 3316, 3317, 3318, 3319,
+ 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327,
+ 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335,
+ 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343,
+ 3344, 3345, 3346, 3347, 3348, 3349, 3350, 3351,
+ 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359,
+ 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367,
+ 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375,
+ 3376, 3379, 3382, 3385, 3386, 3387, 3388, 3389,
+ 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397,
+ 3398, 3399, 3400, 3401, 3404, 3407, 3408, 3409,
+ 3412, 3413, 3414, 3415, 3416, 3419, 3422, 3425,
+ 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433,
+ 3434, 3435, 3437, 3439, 3440, 3441, 3442, 3443,
+ 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451,
+ 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459,
+ 3460, 3461, 3462, 3463, 3464, 3466, 3468, 3469,
+ 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477,
+ 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485,
+ 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493,
+ 3495, 3497, 3499, 3501, 3502, 3503, 3504, 3505,
+ 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513,
+ 3514, 3515, 3516, 3518, 3519, 3521, 3524, 3526,
+ 3527, 3528, 3530, 3532, 3533, 3534, 3535, 3536,
+ 3537, 3538, 3540, 3542, 3544, 3546, 3547, 3548,
+ 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3557,
+ 3559, 3560, 3562, 3564, 3565, 3570, 3572, 3574,
+ 3575, 3576, 3577, 3578, 3579, 3580, 3581, 3583,
+ 3585, 3586, 3587, 3588, 3590, 3593, 3596, 3599,
+ 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608,
+ 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616,
+ 3617, 3618, 3619, 3620, 3621, 3623, 3625, 3627,
+ 3629, 3631, 3633, 3635, 3637, 3639, 3641, 3642,
+ 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650,
+ 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658,
+ 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3666,
+ 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674,
+ 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682,
+ 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690,
+ 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698,
+ 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706,
+ 3707, 3708, 3709, 3710, 3711, 3712, 3713, 3714,
+ 3715, 3716, 3717, 3718, 3719, 3720, 3721, 3722,
+ 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730,
+ 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738,
+ 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746,
+ 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3756,
+ 3757, 3758, 3761, 3762, 3763, 3765, 3766, 3767,
+ 3768, 3770, 3771, 3772, 3773, 3775, 3776, 3777,
+ 3778, 3781, 3782, 3783, 3784, 3785, 3788, 3791,
+ 3794, 3797, 3800, 3801, 3802, 3803, 3804, 3806,
+ 3808, 3809, 3810, 3811, 3814, 3817, 3820, 3823,
+ 3826, 3827, 3828, 3829, 3831, 3832, 3833, 3834,
+ 3836, 3837, 3838, 3839, 3840, 3841, 3842, 3843,
+ 3844, 3845, 3846, 3847, 3848, 3849, 3850, 3851,
+ 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859,
+ 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867,
+ 3868, 3869, 3870, 3871, 3872, 3873, 3874, 3875,
+ 3877, 3879, 3881, 3883, 3885, 3886, 3887, 3890,
+ 3893, 3894, 3895, 3896, 3897
};
/* i386 mnemonics table. */
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d binutils-2.41/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d
--- binutils.orig/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d 2024-02-12 15:55:20.792572349 +0000
+++ binutils-2.41/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d 2024-02-12 15:56:07.355601128 +0000
@@ -158,6 +158,12 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*62 da 7f 08 4b b4 87 23 01 00 00[ ]+tileloadd tmm6,\[r31\+rax\*4\+0x123\]
[ ]*[a-f0-9]+:[ ]*62 da 7d 08 4b b4 87 23 01 00 00[ ]+tileloaddt1 tmm6,\[r31\+rax\*4\+0x123\]
[ ]*[a-f0-9]+:[ ]*62 da 7e 08 4b b4 87 23 01 00 00[ ]+tilestored[ ]+\[r31\+rax\*4\+0x123\],tmm6
+[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 1a 18[ ]+vbroadcastf32x4 ymm3,XMMWORD PTR \[r16\]
+[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 5a 18[ ]+vbroadcasti32x4 ymm3,XMMWORD PTR \[r16\]
+[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 19 18 01[ ]+vextractf32x4 XMMWORD PTR \[r16\],ymm3,(0x)?1
+[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 39 18 01[ ]+vextracti32x4 XMMWORD PTR \[r16\],ymm3,(0x)?1
+[ ]*[a-f0-9]+:[ ]*62 7b 65 28 18 00 01[ ]+vinsertf32x4 ymm8,ymm3,XMMWORD PTR \[r16\],(0x)?1
+[ ]*[a-f0-9]+:[ ]*62 7b 65 28 38 00 01[ ]+vinserti32x4 ymm8,ymm3,XMMWORD PTR \[r16\],(0x)?1
[ ]*[a-f0-9]+:[ ]*62 db fd 08 09 30 01[ ]+vrndscalepd xmm6,XMMWORD PTR \[r24\],(0x)?1
[ ]*[a-f0-9]+:[ ]*62 db 7d 08 08 30 02[ ]+vrndscaleps xmm6,XMMWORD PTR \[r24\],(0x)?2
[ ]*[a-f0-9]+:[ ]*62 db cd 08 0b 18 03[ ]+vrndscalesd xmm3,xmm6,QWORD PTR \[r24\],(0x)?3
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d binutils-2.41/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d
--- binutils.orig/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d 2024-02-12 15:55:20.792572349 +0000
+++ binutils-2.41/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d 2024-02-12 15:56:07.355601128 +0000
@@ -158,6 +158,12 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*62 da 7f 08 4b b4 87 23 01 00 00[ ]+tileloadd[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7d 08 4b b4 87 23 01 00 00[ ]+tileloaddt1[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7e 08 4b b4 87 23 01 00 00[ ]+tilestored[ ]+%tmm6,0x123\(%r31,%rax,4\)
+[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 1a 18[ ]+vbroadcastf32x4 \(%r16\),%ymm3
+[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 5a 18[ ]+vbroadcasti32x4 \(%r16\),%ymm3
+[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 19 18 01[ ]+vextractf32x4 \$(0x)?1,%ymm3,\(%r16\)
+[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 39 18 01[ ]+vextracti32x4 \$(0x)?1,%ymm3,\(%r16\)
+[ ]*[a-f0-9]+:[ ]*62 7b 65 28 18 00 01[ ]+vinsertf32x4 \$(0x)?1,\(%r16\),%ymm3,%ymm8
+[ ]*[a-f0-9]+:[ ]*62 7b 65 28 38 00 01[ ]+vinserti32x4 \$(0x)?1,\(%r16\),%ymm3,%ymm8
[ ]*[a-f0-9]+:[ ]*62 db fd 08 09 30 01[ ]+vrndscalepd \$0x1,\(%r24\),%xmm6
[ ]*[a-f0-9]+:[ ]*62 db 7d 08 08 30 02[ ]+vrndscaleps \$0x2,\(%r24\),%xmm6
[ ]*[a-f0-9]+:[ ]*62 db cd 08 0b 18 03[ ]+vrndscalesd \$0x3,\(%r24\),%xmm6,%xmm3
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s binutils-2.41/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
--- binutils.orig/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s 2024-02-12 15:55:20.792572349 +0000
+++ binutils-2.41/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s 2024-02-12 15:56:07.356601129 +0000
@@ -152,6 +152,12 @@ _start:
tileloadd 0x123(%r31,%rax,4),%tmm6
tileloaddt1 0x123(%r31,%rax,4),%tmm6
tilestored %tmm6,0x123(%r31,%rax,4)
+ vbroadcastf128 (%r16),%ymm3
+ vbroadcasti128 (%r16),%ymm3
+ vextractf128 $1,%ymm3,(%r16)
+ vextracti128 $1,%ymm3,(%r16)
+ vinsertf128 $1,(%r16),%ymm3,%ymm8
+ vinserti128 $1,(%r16),%ymm3,%ymm8
vroundpd $1,(%r24),%xmm6
vroundps $2,(%r24),%xmm6
vroundsd $3,(%r24),%xmm6,%xmm3

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,139 @@
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 4592bd6da27..4faf642b422 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3675,7 +3675,7 @@ group_sections (struct elf_aarch64_link_hash_table *htab,
/* True if the inserted stub does not break BTI compatibility. */
static bool
-aarch64_bti_stub_p (bfd *input_bfd,
+aarch64_bti_stub_p (struct bfd_link_info *info,
struct elf_aarch64_stub_hash_entry *stub_entry)
{
/* Stubs without indirect branch are BTI compatible. */
@@ -3685,12 +3685,22 @@ aarch64_bti_stub_p (bfd *input_bfd,
/* Return true if the target instruction is compatible with BR x16. */
+ struct elf_aarch64_link_hash_table *globals = elf_aarch64_hash_table (info);
asection *section = stub_entry->target_section;
bfd_byte loc[4];
file_ptr off = stub_entry->target_value;
bfd_size_type count = sizeof (loc);
- if (!bfd_get_section_contents (input_bfd, section, loc, off, count))
+ /* PLT code is not generated yet, so treat it specially.
+ Note: Checking elf_aarch64_obj_tdata.plt_type & PLT_BTI is not
+ enough because it only implies BTI in the PLT0 and tlsdesc PLT
+ entries. Normal PLT entries don't have BTI in a shared library
+ (because such PLT is normally not called indirectly and adding
+ the BTI when a stub targets a PLT would change the PLT layout
+ and it's too late for that here). */
+ if (section == globals->root.splt)
+ memcpy (loc, globals->plt_entry, count);
+ else if (!bfd_get_section_contents (section->owner, section, loc, off, count))
return false;
uint32_t insn = bfd_getl32 (loc);
@@ -4637,11 +4647,24 @@ _bfd_aarch64_add_call_stub_entries (bool *stub_changed, bfd *output_bfd,
/* A stub with indirect jump may break BTI compatibility, so
insert another stub with direct jump near the target then. */
- if (need_bti && !aarch64_bti_stub_p (input_bfd, stub_entry))
+ if (need_bti && !aarch64_bti_stub_p (info, stub_entry))
{
+ id_sec_bti = htab->stub_group[sym_sec->id].link_sec;
+
+ /* If the stub with indirect jump and the BTI stub are in
+ the same stub group: change the indirect jump stub into
+ a BTI stub since a direct branch can reach the target.
+ The BTI landing pad is still needed in case another
+ stub indirectly jumps to it. */
+ if (id_sec_bti == id_sec)
+ {
+ stub_entry->stub_type = aarch64_stub_bti_direct_branch;
+ goto skip_double_stub;
+ }
+
stub_entry->double_stub = true;
htab->has_double_stub = true;
- id_sec_bti = htab->stub_group[sym_sec->id].link_sec;
+
stub_name_bti =
elfNN_aarch64_stub_name (id_sec_bti, sym_sec, hash, irela);
if (!stub_name_bti)
@@ -4653,33 +4676,41 @@ _bfd_aarch64_add_call_stub_entries (bool *stub_changed, bfd *output_bfd,
stub_entry_bti =
aarch64_stub_hash_lookup (&htab->stub_hash_table,
stub_name_bti, false, false);
- if (stub_entry_bti == NULL)
- stub_entry_bti =
- _bfd_aarch64_add_stub_entry_in_group (stub_name_bti,
- sym_sec, htab);
- if (stub_entry_bti == NULL)
+ if (stub_entry_bti != NULL)
+ BFD_ASSERT (stub_entry_bti->stub_type
+ == aarch64_stub_bti_direct_branch);
+ else
{
- free (stub_name);
- free (stub_name_bti);
- goto error_ret_free_internal;
- }
-
- stub_entry_bti->target_value = sym_value + irela->r_addend;
- stub_entry_bti->target_section = sym_sec;
- stub_entry_bti->stub_type = aarch64_stub_bti_direct_branch;
- stub_entry_bti->h = hash;
- stub_entry_bti->st_type = st_type;
+ stub_entry_bti =
+ _bfd_aarch64_add_stub_entry_in_group (stub_name_bti,
+ sym_sec, htab);
+ if (stub_entry_bti == NULL)
+ {
+ free (stub_name);
+ free (stub_name_bti);
+ goto error_ret_free_internal;
+ }
- len = sizeof (BTI_STUB_ENTRY_NAME) + strlen (sym_name);
- stub_entry_bti->output_name = bfd_alloc (htab->stub_bfd, len);
- if (stub_entry_bti->output_name == NULL)
- {
- free (stub_name);
- free (stub_name_bti);
- goto error_ret_free_internal;
+ stub_entry_bti->target_value =
+ sym_value + irela->r_addend;
+ stub_entry_bti->target_section = sym_sec;
+ stub_entry_bti->stub_type =
+ aarch64_stub_bti_direct_branch;
+ stub_entry_bti->h = hash;
+ stub_entry_bti->st_type = st_type;
+
+ len = sizeof (BTI_STUB_ENTRY_NAME) + strlen (sym_name);
+ stub_entry_bti->output_name = bfd_alloc (htab->stub_bfd,
+ len);
+ if (stub_entry_bti->output_name == NULL)
+ {
+ free (stub_name);
+ free (stub_name_bti);
+ goto error_ret_free_internal;
+ }
+ snprintf (stub_entry_bti->output_name, len,
+ BTI_STUB_ENTRY_NAME, sym_name);
}
- snprintf (stub_entry_bti->output_name, len,
- BTI_STUB_ENTRY_NAME, sym_name);
/* Update the indirect call stub to target the BTI stub. */
stub_entry->target_value = 0;
@@ -4688,7 +4719,7 @@ _bfd_aarch64_add_call_stub_entries (bool *stub_changed, bfd *output_bfd,
stub_entry->h = NULL;
stub_entry->st_type = STT_FUNC;
}
-
+skip_double_stub:
*stub_changed = true;
}

View File

@ -0,0 +1,11 @@
--- binutils.orig/config/override.m4 2021-08-31 14:20:17.275574804 +0100
+++ binutils-2.37/config/override.m4 2021-08-31 14:36:37.793954247 +0100
@@ -41,7 +41,7 @@ dnl Or for updating the whole tree at on
AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
m4_defn([m4_PACKAGE_VERSION]), [],
- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
+ [])
])
m4_define([AC_INIT], m4_defn([AC_INIT])[
_GCC_AUTOCONF_VERSION_CHECK

View File

@ -0,0 +1,29 @@
--- binutils.orig/bfd/merge.c 2023-11-07 09:49:56.923358543 +0000
+++ binutils-2.41/bfd/merge.c 2023-11-07 09:51:47.031552039 +0000
@@ -167,7 +167,7 @@ static bool
sec_merge_maybe_resize (struct sec_merge_hash *table, unsigned added)
{
struct bfd_hash_table *bfdtab = &table->table;
- if (bfdtab->count + added > table->nbuckets * 2 / 3)
+ if (bfdtab->count + added > table->nbuckets / 3 * 2)
{
unsigned i;
unsigned long newnb = table->nbuckets * 2;
@@ -175,7 +175,7 @@ sec_merge_maybe_resize (struct sec_merge
uint64_t *newl;
unsigned long alloc;
- while (bfdtab->count + added > newnb * 2 / 3)
+ while (bfdtab->count + added > newnb / 3 * 2)
{
newnb *= 2;
if (!newnb)
@@ -240,7 +240,7 @@ sec_merge_hash_insert (struct sec_merge_
hashp->u.suffix = NULL;
hashp->next = NULL;
// We must not need resizing, otherwise _index is wrong
- BFD_ASSERT (bfdtab->count + 1 <= table->nbuckets * 2 / 3);
+ BFD_ASSERT (bfdtab->count + 1 <= table->nbuckets / 3 * 2);
bfdtab->count++;
table->key_lens[_index] = (hash << 32) | (uint32_t)len;
table->values[_index] = hashp;

View File

@ -0,0 +1,374 @@
--- binutils.orig/include/demangle.h 2024-01-17 09:54:10.945686323 +0000
+++ binutils-2.41/include/demangle.h 2024-01-17 09:54:55.696760281 +0000
@@ -1,5 +1,5 @@
/* Defs for interface to demanglers.
- Copyright (C) 1992-2023 Free Software Foundation, Inc.
+ Copyright (C) 1992-2024 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License
@@ -448,6 +448,8 @@ enum demangle_component_type
DEMANGLE_COMPONENT_TRANSACTION_SAFE,
/* A cloned function. */
DEMANGLE_COMPONENT_CLONE,
+ /* A member-like friend function. */
+ DEMANGLE_COMPONENT_FRIEND,
DEMANGLE_COMPONENT_NOEXCEPT,
DEMANGLE_COMPONENT_THROW_SPEC,
@@ -464,6 +466,8 @@ enum demangle_component_type
DEMANGLE_COMPONENT_TEMPLATE_TEMPLATE_PARM,
DEMANGLE_COMPONENT_TEMPLATE_PACK_PARM,
+ DEMANGLE_COMPONENT_CONSTRAINTS,
+
/* A builtin type with argument. This holds the builtin type
information. */
DEMANGLE_COMPONENT_EXTENDED_BUILTIN_TYPE
diff -rup binutils.orig/libiberty/cp-demangle.c binutils-2.41/libiberty/cp-demangle.c
--- binutils.orig/libiberty/cp-demangle.c 2024-01-17 09:54:11.323686947 +0000
+++ binutils-2.41/libiberty/cp-demangle.c 2024-01-17 09:54:42.468738420 +0000
@@ -1,5 +1,5 @@
/* Demangler for g++ V3 ABI.
- Copyright (C) 2003-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2024 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@wasabisystems.com>.
This file is part of the libiberty library, which is part of GCC.
@@ -993,6 +993,7 @@ d_make_comp (struct d_info *di, enum dem
case DEMANGLE_COMPONENT_VECTOR_TYPE:
case DEMANGLE_COMPONENT_CLONE:
case DEMANGLE_COMPONENT_MODULE_ENTITY:
+ case DEMANGLE_COMPONENT_CONSTRAINTS:
if (left == NULL || right == NULL)
return NULL;
break;
@@ -1036,6 +1037,7 @@ d_make_comp (struct d_info *di, enum dem
case DEMANGLE_COMPONENT_TEMPLATE_NON_TYPE_PARM:
case DEMANGLE_COMPONENT_TEMPLATE_TEMPLATE_PARM:
case DEMANGLE_COMPONENT_TEMPLATE_PACK_PARM:
+ case DEMANGLE_COMPONENT_FRIEND:
if (left == NULL)
return NULL;
break;
@@ -1344,6 +1346,22 @@ is_ctor_dtor_or_conversion (struct deman
}
}
+/* [ Q <constraint-expression> ] */
+
+static struct demangle_component *
+d_maybe_constraints (struct d_info *di, struct demangle_component *dc)
+{
+ if (d_peek_char (di) == 'Q')
+ {
+ d_advance (di, 1);
+ struct demangle_component *expr = d_expression (di);
+ if (expr == NULL)
+ return NULL;
+ dc = d_make_comp (di, DEMANGLE_COMPONENT_CONSTRAINTS, dc, expr);
+ }
+ return dc;
+}
+
/* <encoding> ::= <(function) name> <bare-function-type>
::= <(data) name>
::= <special-name>
@@ -1397,21 +1415,21 @@ d_encoding (struct d_info *di, int top_l
struct demangle_component *ftype;
ftype = d_bare_function_type (di, has_return_type (dc));
- if (ftype)
- {
- /* If this is a non-top-level local-name, clear the
- return type, so it doesn't confuse the user by
- being confused with the return type of whaever
- this is nested within. */
- if (!top_level && dc->type == DEMANGLE_COMPONENT_LOCAL_NAME
- && ftype->type == DEMANGLE_COMPONENT_FUNCTION_TYPE)
- d_left (ftype) = NULL;
+ if (!ftype)
+ return NULL;
- dc = d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME,
- dc, ftype);
- }
- else
- dc = NULL;
+ /* If this is a non-top-level local-name, clear the
+ return type, so it doesn't confuse the user by
+ being confused with the return type of whaever
+ this is nested within. */
+ if (!top_level && dc->type == DEMANGLE_COMPONENT_LOCAL_NAME
+ && ftype->type == DEMANGLE_COMPONENT_FUNCTION_TYPE)
+ d_left (ftype) = NULL;
+
+ ftype = d_maybe_constraints (di, ftype);
+
+ dc = d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME,
+ dc, ftype);
}
}
}
@@ -1681,6 +1699,7 @@ d_maybe_module_name (struct d_info *di,
/* <unqualified-name> ::= [<module-name>] <operator-name> [<abi-tags>]
::= [<module-name>] <ctor-dtor-name> [<abi-tags>]
::= [<module-name>] <source-name> [<abi-tags>]
+ ::= [<module-name>] F <source-name> [<abi-tags>]
::= [<module-name>] <local-source-name> [<abi-tags>]
::= [<module-name>] DC <source-name>+ E [<abi-tags>]
<local-source-name> ::= L <source-name> <discriminator> [<abi-tags>]
@@ -1692,11 +1711,18 @@ d_unqualified_name (struct d_info *di, s
{
struct demangle_component *ret;
char peek;
+ int member_like_friend = 0;
if (!d_maybe_module_name (di, &module))
return NULL;
peek = d_peek_char (di);
+ if (peek == 'F')
+ {
+ member_like_friend = 1;
+ d_advance (di, 1);
+ peek = d_peek_char (di);
+ }
if (IS_DIGIT (peek))
ret = d_source_name (di);
else if (IS_LOWER (peek))
@@ -1773,6 +1799,8 @@ d_unqualified_name (struct d_info *di, s
ret = d_make_comp (di, DEMANGLE_COMPONENT_MODULE_ENTITY, ret, module);
if (d_peek_char (di) == 'B')
ret = d_abi_tags (di, ret);
+ if (member_like_friend)
+ ret = d_make_comp (di, DEMANGLE_COMPONENT_FRIEND, ret, NULL);
if (scope)
ret = d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, scope, ret);
@@ -3012,7 +3040,7 @@ d_parmlist (struct d_info *di)
struct demangle_component *type;
char peek = d_peek_char (di);
- if (peek == '\0' || peek == 'E' || peek == '.')
+ if (peek == '\0' || peek == 'E' || peek == '.' || peek == 'Q')
break;
if ((peek == 'R' || peek == 'O')
&& d_peek_next_char (di) == 'E')
@@ -3248,7 +3276,7 @@ d_template_args (struct d_info *di)
return d_template_args_1 (di);
}
-/* <template-arg>* E */
+/* <template-arg>* [Q <constraint-expression>] E */
static struct demangle_component *
d_template_args_1 (struct d_info *di)
@@ -3284,13 +3312,17 @@ d_template_args_1 (struct d_info *di)
return NULL;
pal = &d_right (*pal);
- if (d_peek_char (di) == 'E')
- {
- d_advance (di, 1);
- break;
- }
+ char peek = d_peek_char (di);
+ if (peek == 'E' || peek == 'Q')
+ break;
}
+ al = d_maybe_constraints (di, al);
+
+ if (d_peek_char (di) != 'E')
+ return NULL;
+ d_advance (di, 1);
+
di->last_name = hold_last_name;
return al;
@@ -4431,6 +4463,7 @@ d_count_templates_scopes (struct d_print
case DEMANGLE_COMPONENT_PACK_EXPANSION:
case DEMANGLE_COMPONENT_TAGGED_NAME:
case DEMANGLE_COMPONENT_CLONE:
+ case DEMANGLE_COMPONENT_CONSTRAINTS:
recurse_left_right:
/* PR 89394 - Check for too much recursion. */
if (dpi->recursion > DEMANGLE_RECURSION_LIMIT)
@@ -4459,6 +4492,7 @@ d_count_templates_scopes (struct d_print
case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS:
case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS:
case DEMANGLE_COMPONENT_MODULE_ENTITY:
+ case DEMANGLE_COMPONENT_FRIEND:
d_count_templates_scopes (dpi, d_left (dc));
break;
@@ -5189,6 +5223,22 @@ d_print_comp_inner (struct d_print_info
dpt.next = dpi->templates;
dpi->templates = &dpt;
dpt.template_decl = typed_name;
+
+ /* Constraints are mangled as part of the template argument list,
+ so they wrap the _TEMPLATE_ARGLIST. But
+ d_lookup_template_argument expects the RHS of _TEMPLATE to be
+ the _ARGLIST, and constraints need to refer to these args. So
+ move the _CONSTRAINTS out of the _TEMPLATE and onto the type.
+ This will result in them being printed after the () like a
+ trailing requires-clause, but that seems like our best option
+ given that we aren't printing a template-head. */
+ struct demangle_component *tnr = d_right (typed_name);
+ if (tnr->type == DEMANGLE_COMPONENT_CONSTRAINTS)
+ {
+ d_right (typed_name) = d_left (tnr);
+ d_left (tnr) = d_right (dc);
+ d_right (dc) = tnr;
+ }
}
d_print_comp (dpi, options, d_right (dc));
@@ -6197,6 +6247,11 @@ d_print_comp_inner (struct d_print_info
d_append_char (dpi, ']');
return;
+ case DEMANGLE_COMPONENT_FRIEND:
+ d_print_comp (dpi, options, d_left (dc));
+ d_append_string (dpi, "[friend]");
+ return;
+
case DEMANGLE_COMPONENT_TEMPLATE_HEAD:
{
d_append_char (dpi, '<');
@@ -6231,6 +6286,12 @@ d_print_comp_inner (struct d_print_info
d_append_string (dpi, "...");
return;
+ case DEMANGLE_COMPONENT_CONSTRAINTS:
+ d_print_comp (dpi, options, d_left (dc));
+ d_append_string (dpi, " requires ");
+ d_print_comp (dpi, options, d_right (dc));
+ return;
+
default:
d_print_error (dpi);
return;
--- binutils.orig/include/demangle.h 2024-01-17 11:06:11.111229985 +0000
+++ binutils-2.41/include/demangle.h 2024-01-17 11:06:21.281242709 +0000
@@ -314,6 +314,8 @@ enum demangle_component_type
/* C++11: An rvalue reference modifying a member function. The one
subtree is the type which is being referenced. */
DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS,
+ /* C++23: A member function with explict object parameter. */
+ DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION,
/* A vendor qualifier. The left subtree is the type which is being
qualified, and the right subtree is the name of the
qualifier. */
--- binutils.orig/libiberty/cp-demangle.c 2024-01-17 11:06:11.246230153 +0000
+++ binutils-2.41/libiberty/cp-demangle.c 2024-01-17 11:06:21.282242710 +0000
@@ -581,6 +581,7 @@ static char *d_demangle (const char *, i
case DEMANGLE_COMPONENT_CONST_THIS: \
case DEMANGLE_COMPONENT_REFERENCE_THIS: \
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS: \
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION: \
case DEMANGLE_COMPONENT_TRANSACTION_SAFE: \
case DEMANGLE_COMPONENT_NOEXCEPT: \
case DEMANGLE_COMPONENT_THROW_SPEC
@@ -749,6 +750,9 @@ d_dump (struct demangle_component *dc, i
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
printf ("rvalue reference this\n");
break;
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
+ printf ("explicit object parameter\n");
+ break;
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
printf ("transaction_safe this\n");
break;
@@ -1547,6 +1551,8 @@ d_name (struct d_info *di, int substable
/* <nested-name> ::= N [<CV-qualifiers>] [<ref-qualifier>] <prefix> <unqualified-name> E
::= N [<CV-qualifiers>] [<ref-qualifier>] <template-prefix> <template-args> E
+ ::= N H <prefix> <unqualified-name> E
+ ::= N H <template-prefix> <template-args> E
*/
static struct demangle_component *
@@ -1559,13 +1565,24 @@ d_nested_name (struct d_info *di)
if (! d_check_char (di, 'N'))
return NULL;
- pret = d_cv_qualifiers (di, &ret, 1);
- if (pret == NULL)
- return NULL;
+ if (d_peek_char (di) == 'H')
+ {
+ d_advance (di, 1);
+ di->expansion += sizeof "this";
+ pret = &ret;
+ rqual = d_make_comp (di, DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION,
+ NULL, NULL);
+ }
+ else
+ {
+ pret = d_cv_qualifiers (di, &ret, 1);
+ if (pret == NULL)
+ return NULL;
- /* Parse the ref-qualifier now and then attach it
- once we have something to attach it to. */
- rqual = d_ref_qualifier (di, NULL);
+ /* Parse the ref-qualifier now and then attach it
+ once we have something to attach it to. */
+ rqual = d_ref_qualifier (di, NULL);
+ }
*pret = d_prefix (di, 1);
if (*pret == NULL)
@@ -4427,6 +4444,7 @@ d_count_templates_scopes (struct d_print
case DEMANGLE_COMPONENT_CONST_THIS:
case DEMANGLE_COMPONENT_REFERENCE_THIS:
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
case DEMANGLE_COMPONENT_NOEXCEPT:
case DEMANGLE_COMPONENT_THROW_SPEC:
@@ -6521,6 +6539,8 @@ d_print_mod (struct d_print_info *dpi, i
case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
d_append_string (dpi, "&&");
return;
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
+ return;
case DEMANGLE_COMPONENT_COMPLEX:
d_append_string (dpi, " _Complex");
return;
@@ -6559,11 +6579,13 @@ d_print_function_type (struct d_print_in
{
int need_paren;
int need_space;
+ int xobj_memfn;
struct d_print_mod *p;
struct d_print_mod *hold_modifiers;
need_paren = 0;
need_space = 0;
+ xobj_memfn = 0;
for (p = mods; p != NULL; p = p->next)
{
if (p->printed)
@@ -6586,7 +6608,8 @@ d_print_function_type (struct d_print_in
need_space = 1;
need_paren = 1;
break;
- FNQUAL_COMPONENT_CASE:
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
+ xobj_memfn = 1;
break;
default:
break;
@@ -6617,6 +6640,8 @@ d_print_function_type (struct d_print_in
d_append_char (dpi, ')');
d_append_char (dpi, '(');
+ if (xobj_memfn)
+ d_append_string (dpi, "this ");
if (d_right (dc) != NULL)
d_print_comp (dpi, options, d_right (dc));

View File

@ -0,0 +1,85 @@
diff -rup binutils.orig/configure binutils-2.40/configure
--- binutils.orig/configure 2023-02-13 14:43:00.728877170 +0000
+++ binutils-2.40/configure 2023-02-13 14:43:13.671864892 +0000
@@ -5442,49 +5442,6 @@ if test -z "$LD"; then
fi
fi
-# Check whether -static-libstdc++ -static-libgcc is supported.
-have_static_libs=no
-if test "$GCC" = yes; then
- saved_LDFLAGS="$LDFLAGS"
-
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
-$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-#error -static-libstdc++ not implemented
-#endif
-int main() {}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; have_static_libs=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
- LDFLAGS="$saved_LDFLAGS"
-fi
-
-
if test -n "$ac_tool_prefix"; then
diff -rup binutils.orig/configure.ac binutils-2.40/configure.ac
--- binutils.orig/configure.ac 2023-02-13 14:43:00.728877170 +0000
+++ binutils-2.40/configure.ac 2023-02-13 14:43:13.671864892 +0000
@@ -1435,26 +1435,6 @@ if test -z "$LD"; then
fi
fi
-# Check whether -static-libstdc++ -static-libgcc is supported.
-have_static_libs=no
-if test "$GCC" = yes; then
- saved_LDFLAGS="$LDFLAGS"
-
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
- AC_LANG_PUSH(C++)
- AC_LINK_IFELSE([AC_LANG_SOURCE([
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-#error -static-libstdc++ not implemented
-#endif
-int main() {}])],
- [AC_MSG_RESULT([yes]); have_static_libs=yes],
- [AC_MSG_RESULT([no])])
- AC_LANG_POP(C++)
-
- LDFLAGS="$saved_LDFLAGS"
-fi
-
ACX_PROG_GNAT
ACX_PROG_GDC
ACX_PROG_CMP_IGNORE_INITIAL
Only in binutils-2.40: configure.ac.orig
Only in binutils-2.40: configure.orig

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am
--- binutils.orig/bfd/Makefile.am 2019-02-08 12:22:51.395684251 +0000
+++ binutils-2.32/bfd/Makefile.am 2019-02-08 12:22:53.970664973 +0000
@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@
bfdincludedir = @bfdincludedir@
bfdlib_LTLIBRARIES = libbfd.la
bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
else !INSTALL_LIBBFD
# Empty these so that the respective installation directories will not be created.
bfdlibdir =
diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in
--- binutils.orig/bfd/Makefile.in 2019-02-08 12:21:35.291254044 +0000
+++ binutils-2.32/bfd/Makefile.in 2019-02-08 12:22:10.163992947 +0000
@@ -249,7 +249,7 @@ am__can_run_installinfo = \
esac
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
HEADERS = $(bfdinclude_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
@@ -468,7 +468,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
@INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
-@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h \
+@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h \
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(am__append_2)
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la

View File

@ -0,0 +1,47 @@
diff -rup binutils.orig/binutils/testsuite/binutils-all/objcopy.exp binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp
--- binutils.orig/binutils/testsuite/binutils-all/objcopy.exp 2024-04-29 13:21:45.598519109 +0100
+++ binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp 2024-04-29 14:48:37.656943316 +0100
@@ -1099,7 +1099,7 @@ switch [copy_setup] {
"$OBJCOPY" "$OBJCOPYFLAGS" "$test5"
if [is_elf_format] {
keep_debug_symbols_and_check_links "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test6"
- keep_debug_symbols_for_elf_relocatable "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test7"
+ # keep_debug_symbols_for_elf_relocatable "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test7"
}
}
"0" {
@@ -1110,7 +1110,7 @@ switch [copy_setup] {
"$OBJCOPY" "$OBJCOPYFLAGS" "$test5"
if [is_elf_format] {
keep_debug_symbols_and_check_links "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test6"
- keep_debug_symbols_for_elf_relocatable "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test7"
+ # keep_debug_symbols_for_elf_relocatable "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test7"
}
}
}
@@ -1408,11 +1408,10 @@ proc objcopy_test_without_global_symbol
# The AArch64 and ARM targets preserve mapping symbols
# in object files, so they will fail this test.
-setup_xfail aarch64*-*-* arm*-*-*
+# setup_xfail aarch64*-*-* arm*-*-*
# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
# setup_xfail riscv*-*-*
-
-objcopy_test_without_global_symbol
+# objcopy_test_without_global_symbol
# objcopy remove relocation from executable test
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.41/ld/testsuite/ld-plugin/plugin.exp
--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2024-04-29 13:21:48.205519779 +0100
+++ binutils-2.41/ld/testsuite/ld-plugin/plugin.exp 2024-04-29 13:53:32.183969315 +0100
@@ -136,6 +136,8 @@ if { [istarget riscv*-*-*] } then {
return
}
+return
+
set plugin_tests [list \
[list "load plugin" "-plugin $plugin_path \
$testobjfiles $libs" "" "" "" {{ld plugin-1.d}} "main.x" ] \

View File

@ -0,0 +1,11 @@
--- binutils.orig/gold/dwp.cc 2023-05-02 13:26:44.075148082 +0100
+++ binutils-2.40/gold/dwp.cc 2023-05-02 13:27:16.189130127 +0100
@@ -2418,6 +2418,8 @@ main(int argc, char** argv)
{
Dwo_file exe_file(exe_filename);
exe_file.read_executable(&files);
+ if (files.empty())
+ gold_fatal(_("Could not find any dwo links in specified EXE"));
}
// Add any additional files listed on command line.

View File

@ -0,0 +1,193 @@
diff --git a/gold/i386.cc b/gold/i386.cc
index bf209fe9a86..31161ff091c 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -360,7 +360,11 @@ class Target_i386 : public Sized_target<32, false>
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL),
rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY),
- got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
+ got_mod_index_offset_(-1U), tls_base_symbol_defined_(false),
+ isa_1_used_(0), isa_1_needed_(0),
+ feature_1_(0), feature_2_used_(0), feature_2_needed_(0),
+ object_isa_1_used_(0), object_feature_1_(0),
+ object_feature_2_used_(0), seen_first_object_(false)
{ }
// Process the relocations to determine unreferenced sections for
@@ -859,6 +863,21 @@ class Target_i386 : public Sized_target<32, false>
this->rel_dyn_section(layout));
}
+ // Record a target-specific program property in the .note.gnu.property
+ // section.
+ void
+ record_gnu_property(unsigned int, unsigned int, size_t,
+ const unsigned char*, const Object*);
+
+ // Merge the target-specific program properties from the current object.
+ void
+ merge_gnu_properties(const Object*);
+
+ // Finalize the target-specific program properties and add them back to
+ // the layout.
+ void
+ do_finalize_gnu_properties(Layout*) const;
+
// Information about this specific target which we pass to the
// general Target structure.
static const Target::Target_info i386_info;
@@ -898,6 +917,26 @@ class Target_i386 : public Sized_target<32, false>
unsigned int got_mod_index_offset_;
// True if the _TLS_MODULE_BASE_ symbol has been defined.
bool tls_base_symbol_defined_;
+
+ // Target-specific program properties, from .note.gnu.property section.
+ // Each bit represents a specific feature.
+ uint32_t isa_1_used_;
+ uint32_t isa_1_needed_;
+ uint32_t feature_1_;
+ uint32_t feature_2_used_;
+ uint32_t feature_2_needed_;
+ // Target-specific properties from the current object.
+ // These bits get ORed into ISA_1_USED_ after all properties for the object
+ // have been processed. But if either is all zeroes (as when the property
+ // is absent from an object), the result should be all zeroes.
+ // (See PR ld/23486.)
+ uint32_t object_isa_1_used_;
+ // These bits get ANDed into FEATURE_1_ after all properties for the object
+ // have been processed.
+ uint32_t object_feature_1_;
+ uint32_t object_feature_2_used_;
+ // Whether we have seen our first object, for use in initializing FEATURE_1_.
+ bool seen_first_object_;
};
const Target::Target_info Target_i386::i386_info =
@@ -1042,6 +1081,126 @@ Target_i386::rel_irelative_section(Layout* layout)
return this->rel_irelative_;
}
+// Record a target-specific program property from the .note.gnu.property
+// section.
+void
+Target_i386::record_gnu_property(
+ unsigned int, unsigned int pr_type,
+ size_t pr_datasz, const unsigned char* pr_data,
+ const Object* object)
+{
+ uint32_t val = 0;
+
+ switch (pr_type)
+ {
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_USED:
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED:
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED:
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED:
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
+ if (pr_datasz != 4)
+ {
+ gold_warning(_("%s: corrupt .note.gnu.property section "
+ "(pr_datasz for property %d is not 4)"),
+ object->name().c_str(), pr_type);
+ return;
+ }
+ val = elfcpp::Swap<32, false>::readval(pr_data);
+ break;
+ default:
+ gold_warning(_("%s: unknown program property type 0x%x "
+ "in .note.gnu.property section"),
+ object->name().c_str(), pr_type);
+ break;
+ }
+
+ switch (pr_type)
+ {
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
+ this->object_isa_1_used_ |= val;
+ break;
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
+ this->isa_1_needed_ |= val;
+ break;
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
+ // If we see multiple feature props in one object, OR them together.
+ this->object_feature_1_ |= val;
+ break;
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
+ this->object_feature_2_used_ |= val;
+ break;
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
+ this->feature_2_needed_ |= val;
+ break;
+ }
+}
+
+// Merge the target-specific program properties from the current object.
+void
+Target_i386::merge_gnu_properties(const Object*)
+{
+ if (this->seen_first_object_)
+ {
+ // If any object is missing the ISA_1_USED property, we must omit
+ // it from the output file.
+ if (this->object_isa_1_used_ == 0)
+ this->isa_1_used_ = 0;
+ else if (this->isa_1_used_ != 0)
+ this->isa_1_used_ |= this->object_isa_1_used_;
+ this->feature_1_ &= this->object_feature_1_;
+ // If any object is missing the FEATURE_2_USED property, we must
+ // omit it from the output file.
+ if (this->object_feature_2_used_ == 0)
+ this->feature_2_used_ = 0;
+ else if (this->feature_2_used_ != 0)
+ this->feature_2_used_ |= this->object_feature_2_used_;
+ }
+ else
+ {
+ this->isa_1_used_ = this->object_isa_1_used_;
+ this->feature_1_ = this->object_feature_1_;
+ this->feature_2_used_ = this->object_feature_2_used_;
+ this->seen_first_object_ = true;
+ }
+ this->object_isa_1_used_ = 0;
+ this->object_feature_1_ = 0;
+ this->object_feature_2_used_ = 0;
+}
+
+static inline void
+add_property(Layout* layout, unsigned int pr_type, uint32_t val)
+{
+ unsigned char buf[4];
+ elfcpp::Swap<32, false>::writeval(buf, val);
+ layout->add_gnu_property(elfcpp::NT_GNU_PROPERTY_TYPE_0, pr_type, 4, buf);
+}
+
+// Finalize the target-specific program properties and add them back to
+// the layout.
+void
+Target_i386::do_finalize_gnu_properties(Layout* layout) const
+{
+ if (this->isa_1_used_ != 0)
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_USED,
+ this->isa_1_used_);
+ if (this->isa_1_needed_ != 0)
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED,
+ this->isa_1_needed_);
+ if (this->feature_1_ != 0)
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND,
+ this->feature_1_);
+ if (this->feature_2_used_ != 0)
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED,
+ this->feature_2_used_);
+ if (this->feature_2_needed_ != 0)
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED,
+ this->feature_2_needed_);
+}
+
// Write the first three reserved words of the .got.plt section.
// The remainder of the section is written while writing the PLT
// in Output_data_plt_i386::do_write.

View File

@ -0,0 +1,16 @@
diff -rup binutils.orig/gold/options.h binutils-2.41/gold/options.h
--- binutils.orig/gold/options.h 2024-01-04 09:52:09.282002253 +0000
+++ binutils-2.41/gold/options.h 2024-01-04 09:52:51.890972630 +0000
@@ -855,6 +855,12 @@ class General_options
N_("(ARM only) Do not warn about objects with incompatible "
"enum sizes"));
+ DEFINE_bool_ignore(error_execstack, options::TWO_DASHES, '\0',
+ N_("Ignored"), N_("Ignored"));
+
+ DEFINE_bool_ignore(error_rwx_segments, options::TWO_DASHES, '\0',
+ N_("Ignored"), N_("Ignored"));
+
DEFINE_special(exclude_libs, options::TWO_DASHES, '\0',
N_("Exclude libraries from automatic export"),
N_(("lib,lib ...")));

View File

@ -0,0 +1,19 @@
diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc
--- binutils.orig/gold/layout.cc 2019-06-24 14:37:36.013086899 +0100
+++ binutils-2.32/gold/layout.cc 2019-06-24 14:41:40.054517479 +0100
@@ -868,6 +868,7 @@ Layout::get_output_section(const char* n
&& (same_name->flags() & elfcpp::SHF_TLS) == 0)
os = same_name;
}
+#if 0 /* BZ 1722715, PR 17556. */
else if ((flags & elfcpp::SHF_TLS) == 0)
{
elfcpp::Elf_Xword zero_flags = 0;
@@ -878,6 +879,7 @@ Layout::get_output_section(const char* n
if (p != this->section_name_map_.end())
os = p->second;
}
+#endif
}
if (os == NULL)

View File

@ -0,0 +1,27 @@
diff --git a/gold/options.cc b/gold/options.cc
index c9834b66159..91d7802fffe 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -989,7 +989,7 @@ parse_short_option(int argc, const char** argv, int pos_in_argv_i,
}
// If we're a -z option, we need to parse our argument as a
- // long-option, e.g. "-z stacksize=8192".
+ // long-option, e.g. "-z stack-size=8192".
if (retval == &dash_z)
{
int dummy_i = 0;
diff --git a/gold/options.h b/gold/options.h
index 46f658f23ea..d16e38066da 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1110,6 +1110,9 @@ class General_options
N_("Generate package metadata note"),
N_("[=JSON]"));
+ DEFINE_bool_ignore(pack_relative_relocs, options::DASH_Z, '\0',
+ N_("Ignored"), N_("Ignored"));
+
DEFINE_bool(pie, options::ONE_DASH, '\0', false,
N_("Create a position independent executable"),
N_("Do not create a position independent executable"));

View File

@ -0,0 +1,91 @@
diff -rup binutils.orig/binutils/testsuite/binutils-all/compress.exp binutils-2.41/binutils/testsuite/binutils-all/compress.exp
--- binutils.orig/binutils/testsuite/binutils-all/compress.exp 2024-04-30 15:04:40.935567791 +0100
+++ binutils-2.41/binutils/testsuite/binutils-all/compress.exp 2024-04-30 15:10:31.703681471 +0100
@@ -139,6 +139,10 @@ if ![string match "" $got] then {
}
}
+if { [istarget "s390x-*-*"] } {
+ return
+}
+
# Xfail this test if there are no compressed sections.
setup_xfail "$compression_used$target_triplet"
set testname "objcopy compress debug sections in archive with zlib-gnu"
diff -rup binutils.orig/ld/testsuite/ld-elf/indirect.exp binutils-2.41/ld/testsuite/ld-elf/indirect.exp
--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2024-04-30 15:04:42.275572059 +0100
+++ binutils-2.41/ld/testsuite/ld-elf/indirect.exp 2024-04-30 15:15:19.760991281 +0100
@@ -135,6 +135,10 @@ set testname "Indirect symbol 2"
set cmd "$ld -shared -o tmpdir/indirect2.so tmpdir/indirect2.o"
check_link_message "$cmd" [list $string2] "$testname"
+if { [istarget "s390x-*-*"] } {
+ return
+}
+
set run_tests [list \
[list "Run with libindirect3c.so 1" \
"-Wl,--no-as-needed tmpdir/indirect3a.o tmpdir/indirect3b.o tmpdir/libindirect3c.so" "" \
diff -rup binutils.orig/ld/testsuite/ld-shared/shared.exp binutils-2.41/ld/testsuite/ld-shared/shared.exp
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2024-04-30 15:04:42.436572571 +0100
+++ binutils-2.41/ld/testsuite/ld-shared/shared.exp 2024-04-30 15:16:21.522057698 +0100
@@ -267,7 +267,7 @@ if ![ld_compile "$CC_FOR_TARGET $SHCFLAG
setup_xfail "x86_64-*-linux*"
}
setup_xfail "x86_64-*-linux-gnux32"
- setup_xfail "s390x-*-linux*"
+ # setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
diff -rup binutils.orig/ld/testsuite/ld-vsb/vsb.exp binutils-2.41/ld/testsuite/ld-vsb/vsb.exp
--- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2024-04-30 15:04:42.454572629 +0100
+++ binutils-2.41/ld/testsuite/ld-vsb/vsb.exp 2024-04-30 15:17:37.850139781 +0100
@@ -366,7 +366,7 @@ proc visibility_run {visibility} {
|| [ string match $visibility "protected_weak" ]
|| [ string match $visibility "normal" ] } {
setup_xfail "powerpc-*-linux*"
- setup_xfail "s390x-*-linux*"
+ # setup_xfail "s390x-*-linux*"
if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
setup_xfail "sparc*-*-linux*"
}
diff -rup binutils.orig/ld/testsuite/ld-ctf/slice.d binutils-2.41/ld/testsuite/ld-ctf/slice.d
--- binutils.orig/ld/testsuite/ld-ctf/slice.d 2024-08-16 15:01:57.439706788 +0100
+++ binutils-2.41/ld/testsuite/ld-ctf/slice.d 2024-08-16 15:03:25.824963879 +0100
@@ -25,9 +25,9 @@ Contents of CTF section .ctf:
#...
0x[0-9a-f]*: \(kind 6\) struct slices \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\)
*\[0x0\] one: ID 0x[0-9a-f]*: \(kind 1\) int:1 \[slice 0x0:0x1\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
- *\[0x1\] two: ID 0x[0-9a-f]*: \(kind 1\) int:2 \[slice 0x0:0x2\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
- *\[0x3\] six: ID 0x[0-9a-f]*: \(kind 1\) int:6 \[slice 0x0:0x6\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
- *\[0x9\] ten: ID 0x[0-9a-f]*: \(kind 1\) int:10 \[slice 0x0:0xa\] \(format 0x1\) \(size 0x2\) \(aligned at 0x2\)
- *\[0x13\] bar: ID 0x[0-9a-f]*: \(kind 8\) enum foo:1 \[slice 0x0:0x1\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
+ *\[0x.\] two: ID 0x[0-9a-f]*: \(kind 1\) int:2 \[slice 0x.:0x2\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
+ *\[0x.\] six: ID 0x[0-9a-f]*: \(kind 1\) int:6 \[slice 0x.:0x6\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
+ *\[0x.\] ten: ID 0x[0-9a-f]*: \(kind 1\) int:10 \[slice 0x.:0xa\] \(format 0x1\) \(size 0x2\) \(aligned at 0x2\)
+ *\[0x.*\] bar: ID 0x[0-9a-f]*: \(kind 8\) enum foo:1 \[slice 0x.*:0x1\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
#...
diff -rup binutils.orig/ld/testsuite/ld-shared/shared.exp binutils-2.41/ld/testsuite/ld-shared/shared.exp
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2024-08-16 15:01:57.612707292 +0100
+++ binutils-2.41/ld/testsuite/ld-shared/shared.exp 2024-08-16 15:05:33.353334828 +0100
@@ -274,6 +274,7 @@ if ![ld_compile "$CC_FOR_TARGET $SHCFLAG
setup_xfail "aarch64*-*-linux*"
# Solaris defaults to -z text.
setup_xfail "*-*-solaris2*"
+ setup_xfail "s390x-*-*"
shared_test shnp "shared (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o shared \
"-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv"
--- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2024-08-16 15:01:57.631707347 +0100
+++ binutils-2.41/ld/testsuite/ld-vsb/vsb.exp 2024-08-16 15:46:04.098564801 +0100
@@ -396,7 +396,7 @@ proc visibility_run {visibility} {
setup_xfail "*-*-beos*"
}
- if { ![is_xcoff_format] } {
+ if { ![is_xcoff_format] && ![istarget s390x-*-*] } {
visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o $datfile \
"-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv"

View File

@ -344,6 +344,9 @@ Patch39: binutils-multilib.am.patch
# Lifetime: Fixed in 2.42 # Lifetime: Fixed in 2.42
Patch40: binutils-Intel-APX-CODE_6_GOTTPOFF.patch Patch40: binutils-Intel-APX-CODE_6_GOTTPOFF.patch
Patch41: binutils-extra-testsuite-fixes.patch
Patch42: binutils-s390-testsuite-fixes.patch
# Purpose: Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10 # Purpose: Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10
# Lifetime: TEMPORARY # Lifetime: TEMPORARY
Patch99: binutils-suppress-ld-align-tests.patch Patch99: binutils-suppress-ld-align-tests.patch
@ -940,7 +943,7 @@ build_target()
%if %{with docs} %if %{with docs}
# Because of parallel building, info has to be made after all. # Because of parallel building, info has to be made after all.
%make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils all %make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils all
%make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils info %make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils info
%else %else
%make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils MAKEINFO=true all %make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils MAKEINFO=true all
@ -1492,10 +1495,10 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Fri Aug 16 2024 Nick Clifton <nickc@redhat.com> - 2.41-3 * Fri Aug 16 2024 Nick Clifton <nickc@redhat.com> - 2.41-3
- Fix restoring contect to gprofng.rc file. (RHEL-54563) - NVR Bump to allow rebuilding with GTS-14 gcc. (RHEL-53519)
* Fri Aug 16 2024 Nick Clifton <nickc@redhat.com> - 2.41-2 * Tue Apr 30 2024 Nick Clifton <nickc@redhat.com> - 2.41-2
- NVR Bump to allow rebuilding with GTS-14 gcc. (RHEL-53516) - Fix s390x testsuite errors to allow building for RHEL-8. (RHEL-30410)
* Fri Apr 26 2024 Nick Clifton <nickc@redhat.com> - 2.41-1 * Mon Apr 29 2024 Nick Clifton <nickc@redhat.com> - 2.41-1
- Initial import of upstream 2.41 release with patches from Fedora 40. - Initial import of upstream 2.41 release with patches from Fedora 40. (RHEL-30410)

View File

@ -1,70 +0,0 @@
#! /usr/bin/perl
# Compare build logs for the testsuite results regressions.
# $Id$
use strict;
use warnings;
use Data::Dumper;
my $reverse=shift @ARGV if ($ARGV[0]||"") eq "-r";
sub readfile($)
{
my($filename)=@_;
local *F;
open F,$filename or die "open \"$filename\": $!";
my $F=do { local $/; <F>; };
close F or die "close \"$filename\": $!";
return $F;
}
sub writefile($$)
{
my($filename,$content)=@_;
local *F;
open F,">$filename" or die "create \"$filename\": $!";
print F $content or die "write \"$filename\": $!";
close F or die "close \"$filename\": $!";
}
local *DIR;
opendir DIR,"tests" or die "opendir: $!";
my %arch;
for my $name (sort readdir(DIR)) {
next if $name!~/-([^-]*)[.]log$/o;
my $arch=$1;
(my $sum=$name)=~s/log$/sum/ or die;
my $i=readfile "tests/$name";
my $o="";
while ($i=~/\n(Native configuration is.*?Summary ===\n.*?\n)make\Q[\E/gs) {
$o.=$1;
}
# Version string differs.
$o=~s{/builddir/build/BUILD/binutils-[^/]*/+}{}g;
$o=~s{^(Version .*) 20\d{6}$}{$1}mg;
$o=~s{^(\Q../as-new\E) 20\d{6}$}{$1}mg;
$o=~s{^(build-[^/]*/ld/ld-new) 20\d{6}$}{$1}mg;
writefile "tests/$sum",$o;
push @{$arch{$arch}},$sum;
}
closedir DIR or die "closedir: $!";
for (values(%arch)) {
next if 2==@$_;
warn "Single element: ".${$_}[0]."\n" if 1==@$_;
die "Not 2 elements:\n".Dumper($_) if 1!=@$_;
}
system("rm -f tests/gdbcompare-*.diff") and die;
for my $arch (sort keys(%arch)) {
next if 2!=@{$arch{$arch}};
# sub trans { return {"."=>0,"-"=>1}->{($_[0]=~/([-.])[^-.]+[.]\w+$/)[0]}.$_[0]; };
sub trans { return $_[0]; };
my @sorted=sort { my $a1=trans $a; my $b1=trans $b; ($b1 cmp $a1) * ($reverse ? -1 : +1); } @{$arch{$arch}};
do { system $_ and die $_; } for "diff -u tests/'".$sorted[1]."' tests/'".$sorted[0]."' >tests/gdbcompare-'$arch'.sum.diff;true";
}
system("vim tests/gdbcompare-*.sum.diff");

View File

@ -1 +0,0 @@
gcc-toolset-14-binutils package is retired on branch c10s for CS-2551

View File

@ -1,14 +0,0 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-fast-lane.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-slow-lane.functional}

View File

@ -1,25 +0,0 @@
#
# Build/PR gating tests for binutils
#
/common:
plan:
import:
url: https://src.fedoraproject.org/tests/binutils.git
ref: main
name: /plans/build-gating/common
/kernel-rebuild:
plan:
import:
url: https://src.fedoraproject.org/tests/binutils.git
ref: main
name: /plans/build-gating/kernel-rebuild
adjust+:
- because: "Plan to be ran when executed locally, or executed by CI system to gate a build or PR."
when: >-
trigger is defined
and trigger != commit
and trigger != build
enabled: false

View File

@ -1,16 +0,0 @@
---
debuginfo:
ignore:
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib64/*.debug
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib64/bfd-plugins/*.debug
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib64/gprofng/*.debug
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/bin/*.debug
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib/*.debug
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib/bfd-plugins/*.debug
specname:
primary: filename
unicode:
exclude: ^binutils-\d+.\d+\/gas\/testsuite\/gas\/all\/multibyte.s$

View File

@ -1,2 +0,0 @@
SHA512 (binutils-2.41.tar.xz) = 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2