From 217a9d3276ef9446471d62b3cbbb288b000adf9d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 20 2022 10:10:40 +0000 Subject: import binutils-2.30-116.el8 --- diff --git a/SOURCES/binutils-aarch64-rng.patch b/SOURCES/binutils-aarch64-rng.patch new file mode 100644 index 0000000..d560203 --- /dev/null +++ b/SOURCES/binutils-aarch64-rng.patch @@ -0,0 +1,82 @@ +diff -rup binutils.orig/gas/config/tc-aarch64.c binutils-2.30/gas/config/tc-aarch64.c +--- binutils.orig/gas/config/tc-aarch64.c 2022-04-05 10:30:32.735881142 +0100 ++++ binutils-2.30/gas/config/tc-aarch64.c 2022-04-05 10:31:28.198694747 +0100 +@@ -8553,6 +8553,8 @@ static const struct aarch64_option_cpu_v + {"sha3", AARCH64_FEATURE (AARCH64_FEATURE_SHA2 + | AARCH64_FEATURE_SHA3, 0), + AARCH64_ARCH_NONE}, ++ {"rng", AARCH64_FEATURE (AARCH64_FEATURE_RNG, 0), ++ AARCH64_ARCH_NONE}, + {NULL, AARCH64_ARCH_NONE, AARCH64_ARCH_NONE}, + }; + +diff -rup binutils.orig/gas/doc/c-aarch64.texi binutils-2.30/gas/doc/c-aarch64.texi +--- binutils.orig/gas/doc/c-aarch64.texi 2022-04-05 10:30:32.735881142 +0100 ++++ binutils-2.30/gas/doc/c-aarch64.texi 2022-04-05 10:32:35.814423321 +0100 +@@ -179,6 +179,8 @@ automatically cause those extensions to + @item @code{fp16fml} @tab ARMv8.2-A @tab ARMv8.4-A or later + @tab Enable ARMv8.2 16-bit floating-point multiplication variant support. + This implies @code{fp16}. ++@item @code{rng} @tab ARMv8.5-A @tab No ++ @tab Enable ARMv8.5-A random number instructions. + @end multitable + + @node AArch64 Syntax +Only in binutils-2.30/gas/testsuite/gas/aarch64: rng-1.d +Only in binutils-2.30/gas/testsuite/gas/aarch64: rng-1.s +diff -rup binutils.orig/include/opcode/aarch64.h binutils-2.30/include/opcode/aarch64.h +--- binutils.orig/include/opcode/aarch64.h 2022-04-05 10:30:33.256879707 +0100 ++++ binutils-2.30/include/opcode/aarch64.h 2022-04-05 10:42:30.241087320 +0100 +@@ -62,6 +62,7 @@ typedef uint32_t aarch64_insn; + #define AARCH64_FEATURE_COMPNUM 0x40000000 /* Complex # instructions. */ + #define AARCH64_FEATURE_DOTPROD 0x080000000 /* Dot Product instructions. */ + #define AARCH64_FEATURE_F16_FML 0x1000000000ULL /* v8.2 FP16FML ins. */ ++#define AARCH64_FEATURE_RNG 0x80000000000ULL /* Random Number instructions. */ + + /* Architectures are the sum of the base and extensions. */ + #define AARCH64_ARCH_V8 AARCH64_FEATURE (AARCH64_FEATURE_V8, \ +diff -rup binutils.orig/opcodes/aarch64-opc.c binutils-2.30/opcodes/aarch64-opc.c +--- binutils.orig/opcodes/aarch64-opc.c 2022-04-05 10:30:33.019880360 +0100 ++++ binutils-2.30/opcodes/aarch64-opc.c 2022-04-05 10:58:07.179526356 +0100 +@@ -3823,6 +3823,8 @@ const aarch64_sys_reg aarch64_sys_regs [ + { "contextidr_el1", CPENC(3,0,C13,C0,1), 0 }, + { "contextidr_el2", CPENC (3, 4, C13, C0, 1), F_ARCHEXT }, + { "contextidr_el12", CPENC (3, 5, C13, C0, 1), F_ARCHEXT }, ++ { "rndr", CPENC(3,3,C2,C4,0), F_ARCHEXT }, /* RO */ ++ { "rndrrs", CPENC(3,3,C2,C4,1), F_ARCHEXT }, /* RO */ + { "tpidr_el0", CPENC(3,3,C13,C0,2), 0 }, + { "tpidrro_el0", CPENC(3,3,C13,C0,3), 0 }, /* RO */ + { "tpidr_el1", CPENC(3,0,C13,C0,4), 0 }, +@@ -4254,6 +4256,13 @@ aarch64_sys_reg_supported_p (const aarch + && !AARCH64_CPU_HAS_FEATURE (features, AARCH64_FEATURE_V8_4)) + return FALSE; + ++ /* Random Number Instructions. For now they are available ++ (and optional) only with ARMv8.5-A. */ ++ if (( reg->value == CPENC (3, 3, C2, C4, 0) ++ || reg->value == CPENC (3, 3, C2, C4, 1)) ++ && !(AARCH64_CPU_HAS_FEATURE (features, AARCH64_FEATURE_RNG))) ++ return FALSE; ++ + return TRUE; + } + +--- /dev/null 2022-04-05 09:32:54.900867346 +0100 ++++ binutils-2.30/gas/testsuite/gas/aarch64/rng-1.s 2022-04-05 10:36:04.921589937 +0100 +@@ -0,0 +1,3 @@ ++ .arch armv8.4-a+rng ++ mrs x5, rndr ++ mrs x6, rndrrs +--- /dev/null 2022-04-05 09:32:54.900867346 +0100 ++++ binutils-2.30/gas/testsuite/gas/aarch64/rng-1.d 2022-04-05 10:35:48.937653638 +0100 +@@ -0,0 +1,10 @@ ++#source: rng-1.s ++#objdump: -dr ++ ++.*: file format .* ++ ++Disassembly of section \.text: ++ ++0+ <.*>: ++.*: d53b2405 mrs x5, rndr ++.*: d53b2426 mrs x6, rndrrs diff --git a/SOURCES/binutils-s390-z16.patch b/SOURCES/binutils-s390-z16.patch new file mode 100644 index 0000000..bada8ad --- /dev/null +++ b/SOURCES/binutils-s390-z16.patch @@ -0,0 +1,53 @@ +diff -rup binutils.orig/gas/config/tc-s390.c binutils-2.30/gas/config/tc-s390.c +--- binutils.orig/gas/config/tc-s390.c 2022-04-11 09:54:43.234516094 +0100 ++++ binutils-2.30/gas/config/tc-s390.c 2022-04-11 09:55:31.670168952 +0100 +@@ -292,9 +292,9 @@ s390_parse_cpu (const char * arg + S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, + { STRING_COMMA_LEN ("z14"), STRING_COMMA_LEN ("arch12"), + S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, +- { STRING_COMMA_LEN (""), STRING_COMMA_LEN ("arch13"), ++ { STRING_COMMA_LEN ("z15"), STRING_COMMA_LEN ("arch13"), + S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, +- { STRING_COMMA_LEN (""), STRING_COMMA_LEN ("arch14"), ++ { STRING_COMMA_LEN ("z16"), STRING_COMMA_LEN ("arch14"), + S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX } + }; + static struct +diff -rup binutils.orig/gas/doc/c-s390.texi binutils-2.30/gas/doc/c-s390.texi +--- binutils.orig/gas/doc/c-s390.texi 2022-04-11 09:54:43.236516079 +0100 ++++ binutils-2.30/gas/doc/c-s390.texi 2022-04-11 09:56:40.709674135 +0100 +@@ -18,7 +18,7 @@ and eleven chip levels. The architecture + Architecture (ESA) and the newer z/Architecture mode. The chip levels + are g5 (or arch3), g6, z900 (or arch5), z990 (or arch6), z9-109, z9-ec + (or arch7), z10 (or arch8), z196 (or arch9), zEC12 (or arch10), z13 +-(or arch11), z14 (or arch12), z15 (or arch13), or arch14. ++(or arch11), z14 (or arch12), z15 (or arch13), or z16 (or arch14). + + @menu + * s390 Options:: Command-line Options. +@@ -72,7 +72,7 @@ are recognized: + @code{z13} (or @code{arch11}), + @code{z14} (or @code{arch12}), + @code{z15} (or @code{arch13}), and +-@code{arch14}. ++@code{z16} (or @code{arch14}). + + Assembling an instruction that is not supported on the target + processor results in an error message. +diff -rup binutils.orig/opcodes/s390-mkopc.c binutils-2.30/opcodes/s390-mkopc.c +--- binutils.orig/opcodes/s390-mkopc.c 2022-04-11 09:54:43.491514252 +0100 ++++ binutils-2.30/opcodes/s390-mkopc.c 2022-04-11 09:58:24.228932192 +0100 +@@ -377,9 +377,11 @@ main (void) + else if (strcmp (cpu_string, "z14") == 0 + || strcmp (cpu_string, "arch12") == 0) + min_cpu = S390_OPCODE_ARCH12; +- else if (strcmp (cpu_string, "arch13") == 0) ++ else if ((strcmp (cpu_string, "z15") == 0 ++ || strcmp (cpu_string, "arch13") == 0)) + min_cpu = S390_OPCODE_ARCH13; +- else if (strcmp (cpu_string, "arch14") == 0) ++ else if ((strcmp (cpu_string, "z16") == 0 ++ || strcmp (cpu_string, "arch14") == 0)) + min_cpu = S390_OPCODE_ARCH14; + else { + fprintf (stderr, "Couldn't parse cpu string %s\n", cpu_string); diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index 52f922e..e08853b 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -43,7 +43,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?name_cross}%{?_with_debug:-debug} Version: 2.30 -Release: 114%{?dist} +Release: 116%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -615,6 +615,14 @@ Patch97: binutils-plugin-error.patch # Lifetime: Fixed in 2.37 Patch98: binutils-verdef.patch +# Purpose: Allow the AArch64 RNG extension to be used, and do not require v8.5 support. +# Lifetime: Fixed in 2.39 +Patch99: binutils-aarch64-rng.patch + +# Purpose: Allow z16 to be used as an alias for the arch14 extenstions to the s390 architecture. +# Lifetime: Fixed in 2.39 +Patch100: binutils-s390-z16.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -850,6 +858,8 @@ using libelf instead of BFD. %patch96 -p1 %patch97 -p1 %patch98 -p1 +%patch99 -p1 +%patch100 -p1 # We cannot run autotools as there is an exact requirement of autoconf-2.59. # FIXME - this is no longer true. Maybe try reinstating autotool use ? @@ -1299,8 +1309,14 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Mon Apr 11 2022 Nick Clifton - 2.30-116 +- Allow z16 to be used as an alias for the s390 architecture's arch14 extensions. (#2073384) + +* Tue Apr 05 2022 Nick Clifton - 2.30-115 +- Add support for the AArch64 architecture's RNG extension. (#2056691) + * Mon Mar 07 2022 Nick Clifton - 2.30-114 -- DO not set version info on unversion symbols. (#2055179) +- Do not set version info on unversion symbols. (#2055179) * Wed Jan 19 2022 Nick Clifton - 2.30-113 - When searching for plugins, do not complain if incompatible ones are found. (#2039117)