This is the mail archive of the
mailing list for the glibc project.
[PATCH 0/3] aarch64: Update ld.so for vector abi
- From: rth at twiddle dot net
- To: libc-alpha at sourceware dot org
- Cc: marcus dot shawcroft at linaro dot org, szabolcs dot nagy at arm dot com, Richard Henderson <richard dot henderson at linaro dot org>
- Date: Wed, 1 Aug 2018 18:23:44 -0400
- Subject: [PATCH 0/3] aarch64: Update ld.so for vector abi
From: Richard Henderson <firstname.lastname@example.org>
There is a new calling convention defined for vectorized functions .
This is similar to what has happened for x86_64, where the original ABI
did not pass or preserve full vector contents, but then a new ABI is
defined that does.
There was an old patch for [BZ #15128] that saves full AdvSIMD registers
along _dl_runtime_resolve, but failed to do so for _dl_runtime_profile.
In the chatter for the BZ , Markus Shawcroft mentions that it should
save and restore d0-d7, which is indeed correct fro the original ABI.
It is not clear from the BZ why q0-q7 are saved instead.
That said, the new abi for AdvSIMD does use q0-q7.
When SVE is enabled, we need to save even more: z0-z7 plus p0-p3.
This fixes a number of minor issues with _dl_runtime_resolve itself,
and more major issues with _dl_runtime_profile before copying those
routines and making the modifications required for SVE.
I have *not* attempted to extend the <bits/link.h> interface for
the new ABI. This should be done with more discussion on list.
I have instead simply saved and restored registers as the abi
requires, so that the actual callee gets the correct data.
I have lightly tested this under QEMU, in that the new sve paths
pass the same glibc tests as the old paths.
Richard Henderson (3):
aarch64: Clean up _dl_runtime_resolve
aarch64: Clean up _dl_runtime_profile
aarch64: Save and restore SVE registers in ld.so
sysdeps/aarch64/dl-machine.h | 13 +-
sysdeps/aarch64/dl-trampoline.S | 531 +++++++++++++++++++++++++-------
2 files changed, 438 insertions(+), 106 deletions(-)