Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbdDJVxz (ORCPT ); Mon, 10 Apr 2017 17:53:55 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:42536 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbdDJVxx (ORCPT ); Mon, 10 Apr 2017 17:53:53 -0400 Date: Mon, 10 Apr 2017 22:53:36 +0100 From: Sergei Trofimovich To: SF Markus Elfring Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , Fenghua Yu , "H. J. Lu" , Tony Luck Subject: Re: [PATCH v3] ia64: fix module loading for gcc-5.4+ Message-ID: <20170410225336.5856d652@sf> In-Reply-To: References: <20170408195318.18080-1-slyfox@gentoo.org> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/WvVhLTJJ_SefDbpmjhBGQUU"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 41 --Sig_/WvVhLTJJ_SefDbpmjhBGQUU Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 10 Apr 2017 19:23:28 +0200 SF Markus Elfring wrote: > > - if (slot(insn) !=3D 2) { > > + if (slot(insn) !=3D 1 && slot(insn) !=3D 2) { =20 >=20 > + int const s =3D slot(insn); > + if (s < 1 || s > 2) { >=20 > Do run time characteristics matter for such a condition check here? It's done once at kernel module load time. My guess would be "not critical at all". slot() is a pure arithmetic static inline function. You can compare assembly output before and after your change. You can measure the difference yourself using 'ski' emulator. That's for example how I debugged and tested the patch: http://trofi.github.io/posts/199-ia64-machine-emulation.html --=20 Sergei --Sig_/WvVhLTJJ_SefDbpmjhBGQUU Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSZKa0VG5avZRlY01hxoe52YR/zqgUCWOv+4AAKCRBxoe52YR/z qu2tAJ9bTNRr0bZqMxqIFQbjwkRsRdQDggCdHGzPTv1ncLzi5gutUHyILTE4qRk= =S+Xn -----END PGP SIGNATURE----- --Sig_/WvVhLTJJ_SefDbpmjhBGQUU--