From patchwork Fri Oct 4 16:30:21 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: 1992858 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=i2/RIa90; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKvH22HWpz1xtH for ; Sat, 5 Oct 2024 02:33:02 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swlDv-0005Gb-EY; Fri, 04 Oct 2024 12:32:11 -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 1swlDt-0005DG-K3 for qemu-ppc@nongnu.org; Fri, 04 Oct 2024 12:32:09 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swlDr-0005hF-VQ for qemu-ppc@nongnu.org; Fri, 04 Oct 2024 12:32:09 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-539973829e7so2384595e87.0 for ; Fri, 04 Oct 2024 09:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728059526; x=1728664326; 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=fKHjWYe4hWo3y6AeSVqqoaCH56JRUztKe8mH70Hqsj0=; b=i2/RIa90UJ5HcmJkX0mtWXoQsdZZq+tyvEEbeoQeXftOnapYbGJYFrXrBfgzGUdNqF V2w4YALqvYtZYMj2r0UdiRepdbFK/BBZMJ+x5ODzo/A7bnd3+o4GxdijTSvw+LbgANoy yF1shnSDd1VnqJTTeBFfLANaBjoFcImBiM7ZwWEUNBGenvw7Lhod4XeTT8bZ6+cBYimU 0FKqy2QBdiJJQNXx6VPAH8kiR36dxWCF+Hp9yJg3JWML+PMa8zmrkCnXvPzVuXt/ocBQ jtHtuUtUNnyYU3t41JOrYVWwni8bPuQDrwcxpeyvLtKm1WiZOP25ckxXDJfJdVxnuxcr Jm8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728059526; x=1728664326; 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=fKHjWYe4hWo3y6AeSVqqoaCH56JRUztKe8mH70Hqsj0=; b=PCMmy0LR13QXlad2GTlqtUhzWkkA7hv/oGniRL98JbbyjVp3nQX0CsqHAGg0acnsbI zw362t0H14RGr2h3p94Ya1KyC75m/CxavBeV6P7XUXn63Ive7iSOyh4HzZj5oIABHC5T Gicj9JeMCFSScLRdvaU6QN4dyAVN7QWyOO6uysXH70z0xHWKJzaoRRmp/9D2VbTW3oaI FzrV40foWNxlsY7MrW9kKtnM1oVC+gymKKoswGyWaui5H1JYFHU0/zf5Jrz0rmiDAc6X Ut0SfT8KRvnJ6WsTsG4Q4v4JUQNYNn5m9+bOLGyfgtzaI6vWkfhjWK8J7/6ejjHPOe/s a03g== X-Forwarded-Encrypted: i=1; AJvYcCWQEsS1r3sq3mVV7BiTwFoiWS4UDg452cuKBFXVlwLqJwOkWTNTCIC9oWHW1rlMzBtM8mWxykLSlQ==@nongnu.org X-Gm-Message-State: AOJu0YyXzW/VaNj8eeNZTlXFd7JjoT6d9MbKTu+UaCbUj7j1vttjBRt8 PJSrC5FYaidYi6ElbrVzgDv0XMLOBbxBDR2BVjILJmPToXevSGdD0WECRGYC+PI= X-Google-Smtp-Source: AGHT+IEMDO5su4/asKew0kpLbAIKmyXmPonSSWE40YWku84+mJzIUTJQbpBvY7rsFfmLpNmfBGcL4Q== X-Received: by 2002:a05:6512:b90:b0:539:936c:983e with SMTP id 2adb3069b0e04-539ab9ed416mr2061219e87.53.1728059526340; Fri, 04 Oct 2024 09:32:06 -0700 (PDT) Received: from localhost.localdomain ([91.223.100.150]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-539aff2838esm425e87.270.2024.10.04.09.32.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 09:32:04 -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 05/25] gdbstub/helpers: Introduce ldtul_$endian_p() helpers Date: Fri, 4 Oct 2024 13:30:21 -0300 Message-ID: <20241004163042.85922-6-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::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.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-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Introduce ldtul_le_p() and ldtul_be_p() to use directly in place of ldtul_p() when a target endianness is fixed. Signed-off-by: Philippe Mathieu-Daudé --- include/gdbstub/helpers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h index fd83e366a51..e783d166865 100644 --- a/include/gdbstub/helpers.h +++ b/include/gdbstub/helpers.h @@ -99,5 +99,7 @@ static inline uint8_t *gdb_get_reg_ptr(GByteArray *buf, int len) #endif #define ldtul_p(addr) ldn_p(addr, TARGET_LONG_SIZE) +#define ldtul_le_p(addr) ldn_le_p(addr, TARGET_LONG_SIZE) +#define ldtul_be_p(addr) ldn_be_p(addr, TARGET_LONG_SIZE) #endif /* _GDBSTUB_HELPERS_H_ */