// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2021 ARM Limited * * Verify that the SVE register context in signal frames is set up as * expected.
*/
if (prctl(PR_SVE_SET_VL, vl) == -1) {
fprintf(stderr, "Failed to set VL\n"); return1;
}
/* * Get a signal context which should have a SVE frame and registers * in it.
*/
setup_sve_regs(); if (!get_current_context(td, &context.uc, sizeof(context))) return1;
head = get_header(head, SVE_MAGIC, GET_BUF_RESV_SIZE(context),
&offset); if (!head) {
fprintf(stderr, "No SVE context\n"); return1;
}
sve = (struct sve_context *)head; if (sve->vl != vl) {
fprintf(stderr, "Got VL %d, expected %d\n", sve->vl, vl); return1;
}
/* The actual size validation is done in get_current_context() */
fprintf(stderr, "Got expected size %u and VL %d\n",
head->size, sve->vl);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.