mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
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.
16 lines
482 B
Plaintext
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|
|