Message ID | 20241004163042.85922-11-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp869509wra; Fri, 4 Oct 2024 09:34:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWFNxW2/kqFUcaKW65yjr5gw+NLKbF7YRoELD++ghsmo9BjQq6o1mCXAX7AYSvCRUufVFEK9Q==@linaro.org X-Google-Smtp-Source: AGHT+IH0eJq2awlDya06O+nnst8YOcjurmz8Q0RxqmVaL8iXQv3fRV1XNTGwKuE1005D3FJPWHGL X-Received: by 2002:a05:6102:6c6:b0:48f:e09e:ef60 with SMTP id ada2fe7eead31-4a40590677dmr3418082137.29.1728059645017; Fri, 04 Oct 2024 09:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728059645; cv=none; d=google.com; s=arc-20240605; b=LFnVCEcDRgLXdkZQm83oDxjheWM9jESqFJrpKSihVGq3xmfD29pXd0WsGA8JWvRq/K BeAWws/2Mu109Lc5GbHWD4RmGAqsN1lWIIfYCJ1jfYr+0hyK2RKGKnPU524Msv9ajhHD 4AkUJvch9MRmqaAHwGjQA5MoMFV3KZGO4XaymJC+BbkdmyT/UEQelvR46bwn80OUc+iG wG6Ni7cTTkaAIQfp+QRTAr5OTmyW+YXM63knFNHkiFTsMGuKFiglBC0FpiaOUFR74Jh+ UG6g1lzzU8nHqr0POdo1BaRV9Ngfp9Su3Ge8jTG+7GQXpNrSXEMnQHqYY603kvbyRq0Y XiAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Sos7CbirHso2UkebMmuBOYVoWuS2tFtvh+AVgSe77UQ=; fh=Cyx8393Oz+CWhBBtvLnsw/Ha6TQ3OyuB9akIVJXTJlY=; b=TWz9ALpEdn4SZdC4w6uMfkj050v4LiZho7ddMkcZtFVf8GMAFAtzv7BEEawvxGSQxc u+s+wOyE79CkhN9phQbhXEjbnGjhOdK1jYjOU56Cw2XTe9FGy9JuEnAI0VJcO303m0W2 MabOwcCJ77I3/SQ903I6u/7MsNLFdXxvTL9LcvqhWMRzSJL7+oj0ZpfTEK9oD8FQnXoi TVOHdgYoIFKYBUy+k8j6OOI7VHfARWqKzkbkTvGqaB/rpH17s82Zf/acga5BWQlZR9no KTWP7SfZYd/3Z7LjuJcOqZLH9yAz2SDK/4wpodpo/rX3hq6+uyx/ZGW0ZwGxaIeHlqnU 5TMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FSX6BOSJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4a412f19270si55699137.743.2024.10.04.09.34.04 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 09:34:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FSX6BOSJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1swlFX-0000Dg-Ov; Fri, 04 Oct 2024 12:33:55 -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 <philmd@linaro.org>) id 1swlF1-0007pc-O2 for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:33:23 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1swlEz-0005rj-Jm for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:33:19 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2fad5024b8dso28325471fa.1 for <qemu-devel@nongnu.org>; Fri, 04 Oct 2024 09:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728059595; x=1728664395; 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=Sos7CbirHso2UkebMmuBOYVoWuS2tFtvh+AVgSe77UQ=; b=FSX6BOSJB9wZcloMRiCyaAT97UBbQi1NKzy9WJdy9whe6In7PtuKCv1qdeb4TH87Ig X2NrfrL0fXFcwNYyOxPBR1fxFvmkVmPo9Wr5eRKlA+ckacRSCVoO22gn9jVCK5ZH6CcM 2JF2RJMhFD0BBo3WXwX4f1ylheyk8SjXQ6On1ygaR2/lTw5QoqO6LcR0ghvwGH8UkBop wdZvYYQCbRf7s7+RvZ8krEKvCInILR89VxXt2X5otiTowTsBYh44mzoUH13DdCpYNzck X/O9bFAqBXFWNvSmFLqABPoncYLPlsHCPi5DtOW1pkHafP84W1hWrXA9if0mZTLo6piN KaRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728059595; x=1728664395; 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=Sos7CbirHso2UkebMmuBOYVoWuS2tFtvh+AVgSe77UQ=; b=FBFhfKMEEGRqDjLF6qE9gPhAuB3grGwoyV5ujSYnIP/hvVybCa/xLQ9PJp92lGGOch uZB+n+NQT+hEmY+AAdx9lY5dSqUbdXSRWsMQxCgSAbbcq4NEyIkIZwLpozVzduTbp62y UD+P67TQSG5HWDl2PZn5V4zu94Qj6aU3Q19YTBbFZa3r6rPWvvPUchFUVMfGJtFSivrY jLq4HDCvbl0DvOU1oYPSLby7b3kB5/vHElVvdzXuCIta9zST/3Rp1BYT0dd4oeX3Bqmc GBMwxLpYOfks8bqBOv/8jeMJI3x80CifjcLE9xtoQTDaFpsVkTrryuEEl3WHDXBcqdz/ ng6w== X-Gm-Message-State: AOJu0Yyih1Qsb1xUGd1RmgJEXve5s3dXc70kEK3ZUrL3LriCZFClN2mv 9gXaL0UV2+GZzPT1BiReS70Xy8T0q+c1WhJsmlYGUpawCw0hL5QaQv77MjCveoqSKuljENAGnXB aldrNwQ== X-Received: by 2002:a05:651c:1986:b0:2fa:c5b0:39a3 with SMTP id 38308e7fff4ca-2faf3c13677mr18816021fa.14.1728059595277; Fri, 04 Oct 2024 09:33:15 -0700 (PDT) Received: from localhost.localdomain ([91.223.100.150]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2faf9ac461fsm207201fa.47.2024.10.04.09.33.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 09:33:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, Thomas Huth <thuth@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 10/25] target/avr: Use explicit little-endian LD/ST API Date: Fri, 4 Oct 2024 13:30:26 -0300 Message-ID: <20241004163042.85922-11-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004163042.85922-1-philmd@linaro.org> References: <20241004163042.85922-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=philmd@linaro.org; helo=mail-lj1-x236.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=unavailable 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-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
misc: Use explicit endian LD/ST API
|
expand
|
On 10/4/24 09:30, Philippe Mathieu-Daudé wrote: > The AVR architecture uses little endianness. Directly use > the little-endian LD/ST API. > > Mechanical change using: > > $ end=le; \ > for acc in uw w l q tul; do \ > sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ > -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ > $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/avr/); \ > done > > Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org> > --- > target/avr/gdbstub.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/avr/gdbstub.c b/target/avr/gdbstub.c index d6d3c1479b3..aea71282a58 100644 --- a/target/avr/gdbstub.c +++ b/target/avr/gdbstub.c @@ -69,13 +69,13 @@ int avr_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) /* SP */ if (n == 33) { - env->sp = lduw_p(mem_buf); + env->sp = lduw_le_p(mem_buf); return 2; } /* PC */ if (n == 34) { - env->pc_w = ldl_p(mem_buf) / 2; + env->pc_w = ldl_le_p(mem_buf) / 2; return 4; }
The AVR architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/avr/); \ done Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- target/avr/gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)