[Lldb-commits] [PATCH] D101563: [lldb] [test] Extend aarch64-gp-read test to cover all registers
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 29 12:54:14 PDT 2021
mgorny created this revision.
mgorny added reviewers: labath, emaste, krytarowski, mstorsjo.
Herald added subscribers: danielkiss, kristof.beyls.
mgorny requested review of this revision.
Extend the general-purpose/vector register test for AArch64 to test
all regular registers rather than just the first eight. While this
might seem redundant, we've historically had a bug in reading a single
registers due to a typo.
While at it, use a single array of values for the test. I have
permitted myself to use a different values that were relatively easy
to generate via the following script:
for x in range(32):
print(' { ', end='')
for y in range(2):
print('0x', end='')
for z in range(8):
print('%02X' % (x+(1-y)*8+z), end='')
if y == 0:
print(', ', end='')
print(' },')
x8 is used as the special register to hold the data pointer, as this
is what clang is forcing on my system (and it should use it anyway since
it's the only register not in the clobber list), so it is overwritten
last. x29 (fp) is backed up on the stack. The stack pointer (x31)
is tested via pushing the respective value to the stack and then reading
it rather than modifying it directly.
https://reviews.llvm.org/D101563
Files:
lldb/test/Shell/Register/Inputs/aarch64-gp-read.cpp
lldb/test/Shell/Register/aarch64-gp-read.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101563.341613.patch
Type: text/x-patch
Size: 12314 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210429/6cffbbc5/attachment-0001.bin>
More information about the lldb-commits
mailing list