From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTPS id B01F43858405 for ; Tue, 9 Nov 2021 17:51:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B01F43858405 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-527-r-SSa85QNhWXUrgPRjeE9Q-1; Tue, 09 Nov 2021 12:51:08 -0500 X-MC-Unique: r-SSa85QNhWXUrgPRjeE9Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BD4C10168C3; Tue, 9 Nov 2021 17:51:07 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8765619C79; Tue, 9 Nov 2021 17:50:57 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Cc: Stefan Liebler , Nick Clifton , Arjun Shankar , Carlos O'Donell Subject: [PATCH] s390: Use long branches across object boundaries (jgh instead of jh) Date: Tue, 09 Nov 2021 18:50:55 +0100 Message-ID: <875yt19q0w.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2021 17:51:13 -0000 Depending on the layout chosen by the linker, the 16-bit displacement of the jh instruction is insufficient to reach the target label. Analysis of the linker failure was carried out by Nick Clifton. Tested on a z13 and z15, s390x-linux-gnu only. --- sysdeps/s390/memmem-arch13.S | 2 +- sysdeps/s390/strstr-arch13.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/s390/memmem-arch13.S b/sysdeps/s390/memmem-arch13.S index c5c8d8c97e..58df8cdb14 100644 --- a/sysdeps/s390/memmem-arch13.S +++ b/sysdeps/s390/memmem-arch13.S @@ -41,7 +41,7 @@ ENTRY(MEMMEM_ARCH13) # error The arch13 variant of memmem needs the z13 variant of memmem! # endif clgfi %r5,9 - jh MEMMEM_Z13 + jgh MEMMEM_Z13 aghik %r0,%r5,-1 /* vll needs highest index. */ bc 4,0(%r14) /* cc==1: return if needle-len == 0. */ diff --git a/sysdeps/s390/strstr-arch13.S b/sysdeps/s390/strstr-arch13.S index c7183e627c..222a6de91a 100644 --- a/sysdeps/s390/strstr-arch13.S +++ b/sysdeps/s390/strstr-arch13.S @@ -49,7 +49,7 @@ ENTRY(STRSTR_ARCH13) # error The arch13 variant of strstr needs the z13 variant of strstr! # endif clgfi %r4,9 - jh STRSTR_Z13 + jgh STRSTR_Z13 /* In case of a partial match, the vstrs instruction returns the index of the partial match in a vector-register. Then we have to