From patchwork Wed Dec 4 20:25:51 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: 847328 Delivered-To: patch@linaro.org Received: by 2002:a5d:434d:0:b0:385:e875:8a9e with SMTP id u13csp530112wrr; Wed, 4 Dec 2024 12:31:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVLzq7TlTt5wrMLrq0ffQV1PTkpDzTh1j5eguN47LebE+Br8LW8Z54540PE3h7SfKzR6QspwA==@linaro.org X-Google-Smtp-Source: AGHT+IGw7BSgJgaDihJShd/3dhaApKHlKJxTlI1oWMgJZkeR3flA/6PzbqW7/E0Y7wkqgyQA3tCv X-Received: by 2002:a05:6102:f11:b0:4af:5682:975b with SMTP id ada2fe7eead31-4af973ef0cfmr10416706137.24.1733344279654; Wed, 04 Dec 2024 12:31:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733344279; cv=none; d=google.com; s=arc-20240605; b=dpi7tNQ9FGyW1mwg/iq3j9nhX/w9eD5466QcKfFzF3UAEzvMV9azfRxkmceA9wthR9 SRWeutAEMB0PLyLT3C5YL8wTGSMQe7xJNwvjgFKtRCEHcEa7oKRoOKY55mowwr46L5VO AwVLFPdHeoO+2yIu/3yvTRPvy00qTFL+Ck4zwu3i6VNgWFrtUvffY/imr3u5woOIV/6v XJhnCPOaIxgstLzAff0C6BqfXftk1cWXvGcHx5DJhXrhCAEfYbt5K/Bnx6rpdwK0MQ3+ IWute/BVVDVPfWpsPCeRv07m25BQhLpjT6iNU76EBj/hkpBGPS79p7XF25AXC1H1gjNV MNCw== 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=0gEXG14yGHmTwK2PkgnJuKn3fmfO28N4tNUnsroDG+o=; fh=L8jp5KII9BO+EuE1/Uny/8be6w87XhXr9oO98kXieYU=; b=GUJNzyXAn46bL5NIdBuxtNBVvXnAMLVsfe1QDznAP/bcwF3yFxDNXDVNu2uR9y3Fph RXitqs4bKWstL9uMW5ePDn2vPsv4ytVUxE2Ez/RUY0Cq+BtxVeTubdTYbfjOsvHS22ci BIV/GeoxhZyEMgEhqVv+c0mFxlVS3LaVjt4J1EVOaDQaq0SJ2BpiTZqhG1q1QuP1GoSP JPRUvOscW8WTA/d5JoFVz6VUhf4N9xzJeknP6ofJGVHJifVNp9TRgQ0j0Mb836qQptP5 VbFY/qyhdf3bEA4BHebabuOZzrt2QT49boHDU+nRAyPB4qQs6cG6D/4lw1kY4ZhMCIXB 1QRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Glp+Z1yU; 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 ada2fe7eead31-4afbc68fcf7si2628137.231.2024.12.04.12.31.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Dec 2024 12:31: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=Glp+Z1yU; 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 1tIvyN-0000ew-LZ; Wed, 04 Dec 2024 15:27:47 -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 ) id 1tIvyB-0000RM-8V for qemu-devel@nongnu.org; Wed, 04 Dec 2024 15:27:37 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIvy8-0000OB-V3 for qemu-devel@nongnu.org; Wed, 04 Dec 2024 15:27:35 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-385dece873cso127814f8f.0 for ; Wed, 04 Dec 2024 12:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733344051; x=1733948851; 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=0gEXG14yGHmTwK2PkgnJuKn3fmfO28N4tNUnsroDG+o=; b=Glp+Z1yU/0jga31NZn4x61NUaTQLfZabWAkdUbej0ntLhq01Qbg8L7rJYBeFC4S+s4 w1lZsmj15fGTG2Hhiput/kT/tkpeFmGEPUyxaEu0UJMNgmxpHj+sAAUJ58hARdlrAs6e sTTLvzt7tULHWHMwCHs3EtCbNAL4DNP8wRrb1M8Jmw8TKjpIMuiN3W7oFZ1le9vcA5mc xJYvkqdbWxjBHLdRQdLjJubx1zyxwT3YamIr3k+ZCZnUJrJRVHxzJqt2dsZFzBalyigJ e3liYxZX1yL2hhffiui1lOvLlvS8b4P9tLFikL3T8HU/4p/Oxm0d9aHdZnFisdmOIP5w 7NXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733344051; x=1733948851; 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=0gEXG14yGHmTwK2PkgnJuKn3fmfO28N4tNUnsroDG+o=; b=LsWeJ1+KTxk5c8OLW5LdIGIO81sMIucQkol2aptbB/Ct5PM01CujemZYU6Jl0WjqHY IqeBbvlMQraNMXnv2c1lEB2RxjcR2A8s2KHr2DRmbvmgZ5udTckoNTx9J0mTnjvFVVdp oGv1WqqiabTn2Rma7KlygibZnCUtbI3+3nwG9sTLlimhTi/++fNI3IQTT4bH/ZXNzu2s 4DoueA4YNcQ6AnWtUIvHmVniQUZZc0xgjsF2i6XBVow1ZPG/WcxH9LricRpYksGWSz4k iJzz32tBBudbnzYDm5PDJ/IgWGECf0COB6rJXgmxy51XClu4AUEqzP21OMT/WWRifwCn 6pOQ== X-Gm-Message-State: AOJu0YxG7ARGxM8NB+tl8u0Pri4Dkl1FmunO5ldwzJ9yY7V/dtifNYcT rlgQ+mRZSI991NSpkVKlVV5fQ3SNakzOpaX3U4zag5xNmjwP60yLW0apP42DSo24tR68yxFm0+z r X-Gm-Gg: ASbGnctZO+XQI6yM9RuAfMSbj72s6Iv/Nqg3Ueu8Q3dCyoa9zZlCfSTw2/B/2YtK9T0 gQFEyImC4KeX3TmiBiNnUkZBqkKziQpJkO8102q8Xui9d/gduuAHMEDTEORCcfkd+nDZMXR+a+m KpHPpV5jMYoAVnm/6Hjld2YzS5pwRt+8Nqat+EKG4s+ZQcK5uBTprXnRretMHUzQP/1H301q/+3 mRRHOZyy0x8nvJP9e0kmyPu5MSWvUIKTzrhLx4UMGVWOLdZEobkmD3eomQrULnJXrkg63peCBk+ pAy8egvIW0yMwnv6P3FJmGDL X-Received: by 2002:a05:6000:1885:b0:382:5010:c8de with SMTP id ffacd0b85a97d-38607c164f8mr4720969f8f.46.1733344051161; Wed, 04 Dec 2024 12:27:31 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385d80a77a0sm17412914f8f.58.2024.12.04.12.27.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Dec 2024 12:27:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , "Michael S. Tsirkin" , Peter Maydell , Laurent Vivier , Mark Cave-Ayland , Alistair Francis , Anton Johansson , Zhao Liu , "Edgar E. Iglesias" , David Hildenbrand , qemu-s390x@nongnu.org, Max Filippov , Paolo Bonzini , Nicholas Piggin , qemu-arm@nongnu.org, Thomas Huth , qemu-riscv@nongnu.org, Alistair Francis , qemu-ppc@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 09/20] target/sh4: Implement CPUClass::datapath_is_big_endian Date: Wed, 4 Dec 2024 21:25:51 +0100 Message-ID: <20241204202602.58083-10-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 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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: 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 Implement SH4 datapath_is_big_endian() helper, returning the 'little_endian' property set at reset. Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index f54005644c9..69108c1676e 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -29,6 +29,13 @@ #include "fpu/softfloat-helpers.h" #include "tcg/tcg.h" +static bool superh_cpu_datapath_is_big_endian(CPUState *cs) +{ + SuperHCPU *cpu = SUPERH_CPU(cs); + + return !cpu->env.little_endian; +} + static void superh_cpu_set_pc(CPUState *cs, vaddr value) { SuperHCPU *cpu = SUPERH_CPU(cs); @@ -283,6 +290,7 @@ static void superh_cpu_class_init(ObjectClass *oc, void *data) &scc->parent_phases); cc->class_by_name = superh_cpu_class_by_name; + cc->datapath_is_big_endian = superh_cpu_datapath_is_big_endian; cc->has_work = superh_cpu_has_work; cc->mmu_index = sh4_cpu_mmu_index; cc->dump_state = superh_cpu_dump_state;