From nobody Mon Aug 24 09:09:32 2026 Delivered-To: importer@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+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1779486914; cv=none; d=zohomail.com; s=zohoarc; b=E9hBH2oZJPAB107oXpPMboKlS4tugfuAxTskVQmr8vE0ZgB+EovOTufchZkt1r4IolwS4x4GaL7EBodx3sWjOSxGLBpPT9Q4U86TeCnpzcyKi0hG6zlODVwsYCm1C7+V5k1SIsVVs+xzvkxTu7xM3wkULmwJ2bAqsZ7h0I5yYx4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779486914; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fFt2DVrJqhp7xh9emB/wPpGJIoKbN9d5GNummhol57o=; b=Z9lQkBZ4ZDLNVYUDlZDTIzfEYqUjWXzfU0uTlFxlUfe9XG6O9S5RUoFArhoYy4JLoeNDMyJAR4twYGnOzXzTUthd5cMhft9aPM4RB62OrXzkYC6lgXjBtqDZjUo+e3wQJBsy6EbIVNwbNQw0DdZZXJCC2g2rbEipup8jB2T269Q= 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+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779486914726243.15533214051993; Fri, 22 May 2026 14:55:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wQXl3-0007sa-Oq; Fri, 22 May 2026 17:50:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wQXkY-0006vG-4S; Fri, 22 May 2026 17:49:50 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wQXkW-0002cx-ED; Fri, 22 May 2026 17:49:45 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 91C0A1AFB63; Sat, 23 May 2026 00:49:19 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id B8D5B3B71B2; Sat, 23 May 2026 00:49:23 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1779486559; bh=6ttS+OBwVuSJGHZkrgJNbxyeLpBThZnjePJjP1+Z0zg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QaahfwGXb8g9rjZChZnqC2kr/9P4bzh2kAajkA0OaJP757Y3r5SsfxXDdFqDEUWX/ VXMKFbJRy1gTECpXXTmEEysiJQPFPHkbfyjDQvRz7Hr6j3eHeafiQ1FFTAFGE+wWWK 1Aiefdh6fSRk7OPi2b+EyqRBQb/WRKj9APSN3EjoAEpfm60R8r/1XMdwGosrbn9K5D 6LE0BLoaKwWNqe3i8FYS8GigLThMnoOJiL21WKbwtQwMTLrsYXORKzMwCHlBWzDDIH 3ihJU1MBA3d6aYVPs+6OGtpr7tmZa5Rg+jvGjoYmG23F2DCYBeZZ7EqmAMQPdT5Yt1 Ii3wUeD0shKeA== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Pierrick Bouvier , Michael Tokarev Subject: [Stable-10.2.3 109/149] target/microblaze: Fix endianness used to disassemble Date: Sat, 23 May 2026 00:48:41 +0300 Message-ID: <20260522214923.807017-10-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: 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+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @tls.msk.ru) X-ZM-MESSAGEID: 1779486916485158500 From: Philippe Mathieu-Daud=C3=A9 MicroBlaze CPU model has a "little-endian" property, pointing to the @endi internal field. Commit c36ec3a9655 ("hw/microblaze: Explicit CPU endianness") took care of having all MicroBlaze boards with an explicit default endianness (similarly with commit 91fc6d8101d for linux-user binaries), so later commit 415aae543ed ("target/microblaze: Consider endianness while translating code") could infer the endianness at runtime from the @endi field, and not a compile time via the TARGET_BIG_ENDIAN definition. Doing so, we forgot to propagate that runtime change to the disassemble_info structure. Do it now to display the opcodes in correct endianness order. Cc: qemu-stable@nongnu.org Fixes: 415aae543ed ("target/microblaze: Consider endianness while translati= ng code") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-Id: <20260423100612.27278-3-philmd@linaro.org> (cherry picked from commit 41c417290df91c31a70adeb8f5271896a8c5f802) Signed-off-by: Michael Tokarev diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 22231f09e6..965eedbfaf 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -237,8 +237,8 @@ static void mb_disas_set_info(CPUState *cpu, disassembl= e_info *info) { info->mach =3D bfd_arch_microblaze; info->print_insn =3D print_insn_microblaze; - info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG - : BFD_ENDIAN_LITTLE; + info->endian =3D MICROBLAZE_CPU(cpu)->cfg.endi ? BFD_ENDIAN_LITTLE + : BFD_ENDIAN_BIG; } =20 static void mb_cpu_realizefn(DeviceState *dev, Error **errp) --=20 2.47.3