[all-commits] [llvm/llvm-project] e96adf: [lldb][AArch64] Add testing for SME's ZA and SVG r...

David Spickett via All-commits all-commits at lists.llvm.org
Tue Sep 19 05:18:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e96adfd0dbcf84c27be2087371890f4228890609
      https://github.com/llvm/llvm-project/commit/e96adfd0dbcf84c27be2087371890f4228890609
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2023-09-19 (Tue, 19 Sep 2023)

  Changed paths:
    M lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py
    M lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py
    A lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/Makefile
    A lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py
    A lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/main.c
    A lldb/test/API/commands/register/register/aarch64_za_register/za_save_restore/Makefile
    A lldb/test/API/commands/register/register/aarch64_za_register/za_save_restore/TestZARegisterSaveRestore.py
    A lldb/test/API/commands/register/register/aarch64_za_register/za_save_restore/main.c

  Log Message:
  -----------
  [lldb][AArch64] Add testing for SME's ZA and SVG registers

An SME enabled program has the following extra state:
* Streaming mode or non-streaming mode.
* ZA enabled or disabled.
* The active vector length.

Covering the transition between all possible states and all other
possible states is not viable, therefore the testing added here is a cross
section of that, all of which found real bugs in LLDB and the Linux
Kernel during development.

Many of those transitions will not be possible via LLDB
(e.g. disabling ZA) and many more are possible but unlikely to be
used in normal use.

Added testing:
* TestSVEThreadedDynamic now checks for correct SVG values.
* New test TestZAThreadedDynamic creates 3 threads with different ZA sizes
  and states and switches between them verifying the register value
  (derived from the existing threaded SVE test).
* New test TestZARegisterSaveRestore starts in a given SME state, runs a
  set of expressions in various orders, then checks that the original
  state has been restored.
* TestArm64DynamicRegsets has ZA and SVG checks added, including writing
  to ZA to enable it.

Running these tests will as usual require QEMU as there is no
real SME hardware available at this time, and a very recent
kernel.

Reviewed By: omjavaid

Differential Revision: https://reviews.llvm.org/D159505




More information about the All-commits mailing list