From: Tulio Magno Quites Machado Filho Date: Wed, 14 Jun 2023 14:28:38 +0000 (-0300) Subject: s390x: Replace absolute jump for a relative one X-Git-Tag: VALGRIND_3_22_0~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a97c06080078aab8adfcc8985aecce7bfa5a738;p=thirdparty%2Fvalgrind.git s390x: Replace absolute jump for a relative one The bne instruction expects an absolute target address and it isn't best-suited for implementing a short range jump, such as the one in XCHG_M_R(). Replace it with jne which expects a relative address that can be correctly computed a link time. Interestingly, the jump is almost never taken. If it would, this would crash the test. However, linkers may complain when relacating the target address used in bne. --- diff --git a/helgrind/tests/tc11_XCHG.c b/helgrind/tests/tc11_XCHG.c index f6ff1c9846..08e34a0b57 100644 --- a/helgrind/tests/tc11_XCHG.c +++ b/helgrind/tests/tc11_XCHG.c @@ -81,7 +81,7 @@ __asm__ __volatile__( \ "0: l 0,%[global]\n\t" \ " cs 0,%[local],%[global]\n\t" \ - " bne 0b\n\t" \ + " jne 0b\n\t" \ " lr %[local],0\n\t" \ : /*out*/ [global]"+m"(_addr), [local]"+d"(_lval) \ : /*in*/ \