Hi Alice, > AAPCS64* specifies several runtime support routines that must be > supported by any platform that supports SME. Add __arm_get_current_vg > to libgcc to help meet this requirement. This will be used to enable > support for SME without (non-streaming) SVE.
This looks OK, but a few comments below: +#include "aarch64-asm.h" + +/* Disable ZA. Call ABI: + - Private ZA, streaming-compatible. + - x1-x15, x19-x29, sp and fp regs are call preserved. x18 should be call-preserved too (we have no reason not to). + - Takes no argument. + - Returns the value of the current VG in x0 if this value exists, and + returns zero otherwise. */ + +HIDDEN (__aarch64_cpu_features) + +variant_pcs (__arm_get_current_vg) I guess this ends up in the dynamic libgcc? So this will go via the PLT... This is not a good design for many reasons. No need to fix this right now, but in the future we should either inline or statically link these small helper functions. This is OK with a comment here that variant_pcs ensures the PLT gets resolved at load-time so that the vector registers are corrupted... Cheers, Wilco
