ftmemsim-valgrind/none/tests/s390x/exrl.stdout.exp
Andreas Arnez b77dbefe72 Bug 444242 - s390x: Sign-extend "relative long" offset in EXRL
In s390_irgen_EXRL, the offset is zero-extended instead of sign-extended,
typically causing Valgrind to crash when a negative offset occurs.

Fix this with a new helper function that calculates a "relative long"
address from a 32-bit offset.  Replace other calculations of "relative
long" addresses by invocations of this function as well.  And for
consistency, do the same with "relative" (short) addresses.
2021-10-28 15:08:20 +02:00

16 lines
482 B
Plaintext

------- Copy 10+1 bytes from buffer to target
------- EXRL to OR in the length
before: buffer = |0123456789abcdef|
before: target = |XXXXXXXXXXXXXXXX|
after: buffer = |0123456789abcdef|
after: target = |0123456789aXXXXX|
------- EXRL 0,... has no effect (writes out target)
target = |0123456789aXXXXX|
------- EXRL to OR in the syscall number (writes out target)
target = |0123456789aXXXXX|
------- EXRL with negative offset
target = |01010101010XXXXX|