Message ID | 20241204202602.58083-13-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:434d:0:b0:385:e875:8a9e with SMTP id u13csp530464wrr; Wed, 4 Dec 2024 12:32:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWxE8PLPFhYRTXnzSuV8PC81fIPD5jOiVEVHGtDClTCbmzvg6Edfp76G2WQd8L4m5XWA2cmVA==@linaro.org X-Google-Smtp-Source: AGHT+IEu/uPc/vGbNMu7wpwOkmbhA7E4UcWEPceWKzc47SuMbTEB/dN3oEXBEzN4TeGVDkdEvwu0 X-Received: by 2002:a05:6214:2025:b0:6d8:9bbe:392d with SMTP id 6a1803df08f44-6d8b72ec3bbmr131165226d6.6.1733344339121; Wed, 04 Dec 2024 12:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733344339; cv=none; d=google.com; s=arc-20240605; b=FnExbnXaN1ymmFgdcGZMoDUp3Ei4/xZTnAUlpEBO7J0SwNPlvnqAsPpHreB+1ukNhN jXoyfgxAUWstKZ8rLvyGsQDBxLZrrvmjJN42+ft2QcqL12Nez+jVCfuWelp4UU+m2T4J VvhFOkOayIwhKsn3ALnKQp2MC04voMoNFTFh9ucKYHu4axVwurUuhEamWBzBhiBY62NM 6odAkag3qg5oWw9H6eME6Svatx+3bIC+RD28tEOEkSd5KelNOes2uS2rLbOcv3cPTJaS OmCtHYYT50Eg+07/lJImJeKRqRwVHTdeeYz4GKYo4ibRbxpfTjusLChtYzMZOKBFN7f9 I6XQ== 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=NfTBm75o97Cz8/aU/8hyy/8ZcyfCCBeJMjQXzg2r+cU=; fh=L8jp5KII9BO+EuE1/Uny/8be6w87XhXr9oO98kXieYU=; b=Jih0LCM23AI/ym4hQrA1FPqpB0RNEu0Ofzb+AjhzB0XGf1GKXIk7W9tJLcpBG8KFjH NroiInh5xbGntaJQHSTA6ayNBMc6nQ2v6kzRDWwJXEEioejXiJypBeT8wA018AvMgkKZ lNtxb9xkGQVbB/Yc8c7qttfYVz67Xi9ZPkek0Cc0MjxKkMrizwPw75rcV4Fq43EQUAuT Amqf40hAs22T95Q4Z3OWt/4KPxjzeTN80SD1Fi3bhGjabDTrRyWMHVrdy9fAfooMIUlS fvXh/CvapeX92kx3eiQsfbE1QH6SbZRQ5XwEwzVzZHhPnbNmpnLKfNidJ43DTxqS2U6z qFIg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SqzBevB8; 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 6a1803df08f44-6d890ce0b3csi9765446d6.425.2024.12.04.12.32.18 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Dec 2024 12:32:19 -0800 (PST) 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=SqzBevB8; 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 1tIvyb-0001kl-7P; 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-0000uP-5v for qemu-devel@nongnu.org; Wed, 04 Dec 2024 15:27:51 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) 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-0001TL-J7 for qemu-devel@nongnu.org; Wed, 04 Dec 2024 15:27:50 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-434a1639637so1987355e9.1 for <qemu-devel@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=spyEbi7nY30Ixy0TZA9LN7GWvPIo6t52a+RQMVeFW93dpWKeeKz82Tz2MTX811VhyC SaIyRKxRrDNenS4Yj8pXw669/AXdOZs0gsewnzL3Q0QS5sUmvghSCLN/VwnV7BEjmhd8 1/wvHdb59LbcQQa8zoKfkwfRK5aeMjXoCs/2Htr6CNOGkWZTdA0WdbonsEbj9sUiaAum vOZs6MqGUMospH2HilXVX0HWh1N7zLsLlxQBUAEaSvNNxNqnOBpZOy7FTUxgCHNI/xde IgCT5BX4tWK7MiVRVE0Ey7lPW/U3ebpfskNYTjpkxpOZ17vQwi0rfzP+/m8yaTt/HIeE /RGQ== X-Gm-Message-State: AOJu0YxEzvIBLBxbw2UGVx4dr0db5tbU2wzWEbWJPD9NTXjMgKE3QGPs Yi+e6KY9JVtKPgewrqaiKHAn3OLm47Zafglukn72eDK/b0tchFcZizvfrBnER/byEk8nZlTOcOe n X-Gm-Gg: ASbGncuV4O9Eg+ytLMgJq2jmwYcOyCNU1RJFi2YvlgefipZEuV8Fy9IDG7whtEyR4c4 zd7KqT2NTv+rYGxaZhBIO0t7WahvDrhLd1QpjI0PPEimUg57zk+j5b5MAC/8zDm7xmSc1Vw1Okv oosYcilQva+InfLvKwzGqK3gfdFEfdnYUWV1fA971l/7rtFEEGd34xgFW8cpMqx6eS16e2UMGJU si3BwDAxjhdBemy5/U/ZlepMQay3zhzraOncnVh98G6OZ1KrQAFJu8hCd0+wKoNwi2mkbTGSQMG 7a+Zg5SeIHmG8E2FtEG1nfua 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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 |
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(+)