[Lldb-commits] [PATCH] D157000: [lldb][AArch64] Check SIMD save/restore in SVE SIMD test

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 30 02:59:53 PDT 2023


DavidSpickett marked an inline comment as done.
DavidSpickett added inline comments.


================
Comment at: lldb/test/API/commands/register/register/aarch64_sve_simd_registers/main.c:43
 
+void write_simd_regs_expr() {
+#define WRITE_SIMD(NUM)                                                        \
----------------
omjavaid wrote:
> There is subtle difference between write_simd_regs and write_simd_regs_expr. 
> 
> BTW, cant we avoid another function and just do something like
> 
> 
> ```
> #define WRITE_SIMD(NUM, I)                                                      \
>   asm volatile("MOV v" #NUM ".d[0], %0\n\t"                                     \
>                "MOV v" #NUM ".d[1], %0\n\t" ::"r"(NUM + I))
> ```
> 
Done. I also looked into some kind of for loop to generate the WRITE_SIMD but it ends up more complex and approaching the length of just repeating it anyway.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157000/new/

https://reviews.llvm.org/D157000



More information about the lldb-commits mailing list