[Lldb-commits] [PATCH] D101563: [lldb] [test] Extend aarch64-gp-read test to cover all registers
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon May 3 03:46:25 PDT 2021
mstorsjo added inline comments.
================
Comment at: lldb/test/Shell/Register/Inputs/aarch64-gp-read.cpp:57
+ "ldr x0, [%0, #248]\n\t"
+ "stp x29, x0, [sp, #-16]\n\t"
+ "\n\t"
----------------
I'm not quite sure what this bit actually tests, with regards to inspecting registers - as it loads a value to a simple register and writes it somewhere else. I guess the thing it tests is expressions involving `$sp` though?
I guess that's fine but it'd be nice to have it spelled out a bit clearer about the aspect that it actually tests.
================
Comment at: lldb/test/Shell/Register/Inputs/aarch64-gp-read.cpp:67
+ "ldp x16, x17, [%0, #128]\n\t"
+ "ldp x18, x19, [%0, #144]\n\t"
+ "ldp x20, x21, [%0, #160]\n\t"
----------------
You're not allowed to clobber x18 on windows (and on darwin, but it's less fatal there).
Building this for windows gives this warning:
```
<inline asm>:1:1: warning: inline asm clobber list contains reserved registers: X18
ld1 {v0.2d, v1.2d, v2.2d, v3.2d}, [x8], #64
^^^^^^^^
<inline asm>:1:1: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
ld1 {v0.2d, v1.2d, v2.2d, v3.2d}, [x8], #64
^^^^^^^^
```
And after overwriting x18, things fail when we try to stop for the breakpoint.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101563/new/
https://reviews.llvm.org/D101563
More information about the lldb-commits
mailing list