Author: David Spickett Date: 2023-09-19T08:51:37Z New Revision: 91f46ece9efca7a1109b5837a1b24f2a251bb0cc
URL: https://github.com/llvm/llvm-project/commit/91f46ece9efca7a1109b5837a1b24f2a251bb0cc DIFF: https://github.com/llvm/llvm-project/commit/91f46ece9efca7a1109b5837a1b24f2a251bb0cc.diff LOG: [lldb][AArch64] Document how to control the SVE/SSVE tests A lot of these use defines that I made up for this purpose, which is not obvious at first glance. Document that at the top of each file. Added: Modified: lldb/test/API/commands/register/register/aarch64_dynamic_regset/main.c lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/main.c lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/main.c lldb/test/API/commands/register/register/aarch64_sve_simd_registers/main.c Removed: ################################################################################ diff --git a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/main.c b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/main.c index b8db8852b8ed51a..93100f01502f8ba 100644 --- a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/main.c +++ b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/main.c @@ -1,5 +1,9 @@ #include <sys/auxv.h> +// If this program receives 0 arguments, it will use non-streaming SVE +// registers. If the number of arguments is >= 1, it will use streaming SVE +// registers. + #ifndef HWCAP2_SME #define HWCAP2_SME (1 << 23) #endif diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/main.c b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/main.c index 0bb6b3b57046f89..d126f8d75fb0c7c 100644 --- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/main.c +++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/main.c @@ -2,6 +2,9 @@ #include <stdbool.h> #include <sys/prctl.h> +// If USE_SSVE is defined, this program will use streaming mode SVE registers +// instead of non-streaming mode SVE registers. + #ifndef PR_SME_SET_VL #define PR_SME_SET_VL 63 #endif diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/main.c b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/main.c index b4623fe12725a2a..b07fb62ed85b74c 100644 --- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/main.c +++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/main.c @@ -1,6 +1,10 @@ #include <stdbool.h> #include <sys/prctl.h> +// If START_SSVE is defined, this program will start in streaming SVE mode +// (it will later enter and exit streaming mode a few times). Otherwise, it +// will start in non-streaming SVE mode. + #ifndef PR_SME_SET_VL #define PR_SME_SET_VL 63 #endif diff --git a/lldb/test/API/commands/register/register/aarch64_sve_simd_registers/main.c b/lldb/test/API/commands/register/register/aarch64_sve_simd_registers/main.c index 2156f094cab5c5f..0a05a9a5a59de17 100644 --- a/lldb/test/API/commands/register/register/aarch64_sve_simd_registers/main.c +++ b/lldb/test/API/commands/register/register/aarch64_sve_simd_registers/main.c @@ -1,6 +1,16 @@ #include <stdint.h> #include <sys/prctl.h> +// If SSVE is defined, this program will start in streaming SVE mode. Otherwise, +// if SVE is defined, it will start in non-streaming mode and activate the SVE +// registers by writing to one of them. If neither SSVE or SVE are defined, +// the program will start in non-streaming mode, with the SVE registers +// inactive. +// +// For most programs the diff erence between inactive non-streaming SVE and +// active is transparent. For lldb, there are some diff erences in how we use +// ptrace in either scenario. + // base is added to each value. If base = 2, then v0 = 2, v1 = 3, etc. void write_simd_regs(unsigned base) { #define WRITE_SIMD(NUM) \ _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits