From patchwork Fri Oct 4 16:30:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 832754 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp869699wra; Fri, 4 Oct 2024 09:34:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIyBDxnKCVgjQNrT3xoFTfFoRwFe50JLVRav5NqiUzs9T9pu8nRAq39ZW/4Gf1bOK3HsIUDA==@linaro.org X-Google-Smtp-Source: AGHT+IE5QvlqhTEmk54mgtStj2RmWZclPEmQGmhISnZN33so7kGkfV6Wgr3ArVLeQ6suhOT7PPKr X-Received: by 2002:a05:600c:4e86:b0:42f:5ca3:d784 with SMTP id 5b1f17b1804b1-42f85aae76dmr30175805e9.14.1728059672664; Fri, 04 Oct 2024 09:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728059672; cv=none; d=google.com; s=arc-20240605; b=aT2tqeJm3pnkoAIZrukvjt1lARZCTXCiGfNoneRBVIZkKPojppUAd3ocnOGyuO0Wcj TKhz1uvgfYobeAFZqp1UmEOHmWVe3TiFitiZypVQTZkBzILc56MKyjxcTllS4dbO26K0 039qC3Ax284uph7zkf4pntTkAEu/hwSQ/ImKGJ+OrMbxykoMcj8J9SFwd+JLlAcMEa/W n6ROl1T//zjtcBvPrN1l8xI5G/DeYv0WXCxpwpSM9jTiKoa3a+QONT+ME7FUBH3MA3XO 7HdHKYcep8KMqVlcWswMrY9vl8N4ActVTTqo0AFJN/vCL9hWsNiV0j4GLUkI14od3YSv MvYw== 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=VXhl0xEMfTxY7A/pldYaZefOo2LKk36HnCJi2vt2Dc4=; fh=Cyx8393Oz+CWhBBtvLnsw/Ha6TQ3OyuB9akIVJXTJlY=; b=KLLyB0cIA/TWlWkgZAvIWZwFbTHdH+YjStaMXCOx8NkWE4uAmdf5+FvAVedIhwIn+M xTu1lJqLRL9+6NKBsJCn2x3pj2z2Y14dVzClr3UZkYWIIjYr4M0tSSccPPvQuUKEt2sI n6JY/F7ocs5j7Cxx9FJqlUr61HhKQzeLxQYHR9eFBDIoZqz5n3PaElqDnepO7/iqGIjV MU2hHxvo3CVR9ZV0cG0A2mEZxHwkv5fQX4jj+BDIg1bcDjLFW9yZRqhIk3MZZDhE3Xly uVERMhDENj9uvGpa8JBjt6pq2UrwYWJFETIHQDSgzNqTqGoqA83+zfrAWwAnmIZW+x7B qfxQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SzPpt6RH; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42f89ed77dbsi681295e9.128.2024.10.04.09.34.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 09:34:32 -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=SzPpt6RH; 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 ) id 1swlG6-0004av-G1; Fri, 04 Oct 2024 12:34:26 -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 1swlG1-0003qJ-7O for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:34:21 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swlFz-00065B-EM for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:34:20 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2fac47f0b1aso29919201fa.1 for ; Fri, 04 Oct 2024 09:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728059657; x=1728664457; 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=VXhl0xEMfTxY7A/pldYaZefOo2LKk36HnCJi2vt2Dc4=; b=SzPpt6RHFygxgf0Zop5pieCHNBIXPTQOBvuzK2gY1SvfRXzASxyhtbOif9L2LlovnS +oVmthXPOnKG8fD+l1szHZVtIyWMioabCayNVKK3M+cgwOQhAmdo6QgBBelOJGk3pbkF XoFpMQDYDtWDhhqlKrThejqewClb61RXLZsHfKkKmOenr9AGFVC17lx5tBozbI+FJcdl 6bhH79IIi3Sy2ADUDStrpTL93tRoil+sTlNzOSYhHBqiQloGTW6yhKKTBBWqe4T/TjW+ RLMfzwRnYAllJkhA9qVBMvGXqKPNHWGRE7u23IBIyVLNx7wFArcdiUmPbnMhJF++CN/X 8LSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728059657; x=1728664457; 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=VXhl0xEMfTxY7A/pldYaZefOo2LKk36HnCJi2vt2Dc4=; b=sW1i/eoj8bsk0HN/vFweaula7ctQKGa5a5lZGCsQRgRbNQGXFq3MKdv3xzqVWMsBW4 If0PzuqfqsE2Dwej8qVfy1bzYrn5lCYCKmv8WrzWMwz++ks/4fV1tRlZMphDIbTCOnbU vUOArOFGKnSkUQIzZvMWIFYsIGMpIJH3/TpiSvDQPXxiXNXGhX0RvTalvy5CbtCueNzC 9v/2h7Eo+A8jjS7S6zAJairVWFbAtPDXC+NEQuR0RSAmNUi4p/hAe9/lCY3GTrihnr8S WzTwbkh08csT8eYyrwxSntKw+mv40ivDFsgWHUutloZ/JlqvxmPT3ydmzebBcHYC5Q1q Q+Sg== X-Gm-Message-State: AOJu0Ywzm/S342Gr4ZFItLcIF5XZPmn/zDHWpzanaEP9XaOpCEXJkC2z F0k5ZG0ljpqsKJkHpPs+MmgDVgPwILenCxgrSlqvOgxGlzTS5ZJpIWQZwJPlSGWcAyY31qhhh7s yM/QTAA== X-Received: by 2002:a2e:a542:0:b0:2f7:51a2:96f2 with SMTP id 38308e7fff4ca-2faf3c011dbmr15140621fa.8.1728059657380; Fri, 04 Oct 2024 09:34:17 -0700 (PDT) Received: from localhost.localdomain ([91.223.100.150]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2faf9b339b0sm194261fa.124.2024.10.04.09.34.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 09:34:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, Thomas Huth , Richard Henderson , Pierrick Bouvier , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 14/25] target/tricore: Use explicit little-endian LD/ST API Date: Fri, 4 Oct 2024 13:30:30 -0300 Message-ID: <20241004163042.85922-15-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 Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The TriCore 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/tricore/); \ done Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/tricore/gdbstub.c b/target/tricore/gdbstub.c index 29a70051ffe..0b73b1280e0 100644 --- a/target/tricore/gdbstub.c +++ b/target/tricore/gdbstub.c @@ -124,7 +124,7 @@ int tricore_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) CPUTriCoreState *env = cpu_env(cs); uint32_t tmp; - tmp = ldl_p(mem_buf); + tmp = ldl_le_p(mem_buf); if (n < 16) { /* data registers */ env->gpr_d[n] = tmp;