Add:
- EmulateInstructionRISCV, which can be used for riscv32 and riscv64.
- Add unittests for EmulateInstructionRISCV.
Note: Compressed instructions set (RVC) was still not supported in this patch.
Differential D131759
[LLDB][RISCV] Make software single stepping work Emmmer on Aug 12 2022, 3:44 AM. Authored by
Details Add:
Note: Compressed instructions set (RVC) was still not supported in this patch.
Diff Detail
Event TimelineComment Actions Initial reactions, since I won't get time to review this today.
I know that ARM has tests for EmulateInstructionARM, and I would like to know this is tested. Either the way that does it or with unittests.
Are these two generic changes (not specific to riscv)? If so can you make a patch for each. If it can be tested as well then great, if it's some theoretical corner case then should be fine without. I presume that with this change a bunch of tests started passing? Would be good to summarise that in the commit message. "after this change a further N tests that use single stepping now pass". Comment Actions Address review comments:
Comment Actions I know this is a flood of comments but the overall impression is that this is mostly fine. A bunch of small things. Thanks for splitting out the other patches and adding the test cases here.
Comment Actions Oh and please note in the commit message that this does not support compressed instructions (or does it, I assume no but make it obvious).
Comment Actions Are we expecting this code to only ever be given JAL or JALR at this time? If it's the case that anything else will just return false or do nothing, might be worth adding a couple of tests that check that encodings that aren't branches just do nothing or fail. Obviously not every encoding maybe just flip 1 bit in the instruction type field just as a smoke test for each of jal and jalr.
|
You have 2 public markers in the same class with no private between them. Intentional?