diff options
| author | David Spickett <david.spickett@linaro.org> | 2023-09-19 08:50:09 +0000 |
|---|---|---|
| committer | David Spickett <david.spickett@linaro.org> | 2023-09-19 08:51:37 +0000 |
| commit | 91f46ece9efca7a1109b5837a1b24f2a251bb0cc (patch) | |
| tree | c21032a9ab516f422a7bbbe065dd44d276d7bd17 | |
| parent | 2616c279d5a97a7d9aa7b9972d8dc06dafddc2c7 (diff) | |
| download | llvm-91f46ece9efca7a1109b5837a1b24f2a251bb0cc.zip llvm-91f46ece9efca7a1109b5837a1b24f2a251bb0cc.tar.gz llvm-91f46ece9efca7a1109b5837a1b24f2a251bb0cc.tar.bz2 | |
[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.
4 files changed, 21 insertions, 0 deletions
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 b8db885..93100f0 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 0bb6b3b..d126f8d 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 b4623fe1..b07fb62 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 2156f09..0a05a9a 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 difference between inactive non-streaming SVE and +// active is transparent. For lldb, there are some differences 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) \ |
