Message ID | 20241204202602.58083-13-philmd@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org> 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=SqzBevB8; 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 4Y3Tgc6N7zz1yRL for <incoming@patchwork.ozlabs.org>; Thu, 5 Dec 2024 07:31:08 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-ppc-bounces@nongnu.org>) id 1tIvyb-0001m2-5Z; Wed, 04 Dec 2024 15:28:01 -0500 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 1tIvyR-0000uO-5n for qemu-ppc@nongnu.org; Wed, 04 Dec 2024 15:27:51 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) 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 1tIvyO-0001TD-MK for qemu-ppc@nongnu.org; Wed, 04 Dec 2024 15:27:50 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-434b3e32e9dso1903275e9.2 for <qemu-ppc@nongnu.org>; Wed, 04 Dec 2024 12:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733344067; x=1733948867; 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=NfTBm75o97Cz8/aU/8hyy/8ZcyfCCBeJMjQXzg2r+cU=; b=SqzBevB8p6YpDZUC18/k4mfzMsQOFPVYfWXFynLdgOnQpPBRBO3Y+kKuNnf+SMjXqW 2mklqPRFcdij8SWFl/3RyuY/IkYy6WGVd68mlNle7EBlomp6jZo+16tV09b4Dbe9euCL e0uIBwZe09PgyBsoa0Dq7kg1lTLi3SMdF1//kQXAkOAgNdgL6Kpo4i5hvr429g6FFKxP Bx+oSGgHvgNmuSO65lUbAYvGgkJf+HN+Kbov9wOqW3vitHHON4D+Hge0rZ2GSlBdI10p xsBiYFpvLQ2S5OYHofqonzDkZDgFN61IST4lsZ0qm6CM+QgU704VGLPuaA5XgO3Cqh/q 6EWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733344067; x=1733948867; 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=NfTBm75o97Cz8/aU/8hyy/8ZcyfCCBeJMjQXzg2r+cU=; b=H6AUxB4aTf2AUy/K6kvNJtVZSMf8hAoOZTtwJeoxE9Yvryysj6U9oBTioUXW/HMSoh 4nlnqK4Q6DH5Xo/2p6du8xxAt6FySH9Mn5UzwubNxGZXiUJ2LepEektfTBFxvDoRDTnf MOE39X18Ts2HYqq9sEQ3FIENv5YvKaAXBKWDmmvsJKzywjySj+cFuGKf/SC1x2dTh3eR XHiV/w36hIcE2IopJ95T+I0ryxKfNCglqUKbKY9gSQfS71pPuF8dwm/8MmpXDGGTFUWB U4BAFyVht6fj9br4ko5GshJbEnQeH0rha7/J5bW9NNLt7AikDMEsXapwlqPteDF4pJgJ ffLQ== X-Forwarded-Encrypted: i=1; AJvYcCUH5u/v7dtna0SGzN2VdFBJ4Yi3mpFpoXY5tOFpSNcd1XzRPQm+XnDfIkxwarGX21mPqkpMngoUdA==@nongnu.org X-Gm-Message-State: AOJu0YxkFJKok9ChdlgKGy7KgWSW1ftWe05y88fM/681/p4rfRbO0fuh NHGuD/DcpB8HJU3VFEVlU0/p9UfkPIQr6+kBoANKymRu5eyxMZxAb2QiNo2sJws= X-Gm-Gg: ASbGncu/2q6cfMs6ucY0gRAiMvV1iXJ+ETk8AsJfmIFdQBQBrhFZPZ49AXc7pzvUCNY qxXHMCeOyYnA3HIV8Y5qfymk47tfaQ7j7jZradldx/CJXV7QO3Js3fL5nCkzo2d2Hd062zOHWeK TMc3MhSNiN9YhBGUFveUk6p0UivJ0z/VTREw1MIka5eyy2RtGH6QE40NewP8omzmmP7bq8ZfIbk 6zkTaBTDeyio1vJ2FLdMgnQOoQD4hu0NRws5aFqQs3aEIK1gKn+o/i9xgTtcmTeohWV7R9cQ71b eXuLbGGzIY5Jy7WnZNKhvU+L X-Google-Smtp-Source: AGHT+IGpgeJ7vBsWVKm7NeyrMHf5JJDdtts2znjAq5L8tAOSmcAfKNrzgAbgdCPI0p5ekUE7haCsLg== X-Received: by 2002:a05:600c:4f08:b0:434:a754:661c with SMTP id 5b1f17b1804b1-434d09acef0mr65607085e9.7.1733344066970; Wed, 04 Dec 2024 12:27:46 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d52aa0b4sm34940765e9.35.2024.12.04.12.27.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Dec 2024 12:27:46 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza <dbarboza@ventanamicro.com>, "Michael S. Tsirkin" <mst@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Laurent Vivier <lvivier@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Alistair Francis <alistair.francis@wdc.com>, Anton Johansson <anjo@rev.ng>, Zhao Liu <zhao1.liu@intel.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, David Hildenbrand <david@redhat.com>, qemu-s390x@nongnu.org, Max Filippov <jcmvbkbc@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, qemu-arm@nongnu.org, Thomas Huth <thuth@redhat.com>, qemu-riscv@nongnu.org, Alistair Francis <alistair@alistair23.me>, qemu-ppc@nongnu.org, Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH 12/20] target/xtensa: Implement xtensa_isa_is_big_endian() Date: Wed, 4 Dec 2024 21:25:54 +0100 Message-ID: <20241204202602.58083-13-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241204202602.58083-1-philmd@linaro.org> References: <20241204202602.58083-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::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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-ppc@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-ppc.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-ppc>, <mailto:qemu-ppc-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-ppc> List-Post: <mailto:qemu-ppc@nongnu.org> List-Help: <mailto:qemu-ppc-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-ppc>, <mailto:qemu-ppc-request@nongnu.org?subject=subscribe> Errors-To: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org |
Series |
target: Implement CPUClass::datapath_is_big_endian() handlers
|
expand
|
diff --git a/include/hw/xtensa/xtensa-isa.h b/include/hw/xtensa/xtensa-isa.h index a289531bdc8..1cb8e6ccb66 100644 --- a/include/hw/xtensa/xtensa-isa.h +++ b/include/hw/xtensa/xtensa-isa.h @@ -829,6 +829,7 @@ const char *xtensa_funcUnit_name(xtensa_isa isa, xtensa_funcUnit fun); int xtensa_funcUnit_num_copies(xtensa_isa isa, xtensa_funcUnit fun); +bool xtensa_isa_is_big_endian(xtensa_isa isa); #ifdef __cplusplus } diff --git a/target/xtensa/xtensa-isa.c b/target/xtensa/xtensa-isa.c index 630b4f9da1b..36eb4bcf3d4 100644 --- a/target/xtensa/xtensa-isa.c +++ b/target/xtensa/xtensa-isa.c @@ -1741,3 +1741,10 @@ int xtensa_funcUnit_num_copies(xtensa_isa isa, xtensa_funcUnit fun) CHECK_FUNCUNIT(intisa, fun, XTENSA_UNDEFINED); return intisa->funcUnits[fun].num_copies; } + +bool xtensa_isa_is_big_endian(xtensa_isa isa) +{ + xtensa_isa_internal *intisa = (xtensa_isa_internal *)isa; + + return intisa->is_big_endian; +}
Xtensa internal fields are opaque, only accessible by the Xtensa libisa. Implement xtensa_isa_is_big_endian() to get vCPU endianness. This should be implemented in libisa, not QEMU, but I couldn't figure out where to contribute this. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/xtensa/xtensa-isa.h | 1 + target/xtensa/xtensa-isa.c | 7 +++++++ 2 files changed, 8 insertions(+)