[Lldb-commits] [PATCH] D61072: [lldb] [lit] Add tests for reading new x86_64 registers

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 25 09:34:09 PDT 2019

labath added inline comments.

Comment at: lldb/lit/Register/Inputs/x86-64-read.cpp:8
+int main() {
+  uint64_t r8 = 0x0102030405060708;
+  uint64_t r9 = 0x1112131415161718;
mgorny wrote:
> labath wrote:
> > what do you think about including r0-r7 too? They're of different sizes on x86 vs x86_64, so I don't think we'll be able to have a single test which would work on both arches.
> Do you mean RAX, RBX, etc.? Yeah, I suppose I can do that.
Yep, those. %rip might be interesting too. I mean, it's so fundamental that we're bound to notice if reading it ever breaks, but it might be nice to have an test which clearly indicates what the problem is. You'll probably have a hard time setting it to  a known value, but you might be able to test it via relationship with some other registers (e.g. %rax == (%rip << 32) & (%rip >> 32)).



More information about the lldb-commits mailing list