From nobody Thu Oct 2 13:01:36 2025 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27C2A27AC3A; Tue, 16 Sep 2025 13:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030493; cv=none; b=MxReaY8V8VbrpPvn/V989DZeMvY40GZIAdSh7b0YiyMTWzVUVze0BS18vSg2c6CvMwycECvu/DXcXhGGuDUrMEMPzbL+w2mpGxWsd4qYY5Zqu+VJ+owkrKrWxL4qi9sAiC3sxwCWzzZ2uqQFD8lkppmz9rmnsjn8vDq36BFrPjg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030493; c=relaxed/simple; bh=mIChQADrFvdeJeu6DZWUfpZDBh1EvHHrnubKVsPHeM4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FamaUvwEEwmXure+AM1R4AqQJ7kusziC5EDONqk+zfIc6L68dM7+tAD1/6E0vjY1+/39nMeCtgw/Fl1N/Qbg6cbOOhxUUncv/UT4eoL7+3/lOV0871S5pHV09pBV8EPklLXW8R1hb7mbjgqeI9kzNfNHpFg4pEwxREozsydYofU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=Cfrs5IVE; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Cfrs5IVE" Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58G6qmNL018974; Tue, 16 Sep 2025 13:48:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=reeu1MIHKddULkd+G dt4BuS/g6bvl9+/e+R2iL9I4SU=; b=Cfrs5IVE38znnBzZC/wxpgsoCJ+/vq7t6 BOEtB95l0GgmnPueJQrg6jtL6mlupMZmr3qptuUH9Rnmei/otM1xX+Mjwrp4homJ ZPI9C39jBuToRDjFa4XETiOLHF0V6nH/PPKJhPcUTYtKR2pGEyQ7Ep691qD75f7L DDj8muVXQU3F0ayIfiKoDmyofQLlNahYd+akg0KCR49bNvYL8g2rzODvkWq1//bI OD+a6yn/aavBE70QkPFcGtPB3ag79mRYsaPTNWXZrPpc9IhjwnIkK0J+EQIAY5ef EaavRih34oT763/Ws5teHivyimvIwoTjVda6n7GpfNW2AJYI4g/uw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 496gat7w7g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:09 +0000 (GMT) Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 58GDZGRZ028246; Tue, 16 Sep 2025 13:48:09 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 496gat7w7b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:09 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58GAxdh2027308; Tue, 16 Sep 2025 13:48:07 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 495men41mj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:07 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58GDm31c31982216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Sep 2025 13:48:03 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BF16E20040; Tue, 16 Sep 2025 13:48:03 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8DC772004F; Tue, 16 Sep 2025 13:48:03 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Sep 2025 13:48:03 +0000 (GMT) From: Heiko Carstens To: Nathan Chancellor , Miguel Ojeda , Kees Cook , Nick Desaulniers , Vasily Gorbik , Alexander Gordeev , Juergen Christ Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Sven Schnelle , Christian Borntraeger Subject: [PATCH v2 1/4] s390/bitops: Limit return value range of __flogr() Date: Tue, 16 Sep 2025 15:48:00 +0200 Message-ID: <20250916134803.874580-2-hca@linux.ibm.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250916134803.874580-1-hca@linux.ibm.com> References: <20250916134803.874580-1-hca@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=BKWzrEQG c=1 sm=1 tr=0 ts=68c96a99 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=yJojWOMRYYMA:10 a=VwQbUJbxAAAA:8 a=QyXUC8HyAAAA:8 a=VnNF1IyMAAAA:8 a=fcVQ0ljOBxUNAZwdbqMA:9 X-Proofpoint-GUID: CHne1l8WGi79rvOeE0gD_z1W7N15LDHN X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTE1MDA4NiBTYWx0ZWRfX5P9II0ZRgxIg yuT8Y5ZgK0VpyfBzfZlzv5PsIO6egJXrfrAd82Rw4lm5lTg8a7W7veu4ehopoRzOwH2OVpk4xU8 CvZDByhSj9VZr1WsIqdL/O2/tGJc9lvNjZEdoAUJTKJJfmNENe5XYpZpDMlAmW3A+G3um08t35l WPu5CSKj+MeKpr/cqxcq6hffoUy7AN/jt/q78KmKknaLnKopNhsKUj5QvmmW+aVEJkpmYyIPEKi dBz1zZcUkYm23QT5FywaYaPa3jAP+f4SwBsJBo83SwX9gXIDFgGlCxSItLGnpbaf/9GWTiK0Aiu OyWiBqugl1bhzE2V3haYkZKvN/ShfGLr181RmA1aVqm7UaPzgjFOFu6pdL5QbIp5LU4LmAQRL81 FTmQvHYj X-Proofpoint-ORIG-GUID: iyNvvkpR4w7dbz-KItc5tkMEf6y6poTc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-16_02,2025-09-12_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 adultscore=0 suspectscore=0 impostorscore=0 bulkscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509150086 Content-Type: text/plain; charset="utf-8" With the recent ffs() and ffs64() optimization a logical AND operation was removed, which allowed the compiler to tell the return value range of both functions. This may lead to compile warnings as reported by the kernel test robot: drivers/infiniband/hw/mlx5/mr.c: In function 'mlx5r_cache_create_ent_loc= ked': >> drivers/infiniband/hw/mlx5/mr.c:840:31: warning: 'sprintf' may write a t= erminating nul past the end of the destination [-Wformat-overflow=3D] 840 | sprintf(ent->name, "%d", order); | ^ In function 'mlx5_mkey_cache_debugfs_add_ent', inlined from 'mlx5r_cache_create_ent_locked' at drivers/infiniband/h= w/mlx5/mr.c:930:3: drivers/infiniband/hw/mlx5/mr.c:840:9: note: 'sprintf' output between 2 = and 5 bytes into a destination of size 4 840 | sprintf(ent->name, "%d", order); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add the AND operation again to address the warning. From a correctness point of view the AND operation is not necessary, however there is no other way to tell the compiler that the returned value of the flogr inline assembly is in the range of 0..64. This increases the kernel image size by 566 bytes (defconfig, gcc 15.2.0). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202508211859.UoYsJbLN-lkp@int= el.com/ Fixes: de88e74889a3 ("s390/bitops: Slightly optimize ffs() and fls64()") Suggested-by: Juergen Christ Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens --- arch/s390/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 56376b6ff809..a1dd72b16f54 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -169,7 +169,7 @@ static __always_inline unsigned char __flogr(unsigned l= ong word) asm volatile( " flogr %[rp],%[rp]\n" : [rp] "+d" (rp.pair) : : "cc"); - return rp.even; + return rp.even & 127; } } =20 --=20 2.48.1 From nobody Thu Oct 2 13:01:36 2025 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03E5A311C22; Tue, 16 Sep 2025 13:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030495; cv=none; b=ikv5FwXicm6EeRoOf8Iy++XA8STrjgpF/+V7PMVe3x8P8gptlx58c1LZLnb6wUCZIMdbXU80Kos6Phq04o78idvxsz/RaJzNP41aVvNBSqSiRB+H8a7FnGjtbW4NoKt82uHIlo6ptbI0KRiIKyQs5WEjm9HvzINiRntHSxfToM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030495; c=relaxed/simple; bh=a+56aum91H7TC6NjgT2qGSwt0mf5qEDaJLI+TNpSFuA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g71ukwnVpra94Wm3DtdSPmZjLOZAkUm9FsrqKRVCiiftoCmn8pTNl3beSbna8IejQpudFA/YdexXz3MBcKhwR7EyPVASEqII51uBu8ZpNZ70wjwlrLz5D1kFyx+e0HrefT+W6mQR5KthFOhrkn96RU/WQd+nxxUkPc3S5ks6SKM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=A7HnP3kS; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="A7HnP3kS" Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58G5fxJu003218; Tue, 16 Sep 2025 13:48:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=Qgg+JZ+RGKz7+EiWK WifKsLu8WghMf0jUnupi9hkrus=; b=A7HnP3kSRBNDBIJwN4pcS7+GDSE7nsN6w Xcs/DheYjuCYJXT82+JPivloKIpYz0MHeIuHbOMyojwECBbe7VMqFHiIxI6U3Gp3 WoMblUtBknoaGkJc9HbIsVHtDikK80L8K1aaYjaLc4c7UE13RuYQtp98lO3Kp+5D ESOJSJOCHJtlznG0yike2B+lGZ9rrgUHO6X3PrDnUxSFaFyq3fmM/MxqIBE3fvcF +MEM+Ny0h0W/YNc67S1oZzmJIb25a/oSYuWDMfTo2ZDnrB4HdkxJVeTWmwmsNktW 0/F/0X1F7Jetn+YFUycn+qB2VfWG8gjVQs8js4nSPtdL/G7iQgLIA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 494y1x8kgk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:10 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 58GDeIsQ001761; Tue, 16 Sep 2025 13:48:09 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 494y1x8kgj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:09 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58GAuUd6027268; Tue, 16 Sep 2025 13:48:09 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 495men41mm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:09 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58GDm4hd62325098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Sep 2025 13:48:04 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 050C820040; Tue, 16 Sep 2025 13:48:04 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C57D12004E; Tue, 16 Sep 2025 13:48:03 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Sep 2025 13:48:03 +0000 (GMT) From: Heiko Carstens To: Nathan Chancellor , Miguel Ojeda , Kees Cook , Nick Desaulniers , Vasily Gorbik , Alexander Gordeev , Juergen Christ Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Sven Schnelle , Christian Borntraeger Subject: [PATCH v2 2/4] compiler_types: Add __assume macro Date: Tue, 16 Sep 2025 15:48:01 +0200 Message-ID: <20250916134803.874580-3-hca@linux.ibm.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250916134803.874580-1-hca@linux.ibm.com> References: <20250916134803.874580-1-hca@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTEzMDAxMCBTYWx0ZWRfXzIVDI/K1dnhu 9YK+M7lMnsHcwG8qXY/bnKEehEYxtVzZCGwzNEefndVly05GQTT4CjLFL246TxUbbYyNvRXzPzI fpsjeozYOUJsh7r5VQZpaD/iGgjqH6+esi/4aAgJ1nowpSnHySkm3LXxnSRURGejZ3X76bDKW5C 3EwWRD0f2u61bTpYNRJa7WxLP2Ejs1CgLqf8SsLWgX5ArK/68YDEFbn+yKbVx6ifYeLoCe+e3Mf C7mOqwH9CsPClX29xf5a52nnyNyzLd/XNkmJH5NhXdzk5mXw/wysG82wl/ThsXvT3v9uiUt/twJ gYHILeQWOo+mCQpF6/RS3S7jWJ4rqFp4Xh6TfW6Tgr+VCqwB/DZgZU+715zbqti0TbolEliS3oi dcage9LS X-Proofpoint-ORIG-GUID: gFGOrD1Th7obFOwU-THP8epixAo_zwHH X-Authority-Analysis: v=2.4 cv=euPfzppX c=1 sm=1 tr=0 ts=68c96a9a cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=yJojWOMRYYMA:10 a=mDV3o1hIAAAA:8 a=Twlkf-z8AAAA:8 a=NEAV23lmAAAA:8 a=VnNF1IyMAAAA:8 a=MHpFcgiKDtP6AC432MUA:9 a=ppDDjHLidN0A:10 a=yTjAz9eSMYQA:10 a=-74SuR6ZdpOK_LpdRCUo:22 X-Proofpoint-GUID: Dje0A4EMYP8Trpvu3o_DqOOxUIosxKRA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-16_02,2025-09-12_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 suspectscore=0 spamscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509130010 Content-Type: text/plain; charset="utf-8" Make the statement attribute "assume" with a new __assume macro available. The assume attribute is used to indicate that a certain condition is assumed to be true. Compilers may or may not use this indication to generate optimized code. If this condition is violated at runtime, the behavior is undefined. Note that the clang documentation states that optimizers may react differently to this attribute, and this may even have a negative performance impact. Therefore this attribute should be used with care. Signed-off-by: Heiko Carstens Reviewed-by: Nathan Chancellor --- include/linux/compiler_types.h | 23 +++++++++++++++++++++++ init/Kconfig | 10 ++++++++++ 2 files changed, 33 insertions(+) diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index a910f9fa5341..41c16fb8eb40 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -329,6 +329,29 @@ struct ftrace_likely_data { #define __no_sanitize_or_inline __always_inline #endif =20 +/* + * The assume attribute is used to indicate that a certain condition is + * assumed to be true. If this condition is violated at runtime, the behav= ior + * is undefined. Compilers may or may not use this indication to generate + * optimized code. + * + * Note that the clang documentation states that optimizers may react + * differently to this attribute, and this may even have a negative + * performance impact. Therefore this attribute should be used with care. + * + * Optional: only supported since gcc >=3D 13 + * Optional: only supported since clang >=3D 19 + * + * gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#ind= ex-assume-statement-attribute + * clang: https://clang.llvm.org/docs/AttributeReference.html#id13 + * + */ +#ifdef CONFIG_CC_HAS_ASSUME +# define __assume(expr) __attribute__((__assume__(expr))) +#else +# define __assume(expr) +#endif + /* * Optional: only supported since gcc >=3D 15 * Optional: only supported since clang >=3D 18 diff --git a/init/Kconfig b/init/Kconfig index 59ae2b967195..935eff59af97 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -112,6 +112,16 @@ config TOOLS_SUPPORT_RELR config CC_HAS_ASM_INLINE def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x = c - -c -o /dev/null) =20 +config CC_HAS_ASSUME + bool + # clang needs to be at least 19.1.0 since the meaning of the assume + # attribute changed: + # https://github.com/llvm/llvm-project/commit/c44fa3e8a9a44c2e9a575768a3c= 185354b9f6c17 + default y if CC_IS_CLANG && CLANG_VERSION >=3D 190100 + # supported since gcc 13.1.0 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106654 + default y if CC_IS_GCC && GCC_VERSION >=3D 130100 + config CC_HAS_NO_PROFILE_FN_ATTR def_bool $(success,echo '__attribute__((no_profile_instrument_function)) = int x();' | $(CC) -x c - -c -o /dev/null -Werror) =20 --=20 2.48.1 From nobody Thu Oct 2 13:01:36 2025 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E87872DC32C; Tue, 16 Sep 2025 13:48:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030494; cv=none; b=tnUEfpgBRqerQXQuXmMB4RFe+Y6k82kK9fK4WyqseDum5MLXTCHbRsEjf7J7CdoajJ37nWz1TevHOU7ScMQnKMNstt5bU2P2Nim2CUgOkewaEGcgVlpvau/vjaYX7B6mfrOlUFAXShwVQF4nSbDdhsS4tZDiGErhbIiipjLxnM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030494; c=relaxed/simple; bh=6Te0A/HxYb2Wmmqfbdsc/Ho4Azn1wnefUl8kPiuBKBc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VFzxSZHrVK00aWUnwt8ssRwjaQ4SIu9fBab2O1XbwUxexpGQVGmadnm1UyVAbq+/yhTNHLsJUg+eO86XSd196li5t6IXj2emNFUQo5fFO7ucb/rcLybif/Cf1zOGmdyCRRSsvN8llsowY9c3TPmpbpcPd+X/QoUl5J+cbaetGf0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=buhrPN73; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="buhrPN73" Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58GCexVW024184; Tue, 16 Sep 2025 13:48:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=EHXEDI2WgkqNo0RKN slt7Uqa08bTL1E7gZv7NNEuB4E=; b=buhrPN73a5veN7tASqNtoi5fyEdJfKrbi EfPty1VIQwsVlQuZaBigVfVu5IO5SlBltVFalwu8+ikPqkg7mxvP20zkU4lIqUpI jf4PslOmhoURuMXuR7YM6tgsgczqv+GzLf83bQyjoSWjbVMfjoqvh9odB8LahNBc QBXK6e92317tFhoBf703rdtr3J58se24ck+FkV1K1vclvLIeILIGujfJ0+/f5/Eu Sa5j58tJhQdfPzTxsJcf1GM8d2KVO0lmB5JZUdpg78G0FXbEtGiA+R0fqKolEZHk b+mls26aw0MO4tNLonrNorOMXkbujnUy/GPKQw0xz/CVZ5lcqPGag== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 496avnsg0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:10 +0000 (GMT) Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 58GDYLLY015867; Tue, 16 Sep 2025 13:48:09 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 496avnsg0t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:09 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58GA01HX005940; Tue, 16 Sep 2025 13:48:09 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 495jxu4aaf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:07 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58GDm42A61211058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Sep 2025 13:48:04 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3CB4B2004B; Tue, 16 Sep 2025 13:48:04 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0B15720043; Tue, 16 Sep 2025 13:48:04 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Sep 2025 13:48:03 +0000 (GMT) From: Heiko Carstens To: Nathan Chancellor , Miguel Ojeda , Kees Cook , Nick Desaulniers , Vasily Gorbik , Alexander Gordeev , Juergen Christ Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Sven Schnelle , Christian Borntraeger Subject: [PATCH v2 3/4] s390/bitops: Use __assume() for __flogr() inline assembly return value Date: Tue, 16 Sep 2025 15:48:02 +0200 Message-ID: <20250916134803.874580-4-hca@linux.ibm.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250916134803.874580-1-hca@linux.ibm.com> References: <20250916134803.874580-1-hca@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: d2Lu6QABVV3NnEJxsGYgiwh7t09f_DcZ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTE1MDAyOCBTYWx0ZWRfX+TRxmcBOLB6C 3WDBP9a5kQC0yB/oXvVIwCUo1UXLpQEc4YqbB1qilrlIBjNP7Usb32J7CBYj6ytKtO+HfPc1F87 s6JN+E6OAYjExFFIYWSnBAeZLv0rW6lqjQiIlQpXK+SSiAsNzLyr4gHsaNvRxweNJnZ58ZKM+gV bcsT44tFPCJuESku1cENID3kegZNXzES6+kWV0jP5Ekbrr4vENwcJs2owcGJQWcszBwiVE+uYJZ rmIiLr6Je/LLCqkRmvdbkJ9QP9/oaefgCTHggxXSNNRCqFeUEv97Pk/uhyh/yW8dcpR44BPkCGm XR+bVw52GdxDxdI7DFd2DDo5UG7ifcCFoY7jv6M7epnPL1ZKQOw7bFPtaCsJw5D9U3tpURijWK+ D2nHLWuq X-Authority-Analysis: v=2.4 cv=HecUTjE8 c=1 sm=1 tr=0 ts=68c96a9a cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=yJojWOMRYYMA:10 a=VnNF1IyMAAAA:8 a=fHZr4GHcFT0B1fRYICcA:9 X-Proofpoint-GUID: eCI8pRIXPvwHEdp8DKYjxpFruzMBOuJn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-16_02,2025-09-12_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 bulkscore=0 impostorscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509150028 Content-Type: text/plain; charset="utf-8" Use __assume() to tell compilers that the output operand of the __flogr() inline assembly contains a value in the range of 0..64. This allows to optimize the logical AND operation away. This reduces the kernel image size by 2804 bytes (defconfig, gcc 15.2.0). Suggested-by: Juergen Christ Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens --- arch/s390/include/asm/bitops.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index a1dd72b16f54..5ff069fe9526 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -132,9 +132,10 @@ static inline bool test_bit_inv(unsigned long nr, */ static __always_inline unsigned char __flogr(unsigned long word) { - if (__builtin_constant_p(word)) { - unsigned long bit =3D 0; + unsigned long bit; =20 + if (__builtin_constant_p(word)) { + bit =3D 0; if (!word) return 64; if (!(word & 0xffffffff00000000UL)) { @@ -169,7 +170,14 @@ static __always_inline unsigned char __flogr(unsigned = long word) asm volatile( " flogr %[rp],%[rp]\n" : [rp] "+d" (rp.pair) : : "cc"); - return rp.even & 127; + bit =3D rp.even; + /* + * The result of the flogr instruction is a value in the range + * of 0..64. Let the compiler know that the AND operation can + * be optimized away. + */ + __assume(bit <=3D 64); + return bit & 127; } } =20 --=20 2.48.1 From nobody Thu Oct 2 13:01:36 2025 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D72E314A62; Tue, 16 Sep 2025 13:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030495; cv=none; b=LDTFs7LsSQaW5vODGwrgfFnzzx+bYJ7UfB9ivybmdqDhhQRNOHZBqQytY6qMANjFWV9JhcfhpgRkBXNJHTBLKugi9Tbt3zxMnVD44/CslYr1xiTduDg1eBbZ8ZlFmrVWChGDzIWAuf+J2iB90NQ+Zfe3/cX2DT4UMZOtyPPGyYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758030495; c=relaxed/simple; bh=EGoRHm1AjdpF4qXWjotViM/Oqd6Csf2a+j9muOz8+oY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c7j5qfVLxGdzAhMucLDtFFmN9d3fJqRSfPzFYklOp8WZSo2IG+eVhAm9Zq5i8CazEWVTWTK7+8mhsUdBZpL/XYpnE2RNk28knQ7pLdwA1Iijwu0Z68p5amSWAT4P+J938ENYtNbyyesUvEq2edXrjyoy19pDhPK8ZdJlan62tFc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=Mvv+TWpc; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Mvv+TWpc" Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58G6WECw018938; Tue, 16 Sep 2025 13:48:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=GZWixmiRGJYwZ6gnK KhMrk/ZZIF2LkvvtIFicnLWZSI=; b=Mvv+TWpcGH0LN/uSwaAPNfFQif1X6oBVH o3xXnJVhrqPlMt4J3SKP9CocGQDZqN1MBqOdfzp2LT32BZmBv6HAQhpkvdN+Vq2O lgnLRxCk5LabP/mkWuNs72gk2L3YIvDHejJnLsljM8ETDy8WZ6BY2buk77WWIxqc ODv2xhlLAy8u/P7+17KgYNFznEDyFzmQuLoZqtqh/ac850HgPftAHEXJVp5jkkxy TfmhvyWLFB//MxV/Ybqv55nHv9UheJhxCq9DBpQWPJd2R5ShoKVnOVgPPbryYcFC ub2qdcAwiUqd4R/fgakeu8A9bYXfPaAZt/oDg8fyXGypL3Ae2K8pQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 496gat7w7k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:10 +0000 (GMT) Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 58GDFuKB020217; Tue, 16 Sep 2025 13:48:09 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 496gat7w7f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:09 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58GAMqMr022297; Tue, 16 Sep 2025 13:48:08 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 495kxpm44p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Sep 2025 13:48:08 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58GDm4lu61800848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Sep 2025 13:48:04 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 732962004B; Tue, 16 Sep 2025 13:48:04 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 43A5C2004E; Tue, 16 Sep 2025 13:48:04 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 Sep 2025 13:48:04 +0000 (GMT) From: Heiko Carstens To: Nathan Chancellor , Miguel Ojeda , Kees Cook , Nick Desaulniers , Vasily Gorbik , Alexander Gordeev , Juergen Christ Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Sven Schnelle , Christian Borntraeger Subject: [PATCH v2 4/4] s390/bitops: Cleanup __flogr() Date: Tue, 16 Sep 2025 15:48:03 +0200 Message-ID: <20250916134803.874580-5-hca@linux.ibm.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250916134803.874580-1-hca@linux.ibm.com> References: <20250916134803.874580-1-hca@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=BKWzrEQG c=1 sm=1 tr=0 ts=68c96a9a cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=yJojWOMRYYMA:10 a=VnNF1IyMAAAA:8 a=WNZe2jjSjyEjSw6ZzqkA:9 X-Proofpoint-GUID: Gt8n49tE_-xJqXxB-bNjnwxnk47POVex X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTE1MDA4NiBTYWx0ZWRfX2HGr8igbeyNB GRIwXDJXUzo6aRUG36MI1G02Tp3zsXbQ2iElLry3cNM/6afuM9f1plehbUI52g5ffSyD8Q6k1Q5 BdYdAuOSugtxk2BlYD3ZVsY5PI45ol03qpn8IWhrZedFlkGbrTzqQYeKtnifBEQ05meRDhCv7s3 3R4NIFKutfMYrvKCYkeKfv2bQ14VCoTXh/lz1ykEvGZZngDrqzV+z0kAX2C1cNKsuRcdeHNp6EA ZvqkJGgUpqDj/iD9w4tJN4Q8rAqnCAFJITyGzEskPCpHDMgpn/k9dEoHO70siJC6PAH6F1p6/yf Qa44fTgceTgIy69sFLSE341cPOleE2NEkLCqdW95whiNuW5smKYeDjupXmPhCf7zNcIyPrJthC2 BTe/mcNP X-Proofpoint-ORIG-GUID: w-Dvi7ZrPluW_AOxAnObND3DaTwvTrDr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-16_02,2025-09-12_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 adultscore=0 suspectscore=0 impostorscore=0 bulkscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509150086 Content-Type: text/plain; charset="utf-8" The flogr() inline assembly has no side effects and generates the same output if the input does not change. Therefore remove the volatile qualifier to allow the compiler to optimize the inline assembly away, if possible. Also remove the superfluous '\n' which makes the inline assembly appear larger than it is according to compiler heuristics (number of lines). Furthermore change the return type of flogr() to unsigned long and add the const attribute to the function. This reduces the kernel image size by 994 bytes (defconfig, gcc 15.2.0). Suggested-by: Juergen Christ Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens --- arch/s390/include/asm/bitops.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 5ff069fe9526..0908bab20d7f 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -130,7 +130,7 @@ static inline bool test_bit_inv(unsigned long nr, * where the most significant bit has bit number 0. * If no bit is set this function returns 64. */ -static __always_inline unsigned char __flogr(unsigned long word) +static __always_inline __attribute_const__ unsigned long __flogr(unsigned = long word) { unsigned long bit; =20 @@ -167,9 +167,8 @@ static __always_inline unsigned char __flogr(unsigned l= ong word) union register_pair rp __uninitialized; =20 rp.even =3D word; - asm volatile( - " flogr %[rp],%[rp]\n" - : [rp] "+d" (rp.pair) : : "cc"); + asm("flogr %[rp],%[rp]" + : [rp] "+d" (rp.pair) : : "cc"); bit =3D rp.even; /* * The result of the flogr instruction is a value in the range --=20 2.48.1