This combines the following upstream commits: e45af510bc AArch64: Fix instability in AdvSIMD sinh 6c22823da5 AArch64: Fix instability in AdvSIMD tan aebaeb2c33 AArch64: Update math-vector-fortran.h e20ca759af AArch64: add optimised strspn/strcspn aac077645a AArch64: Fix SVE powf routine [BZ #33299] 1e3d1ddf97 AArch64: Optimize SVE exp functions dee22d2a81 AArch64: Optimise SVE FP64 Hyperbolics 6849c5b791 AArch64: Improve codegen SVE log1p helper 09795c5612 AArch64: Fix builderror with GCC 12.1/12.2 aa18367c11 AArch64: Improve enabling of SVE for libmvec 691edbdf77 aarch64: fix unwinding in longjmp 4352e2cc93 aarch64: Fix _dl_tlsdesc_dynamic unwind for pac-ret (BZ 32612) cf56eb28fa AArch64: Optimize algorithm in users of SVE expf helper ce2f26a22e AArch64: Remove PTR_ARG/SIZE_ARG defines 8f0e7fe61e Aarch64: Improve codegen in SVE asinh c0ff447edf Aarch64: Improve codegen in SVE exp and users, and update expf_inline f5ff34cb3c AArch64: Improve codegen for SVE erfcf 0b195651db AArch64: Improve codegen for SVE pow 95e807209b AArch64: Improve codegen for SVE powf d3f2b71ef1 aarch64: Fix tests not compatible with targets supporting GCS f86b4cf875 AArch64: Improve codegen in SVE expm1f and users 140b985e5a AArch64: Improve codegen in AdvSIMD asinh 91c1fadba3 AArch64: Improve codegen for SVE log1pf users cff9648d0b AArch64: Improve codegen of AdvSIMD expf family 569cfaaf49 AArch64: Improve codegen in AdvSIMD pow ca0c0d0f26 AArch64: Improve codegen in users of ADVSIMD log1p helper 13a7ef5999 AArch64: Improve codegen in users of ADVSIMD expm1 helper 2d82d781a5 AArch64: Remove SVE erf and erfc tables 1cf29fbc5b AArch64: Small optimisation in AdvSIMD erf and erfc 7b8c134b54 AArch64: Improve codegen in SVE expf & related routines a15b1394b5 AArch64: Improve codegen in SVE F32 logs 5bc100bd4b AArch64: Improve codegen in users of AdvSIMD log1pf helper 7900ac490d AArch64: Improve codegen in users of ADVSIMD expm1f helper 0fed0b250f aarch64/fpu: Add vector variants of pow 75207bde68 aarch64/fpu: Add vector variants of cbrt 157f89fa3d aarch64/fpu: Add vector variants of hypot 90a6ca8b28 aarch64: Fix AdvSIMD libmvec routines for big-endian 87cb1dfcd6 aarch64/fpu: Add vector variants of erfc 3d3a4fb8e4 aarch64/fpu: Add vector variants of tanh eedbbca0bf aarch64/fpu: Add vector variants of sinh 8b67920528 aarch64/fpu: Add vector variants of atanh 81406ea3c5 aarch64/fpu: Add vector variants of asinh b09fee1d21 aarch64/fpu: Add vector variants of acosh bdb5705b7b aarch64/fpu: Add vector variants of cosh cb5d84f1f8 aarch64/fpu: Add vector variants of erf Resolves: RHEL-118273
126 lines
4.1 KiB
Diff
126 lines
4.1 KiB
Diff
commit d3f2b71ef1d146137a25dd1367d97a14fac341c6
|
|
Author: Yury Khrustalev <yury.khrustalev@arm.com>
|
|
Date: Tue Nov 26 11:38:30 2024 +0000
|
|
|
|
aarch64: Fix tests not compatible with targets supporting GCS
|
|
|
|
- Add GCS marking to some of the tests when target supports GCS
|
|
- Fix tst-ro-dynamic-mod.map linker script to avoid removing
|
|
GNU properties
|
|
- Add header with macros for GNU properties
|
|
|
|
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
|
|
|
|
diff --git a/elf/tst-asm-helper.h b/elf/tst-asm-helper.h
|
|
new file mode 100644
|
|
index 0000000000000000..6f91ac2ddc54d3f9
|
|
--- /dev/null
|
|
+++ b/elf/tst-asm-helper.h
|
|
@@ -0,0 +1,49 @@
|
|
+/* Test header that defines macros for GNU properties that need to be
|
|
+ used in some test assembly files where sysdep.h cannot be included
|
|
+ for some reason.
|
|
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
|
|
+ This file is part of the GNU C Library.
|
|
+
|
|
+ The GNU C Library is free software; you can redistribute it and/or
|
|
+ modify it under the terms of the GNU Lesser General Public
|
|
+ License as published by the Free Software Foundation; either
|
|
+ version 2.1 of the License, or (at your option) any later version.
|
|
+
|
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
+ Lesser General Public License for more details.
|
|
+
|
|
+ You should have received a copy of the GNU Lesser General Public
|
|
+ License along with the GNU C Library; if not, see
|
|
+ <https://www.gnu.org/licenses/>. */
|
|
+
|
|
+#include <config.h>
|
|
+
|
|
+/* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */
|
|
+#define FEATURE_1_AND 0xc0000000
|
|
+#define FEATURE_1_BTI 1
|
|
+#define FEATURE_1_PAC 2
|
|
+#define FEATURE_1_GCS 4
|
|
+
|
|
+/* Add a NT_GNU_PROPERTY_TYPE_0 note. */
|
|
+#define GNU_PROPERTY(type, value) \
|
|
+ .section .note.gnu.property, "a"; \
|
|
+ .p2align 3; \
|
|
+ .word 4; \
|
|
+ .word 16; \
|
|
+ .word 5; \
|
|
+ .asciz "GNU"; \
|
|
+ .word type; \
|
|
+ .word 4; \
|
|
+ .word value; \
|
|
+ .word 0; \
|
|
+ .text
|
|
+
|
|
+/* Add GNU property note with the supported features to all asm code
|
|
+ where sysdep.h is included. */
|
|
+#if HAVE_AARCH64_BTI && HAVE_AARCH64_PAC_RET
|
|
+GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC|FEATURE_1_GCS)
|
|
+#elif HAVE_AARCH64_BTI
|
|
+GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
|
|
+#endif
|
|
diff --git a/elf/tst-big-note-lib.S b/elf/tst-big-note-lib.S
|
|
index 5eb1e03cfbe2cee8..cfd31137e85a1335 100644
|
|
--- a/elf/tst-big-note-lib.S
|
|
+++ b/elf/tst-big-note-lib.S
|
|
@@ -20,6 +20,8 @@
|
|
On a typical Linux system with 8MiB "ulimit -s", that was enough
|
|
to trigger stack overflow in open_verify. */
|
|
|
|
+#include "tst-asm-helper.h"
|
|
+
|
|
#define NOTE_SIZE 8*1024*1024
|
|
|
|
.pushsection .note.big,"a"
|
|
diff --git a/elf/tst-ro-dynamic-mod.map b/elf/tst-ro-dynamic-mod.map
|
|
index 2fe4a2998cddd587..2a158480c07d9691 100644
|
|
--- a/elf/tst-ro-dynamic-mod.map
|
|
+++ b/elf/tst-ro-dynamic-mod.map
|
|
@@ -3,14 +3,13 @@ SECTIONS
|
|
. = SIZEOF_HEADERS;
|
|
.dynamic : { *(.dynamic) } :text :dynamic
|
|
.rodata : { *(.data*) *(.bss*) } :text
|
|
- /DISCARD/ : {
|
|
- *(.note.gnu.property)
|
|
- }
|
|
- .note : { *(.note.*) } :text :note
|
|
+ .note : { *(.note) } :text :note
|
|
+ .note.gnu.property : { *(.note.gnu.property) } :text :gnu_property
|
|
}
|
|
PHDRS
|
|
{
|
|
text PT_LOAD FLAGS(5) FILEHDR PHDRS;
|
|
dynamic PT_DYNAMIC FLAGS(4);
|
|
note PT_NOTE FLAGS(4);
|
|
+ gnu_property PT_GNU_PROPERTY FLAGS(4);
|
|
}
|
|
diff --git a/sysdeps/aarch64/tst-vpcs-mod.S b/sysdeps/aarch64/tst-vpcs-mod.S
|
|
index 19b01c3c3859e13b..b3b5824eda1fb076 100644
|
|
--- a/sysdeps/aarch64/tst-vpcs-mod.S
|
|
+++ b/sysdeps/aarch64/tst-vpcs-mod.S
|
|
@@ -17,6 +17,8 @@
|
|
License along with the GNU C Library. If not, see
|
|
<https://www.gnu.org/licenses/>. */
|
|
|
|
+#include "tst-asm-helper.h"
|
|
+
|
|
.variant_pcs vpcs_call
|
|
.global vpcs_call
|
|
.type vpcs_call, %function
|
|
@@ -121,7 +123,7 @@ vpcs_call_regs:
|
|
/* Emulate a BL using B, but save x30 before the branch. */
|
|
adr x30, .L_return_addr
|
|
stp x30, x29, [x1, 240]
|
|
- b vpcs_call
|
|
+ bl vpcs_call
|
|
.L_return_addr:
|
|
|
|
/* Restore callee-saved registers. */
|