From nobody Thu Jul 10 01:00:07 2025 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=ispras.ru ARC-Seal: i=1; a=rsa-sha256; t=1674544420; cv=none; d=zohomail.com; s=zohoarc; b=KCGXewd1S3Ar+vEWGVtB4xqnnpeVPHmNe6h9aErJiGV/22qLOgSK528H+Ud03j5YS30J6WBxedHF1BpH4/+FZT5BRGbvJHZtVzKQT4k6v2zLuURjz1ar/WKByL5kTqQ8XXJL+0iladR+N8PVAjX5yd7r7gSZWJbklj4sUpaPNxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674544420; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L2I13tbYa5Ch2qZ3iY2YZciKmcqbiZeNs3i8OALiDUg=; b=XIyoHs2wkQ8wjvmUZ3l1hSSeSZw3fRl5HSwDjwpiXwhsqy6wBOoF8Q6q5xRmfIOKtpbC8CRvVcYnMjB7lSy/8HTOetSxrPlVljQ+Cu/NZmiKestoymVdULcryWMsgscAdECBFyRqQFqYKBrD5R62jtZ7PbygUe5BNk8gHYNAFl4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1674544420488343.9896707212457; Mon, 23 Jan 2023 23:13:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKDUb-0003kh-TM; Tue, 24 Jan 2023 02:13:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKDUP-0003LM-EZ for qemu-devel@nongnu.org; Tue, 24 Jan 2023 02:13:06 -0500 Received: from mail.ispras.ru ([83.149.199.84]) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKDUN-0002il-Aj for qemu-devel@nongnu.org; Tue, 24 Jan 2023 02:13:04 -0500 Received: from [127.0.1.1] (unknown [85.142.117.226]) by mail.ispras.ru (Postfix) with ESMTPSA id 1D5BB44C101F; Tue, 24 Jan 2023 07:12:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 1D5BB44C101F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1674544360; bh=L2I13tbYa5Ch2qZ3iY2YZciKmcqbiZeNs3i8OALiDUg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Ecjn/or3FP/1HmPYN0CPybzXrf3G385ALVbmie4FeWiib8W1b8RmXuGhp/JkzB0VF zz755twWwFuHC21pDUdpotgXFYZ+InP0kKyCo/e1t1scWKeg1n9tToRxzDhhzGOdZr FrgvYvp0+X4Py+iXPV+7kVJ6gAsyhdbobxb240FU= Subject: [PATCH v2 3/5] target/avr: fix avr features processing From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Cc: pavel.dovgalyuk@ispras.ru, mrolnik@gmail.com, philmd@linaro.org, richard.henderson@linaro.org Date: Tue, 24 Jan 2023 10:12:39 +0300 Message-ID: <167454435991.3686700.16133135311878315725.stgit@pasha-ThinkPad-X280> In-Reply-To: <167454434356.3686700.6888237867240722060.stgit@pasha-ThinkPad-X280> References: <167454434356.3686700.6888237867240722060.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=83.149.199.84; envelope-from=pavel.dovgalyuk@ispras.ru; helo=mail.ispras.ru X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ispras.ru) X-ZM-MESSAGEID: 1674544421615100001 Bit vector for features has 64 bits. This patch fixes bit shifts in avr_feature and set_avr_feature functions to be 64-bit too. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/avr/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/cpu.h b/target/avr/cpu.h index 7c3895b65e..280edc495b 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -166,12 +166,12 @@ vaddr avr_cpu_gdb_adjust_breakpoint(CPUState *cpu, va= ddr addr); =20 static inline int avr_feature(CPUAVRState *env, AVRFeature feature) { - return (env->features & (1U << feature)) !=3D 0; + return (env->features & (1ULL << feature)) !=3D 0; } =20 static inline void set_avr_feature(CPUAVRState *env, int feature) { - env->features |=3D (1U << feature); + env->features |=3D (1ULL << feature); } =20 #define cpu_list avr_cpu_list