From nobody Sun Nov 24 02:00:29 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1727999081; cv=none; d=zohomail.com; s=zohoarc; b=Qz2JpFUk+/z7mFr5Epp76/dgIF68AEQ6EAXCnvzysAKQEO80iXExFHtjyoplHRbsNq0sUHIuZ7rZdZgnLvkT2+FnDhDRHPa80d3JEtNE5ZJKFeT8xTeZnBbYV9ggP38PnojViKz09ULcS0PRkVK5scYntwv+Y7c+lKaVaPNl+8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727999081; 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=Gli2giWmo6/3/Q3D0dlOvqkXZTs2pwWeMPJl2E3h3vs=; b=g+hJVvX0NoAQ2rpx/AX6pcA/l7WOrKkd44DJZm8EuZwsRO54L35LiJAIopbRtqJE0cwqB8W5rRLrj23jUQWwGeM8z5I2eancbiv7E+MbY6pYzsJifqIF4iyfBjp17ISD5fCLGHeWKZfVV65IZavItvvquoDzZyWhDzJQ8QETOjQ= 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; 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 1727999081031352.83235390150014; Thu, 3 Oct 2024 16:44:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swVTr-0007wt-JY; Thu, 03 Oct 2024 19:43:38 -0400 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 1swVTZ-0007hm-K8 for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:43:18 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swVTY-0003pI-08 for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:43:17 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42cbc22e1c4so12171895e9.2 for ; Thu, 03 Oct 2024 16:43:14 -0700 (PDT) Received: from localhost.localdomain (45.red-88-29-191.dynamicip.rima-tde.net. [88.29.191.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f86b1d06csm1322645e9.11.2024.10.03.16.43.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Oct 2024 16:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727998993; x=1728603793; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Gli2giWmo6/3/Q3D0dlOvqkXZTs2pwWeMPJl2E3h3vs=; b=YcXLwcrgzol2HcyeU7eme7WKRviJcfPOei3p/7lJN7+hxmEp7Om1rPOelEaZzbVtix 1ZXAmsk6MtQ0xSst88adylWUvm06leeF0nCEtmPYf0fumN4iGyt1YteQJ/UqYxK5Sjck AGuvNGd/SWfbyAvREeIYNUdynLTyd4GYkbVrrHhMwtC4j9odK9VeacEoIPKIdbS8o1kW xJBSkHit7yBi8XHtuIkBP23dtLO7e5JSAwDA01SWdpzXIIPLgFCqZ7g8liQuq2wTLMfO Lsi7C5DT1vlThGNCEEMxy2jOYeowKj6VT8Mw34JlyMQ7Lkx2be1L7ho7KQkJTzcncosE NvGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727998993; x=1728603793; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gli2giWmo6/3/Q3D0dlOvqkXZTs2pwWeMPJl2E3h3vs=; b=jG9J1HUagQ7CESV4r0chzI+U4rFo7T3NkCcFWYNdSzJJx3mtjRLu9lvFBBhtfYaS9R HnQkFKnMp53nRp0EyAdFNC3SJQzQVJFYciQ4nheNVZ0gUbyCA8KtwZDwNhn3RuEZNvzk YVuwH0Bpsx65yrSHcd48mTYZIJcFkXiXa2Zpxz27aphhZhnYvaO69UA7xXHdfipXEPlV 8m2IX+DvInnsllqAtyrtXuSbWThyJH58srDi0Oiu0iPl4F7Pfv6U2Tw9PpcaYYefXPTw 8x8IDbYzk/HLrDO0kX8m/tWF+M9TT+LwHJ9LMxoDd+LRKHkYTXpIlm0wsv+kOg7Ldfhf bVIg== X-Gm-Message-State: AOJu0Yyz6QCURas7Hxk9ppIrBYCU3CEaO/FRDh0ONvnR3ys55L+W2hyK AK+EaK4z1YdlCRdb8NI5RSDPXb96eUlOhWnX9U5zHpV5imTVA6+LPVsPstuD72U//QLVIHOuwZ0 fiZE= X-Google-Smtp-Source: AGHT+IGge2F93OrH2klnGwt3dIb8agKpbifshJKqK7rUzjjxA19COIOexEf6CgqE/jWM1h5MMa9GuQ== X-Received: by 2002:a05:600c:1ca4:b0:42f:8515:e479 with SMTP id 5b1f17b1804b1-42f85aa142dmr3417795e9.4.1727998993421; Thu, 03 Oct 2024 16:43:13 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Michael Rolnik , Halil Pasic , Christian Borntraeger , Mark Cave-Ayland , Frederic Konrad , Artyom Tarasenko , Matthew Rosato , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Hildenbrand , Peter Xu , Ilya Leoshkevich , Song Gao , Thomas Huth , Marcel Apfelbaum , Eduardo Habkost , qemu-s390x@nongnu.org, Laurent Vivier , Eric Farman , =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Paolo Bonzini , "Michael S. Tsirkin" , Thomas Huth , Bastian Koppelmann , Richard Henderson , Pierrick Bouvier Subject: [PATCH 07/16] target/m68k: Use explicit big-endian LD/ST API Date: Fri, 4 Oct 2024 01:42:02 +0200 Message-ID: <20241003234211.53644-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241003234211.53644-1-philmd@linaro.org> References: <20241003234211.53644-1-philmd@linaro.org> 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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1727999083451116600 The M68K architecture uses big endianness. Directly use the big-endian LD/ST API. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- target/m68k/gdbstub.c | 2 +- target/m68k/helper.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/m68k/gdbstub.c b/target/m68k/gdbstub.c index 15547e2313c..136159f98f2 100644 --- a/target/m68k/gdbstub.c +++ b/target/m68k/gdbstub.c @@ -52,7 +52,7 @@ int m68k_cpu_gdb_write_register(CPUState *cs, uint8_t *me= m_buf, int n) CPUM68KState *env =3D cpu_env(cs); uint32_t tmp; =20 - tmp =3D ldl_p(mem_buf); + tmp =3D ldl_be_p(mem_buf); =20 if (n < 8) { /* D0-D7 */ diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 4c85badd5d3..9d3db8419de 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -57,15 +57,15 @@ static int cf_fpu_gdb_set_reg(CPUState *cs, uint8_t *me= m_buf, int n) =20 if (n < 8) { float_status s; - env->fregs[n].d =3D float64_to_floatx80(ldq_p(mem_buf), &s); + env->fregs[n].d =3D float64_to_floatx80(ldq_be_p(mem_buf), &s); return 8; } switch (n) { case 8: /* fpcontrol */ - cpu_m68k_set_fpcr(env, ldl_p(mem_buf)); + cpu_m68k_set_fpcr(env, ldl_be_p(mem_buf)); return 4; case 9: /* fpstatus */ - env->fpsr =3D ldl_p(mem_buf); + env->fpsr =3D ldl_be_p(mem_buf); return 4; case 10: /* fpiar, not implemented */ return 4; @@ -107,10 +107,10 @@ static int m68k_fpu_gdb_set_reg(CPUState *cs, uint8_t= *mem_buf, int n) } switch (n) { case 8: /* fpcontrol */ - cpu_m68k_set_fpcr(env, ldl_p(mem_buf)); + cpu_m68k_set_fpcr(env, ldl_be_p(mem_buf)); return 4; case 9: /* fpstatus */ - cpu_m68k_set_fpsr(env, ldl_p(mem_buf)); + cpu_m68k_set_fpsr(env, ldl_be_p(mem_buf)); return 4; case 10: /* fpiar, not implemented */ return 4; --=20 2.45.2