When executing under EX or EXRL, some instructions yield wrong results
under Valgrind. This affects
* PC-relative instructions such as LARL or BRC
* instructions that set a link register, such as BASR
The issue is caused by confusions about the various instruction addresses
involved. When executing an instruction under EX or EXRL, the following
addresses are relevant:
(1) The address of the execute instruction (guest_IA_curr_instr). This is
needed when restarting the instruction or iterating over it.
(2) The address following the execute instruction (guest_IA_next_instr).
This is what a link register needs to be set to.
(3) The address of the target instruction. This is the base for relative
addressing.
The latter isn't handled at all when translating for EX/EXRL. And the
instructions that set a link register don't use guest_IA_next_instr, but
add their own instruction length to guest_IA_curr_instr. This is wrong
whenever the target instruction and the EX/EXRL instruction have different
lengths.
Fix all this and enhance the test cases accordingly. The updated test
cases fail before this patch and succeed afterwards.